Browse files

Minor changes to make the quick install process simpler and smoother.

  • Loading branch information...
1 parent 2f0ce23 commit 5bf1f2d284c9cd4e9efefd6a5424cde8673e6bb5 nemesisdesign committed Sep 9, 2012
Showing with 28 additions and 14 deletions.
  1. +16 −9 README.md
  2. +3 −0 requirements.txt
  3. +6 −4 settings.example.py
  4. +1 −0 static/placeholder.txt
  5. +2 −1 urls.py
View
25 README.md
@@ -23,23 +23,30 @@ under GPLv3 and tested inside the Ninux wireless community network
(http://wiki.ninux.org/).
-INSTALLATION
+DEVELOPMENT INSTALLATION
---------------
-For a complete installation guide please refer to installation guide
-available here:
-http://wiki.ninux.org/InstallNodeshot
+If you want to do a quick install to play with nodeshot just follow this routine:
-To run some test just type:
-
- sudo pip install Django django-extensions
git clone git://github.com/ninuxorg/nodeshot.git mapserver
cd mapserver
+ pip install -r requirements.txt
cp settings.example.py settings.py
- ./manage.py syncdb && ./manage.py runserver
+
+ ./manage.py syncdb && ./manage.py collectstatic && ./manage.py runserver
+
+Enjoy on http://localhost:8000/ !
+Admin site is at http://localhost:8000/admin/
-Enjoy on http://localhost:8000 !
+PRODUCTION INSTALLATION
+---------------
+To install for production you'll need to install the python connectors for your database of choice (mysql-python or postgres_psycopg2), setup a virtual host in your web server and bind it to mod_wsgi.
+For a complete installation guide please refer to installation guide
+available here:
+http://wiki.ninux.org/InstallNodeshot
+QUESTIONS
+---------------
If you have any question, please feel free to contact us:
contatti@ninux.org
View
3 requirements.txt
@@ -0,0 +1,3 @@
+Django==1.4.1
+distribute==0.6.10
+wsgiref==0.1.2
View
10 settings.example.py
@@ -35,7 +35,7 @@
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
-LANGUAGE_CODE = 'it-IT'
+LANGUAGE_CODE = 'en-EN'
SITE_ID = 1
@@ -52,7 +52,7 @@
MEDIA_ROOT = '%s/media/' % os.path.dirname(os.path.realpath(__file__))
# for django 1.4
-STATIC_ROOT = MEDIA_ROOT
+STATIC_ROOT = '%s/static/' % os.path.dirname(os.path.realpath(__file__))
SITE_URL = "http://localhost:8000/"
@@ -62,12 +62,13 @@
MEDIA_URL = '%smedia/' % SITE_URL
# for django 1.4
-STATIC_URL = MEDIA_URL
+STATIC_URL = '%sstatic/' % SITE_URL
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
-ADMIN_MEDIA_PREFIX = '%sadmin/' % MEDIA_URL
+# DEPRECATED
+#ADMIN_MEDIA_PREFIX = '%sadmin/' % MEDIA_URL
# Make this unique, and don't share it with anybody.
SECRET_KEY = '(i+!)&s9crw*eg^!)(uudsdr%+*+g)(d$fs32eh7a3*z-dd3'
@@ -116,6 +117,7 @@
#'django.contrib.sites',
'django.contrib.messages',
'django.contrib.admin',
+ 'django.contrib.staticfiles',
'nodeshot',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
View
1 static/placeholder.txt
@@ -0,0 +1 @@
+
View
3 urls.py
@@ -9,9 +9,10 @@
)
# serve static files only if DEBUG and DEVELOPMENT_SERVER are True (in settings.py)
-from settings import DEBUG, DEVELOPMENT_SERVER, MEDIA_ROOT
+from settings import DEBUG, DEVELOPMENT_SERVER, MEDIA_ROOT, STATIC_ROOT
if DEBUG and DEVELOPMENT_SERVER:
# you might need to change "media" to suit your settings.MEDIA_URL
urlpatterns += patterns('',
(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': MEDIA_ROOT}),
+ (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': STATIC_ROOT}),
)

0 comments on commit 5bf1f2d

Please sign in to comment.