Commit d9ce93a1 authored by chris's avatar chris

Add example site.

parent e303b517
......@@ -2,5 +2,4 @@
*.sqlite
*~
env
staticroot
media
......@@ -5,4 +5,5 @@ RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !^/static/
RewriteCond %{REQUEST_URI} !^/media/
RewriteRule ^(.*)$ site.fcgi/$1 [QSA,L]
[
{
"pk": 1,
"model": "content.page",
"fields": {
"parent": null,
"weight": 0,
"title": "Welcome",
"text": "<p>It is working.</p>\r\n",
"in_menu": true,
"bgimage": "",
"lnk": "",
"date": "2014-07-19",
"slug": "welcome"
}
},
{
"pk": 2,
"model": "content.page",
"fields": {
"parent": 1,
"weight": 0,
"title": "Subpage",
"text": "<p>A child page example.</p>\r\n",
"in_menu": false,
"bgimage": "",
"lnk": "",
"date": "2014-07-19",
"slug": "subpage"
}
}
]
[
{
"pk": 1,
"model": "general.settings",
"fields": {
"site_address": "http://flyers.domainepublic.net/",
"logo": "",
"site_description": "Nous envoyons des flyers de spectacles de th\u00e9atre.",
"site_name": "Flyers",
"home_page": 1
}
}
]
#!/usr/bin/env python
import os
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)
from flyers.settings import *
import os
BASE_DIR = os.path.dirname(__file__)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite'),
}
}
STATIC_ROOT = os.path.join(BASE_DIR, 'staticroot')
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
CKEDITOR_UPLOAD_PATH = os.path.join(BASE_DIR, 'media', 'uploads')
#!/usr/bin/env python
"""
fastcgiconfig for django-flyers
"""
import os
from django.core.servers.fastcgi import runfastcgi
os.chdir(os.path.dirname(__file__))
os.environ['DJANGO_SETTINGS_MODULE'] = "settings"
runfastcgi(method="threaded", daemonize="false")
......@@ -84,7 +84,7 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.6/howto/static-files/
STATIC_URL = '/static/'
STATIC_URL = '/staticroot/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticroot')
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
......
#!env/bin/python
"""
fastcgiconfig for django-flyer.
"""
import os
#path = os.path.dirname(os.path.realpath(__file__))
#sys.path.insert(0, path)
#sys.path.insert(1, os.path.join('path/virtualenv'))
os.environ['DJANGO_SETTINGS_MODULE'] = "flyers.settings"
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded")
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