First, load some data via the admin that should always be there when someone installs the app.
Next, dump that data out into JSON format into a fixture:
$ ./manage.py dumpdata [app_name] > [app_name]/fixtures/initial_data.json
// This is shamelessly copied from http://stackoverflow.com/questions/263743/how-to-get-cursor-position-in-textarea#answer-3373056 | |
function getInputSelection(el) { | |
var start = 0, end = 0, normalizedValue, range, textInputRange, len, endRange; | |
if (typeof el.selectionStart == "number" && typeof el.selectionEnd == "number") { | |
start = el.selectionStart; | |
end = el.selectionEnd; | |
} | |
else { | |
range = document.selection.createRange(); | |
if (range && range.parentElement() == el) { |
from django.conf import global_settings | |
TEMPLATE_CONTEXT_PROCESSORS = global_settings.TEMPLATE_CONTEXT_PROCESSORS + ( | |
'django.core.context_processors.request', | |
) |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'verbose': { | |
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' | |
}, | |
'simple': { | |
'format': '%(levelname)s %(message)s' | |
}, |
# Get and install logutils | |
# pip install logutils | |
# === settings.py === | |
class PseudoTTY(object): | |
"""This allows a a fake tty which will allow PyCharm to always say its a tty""" | |
def __init__(self, underlying): | |
"""Define my underlying class""" |
I recommend the latest versions for Supervisor and uwsgi. I am using nginx 1.4.7 as that is the latest available on Gentoo (unmasked for ~amd64
).
Unmask app-admin/supervisor
and www-servers/uwsgi
. In the case of x86-64:
app-admin/supervisor ~amd64