Commit 33533592 authored by chris's avatar chris

Improve privacy

parent d7827927
......@@ -4,7 +4,5 @@ import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
order deny,allow
deny from all
# -*- coding: utf-8 -*
from flyers.settings import *
import os
BASE_DIR = os.path.dirname(__file__)
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite'),
'NAME': os.path.join(BASE_DIR, 'settings', 'db.sqlite'),
}
}
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
CKEDITOR_UPLOAD_PATH = os.path.join(BASE_DIR, 'media', 'uploads')
try:
from local import *
except ImportError, e:
pass
if SITE_MULTILINGUAL:
INSTALLED_APPS += ('modeltranslation',)
# -*- coding: utf-8 -*
# Personal settings for Flyers
LANGUAGE_CODE = 'fr-be'
LANGUAGES = (
('en', 'English'),
('fr', 'Français'),
('es', 'Español'),
('ca', 'Català'),
)
SITE_MULTILINGUAL = False
#!/usr/bin/env python
import os
import subprocess
d = os.path.dirname(os.path.abspath(__file__))
d2 = os.path.join(d, 'media', 'uploads')
os.chdir(d)
class Page(object):
def __init__(self):
self.text = ''
def add(self, cmd):
self.text += cmd
self.text += '\n'
def render(self):
o = '<br/>'.join(self.text.split('\n'))
return '<html><body>%s</body></html>' % o
p = Page()
if not os.path.isdir(d2):
p.add('Creating %s\n' % d2)
os.makedirs(d2)
p.add(subprocess.check_output(
["python", "manage.py", "syncdb", "--noinput"],
stderr=subprocess.STDOUT))
p.add(subprocess.check_output(
["python", "manage.py", "collectstatic", "--noinput"],
stderr=subprocess.STDOUT))
print "Content-Type: text/html"
print
print p.render()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment