Commits

Anonymous committed d1dac72

acknowledge/thank Charl Botha for help with static files

Comments (0)

Files changed (4)

 
 
 
-Acknowledgments and References
-------------------------------
+Acknowledgments
+---------------
 Many thanks to Peter and lincolnloop for describing how to do this and writing the code.
 
 Peter acknowledged idea and code snippets borrowed from Loic d'Anterroches, adapted to run as a management command
 
 Peter hosts his code at http://github.com/lincolnloop/django-cpserver 
 
+Contributors
+------------
+ * Charl Botha (cpbotha) http://timescapers.com/  staticfiles work
+
+References
+----------
+
 .. [#] For example `Peter's blog post`_ describes using django_cpserver on a VPS.
 
 .. _`Peter's blog post`: http://lincolnloop.com/blog/2008/mar/25/serving-django-cherrypy/
 
 I set up a virtualenv with django 1.3 pre installed on it, and then cd to testdjangoproject
 
+I use pip to make sure the dependencies (django, django-debug-toolbar)
+are included::
+  pip install -r requirements
+  
 To run basic tests::
 
   python manage.py runwsgiserver

tests/testdjangoproject/settings_statics.py

 
 from settings import *
 STATICFILES_ROOT = os.path.join(PROJECT_ROOT, 'static')
-
+STATICFILES_URL = r'/static/'
 # experimental for development work it would be nice to not need to
 # run collectstatic all the time
 STATICFILES_DIRS = (

tests/testdjangoproject/views.py

 def hello(request):
     data = {}
     
-    data['HAS_STATICFILES_ROOT'] = False
+    data['HAS_STATICFILES_ROOT'] = True
     try:
         if settings.STATICFILES_ROOT:
             data['HAS_STATICFILES_ROOT'] = True