Commits

Anonymous committed 2696ca5

update docs to include proxy notes, staticfiles, similar projects

Comments (0)

Files changed (5)

 - setuptools/pip installable (so install right in virtualenv)
 - small memory footprint
 - by default replaces mimics the django built-in server, serves admin media by
-  default for easy
+  default for easy testing and deployment
 
 Planned features
 ----------------
 
 To do
 -----
-- looking at settings for serving static media automatically?
+- looking at settings for serving static media automatically
 - I should probably just add a switch to allow use of the native cherrypy install
 - Upload to the cheeseshop/pypi at some point. Done!
-
+- Consider other server backends: tornado, uwsgi
 
 Changelog
 ---------
+- 0.6.6 fix up cherrypy dependency in ssl that was accidently introduced in the
+  move to cherrypy.wsgiserver 3.2 branch
+- 0.6.5 added mediahandler wsgi application
 - 9/6/10 0.6.4 added code to automatically serve the admin media like the
   development server does by default. Can turn off on command line for
   production.

django_wsgiserver/wsgiserver/__init__.py

                     DeprecationWarning
                 )
             try:
-                from cherrypy.wsgiserver.ssl_pyopenssl import pyOpenSSLAdapter
+                from django_wsgiserver.wsgiserver.ssl_pyopenssl import pyOpenSSLAdapter
             except ImportError:
                 pass
             else:
 # These may either be wsgiserver.SSLAdapter subclasses or the string names
 # of such classes (in which case they will be lazily loaded).
 ssl_adapters = {
-    'builtin': 'cherrypy.wsgiserver.ssl_builtin.BuiltinSSLAdapter',
-    'pyopenssl': 'cherrypy.wsgiserver.ssl_pyopenssl.pyOpenSSLAdapter',
+    'builtin': 'django_wsgiserver.wsgiserver.ssl_builtin.BuiltinSSLAdapter',
+    'pyopenssl': 'django_wsgiserver.wsgiserver.ssl_pyopenssl.pyOpenSSLAdapter',
     }
 
 def get_ssl_adapter_class(name='pyopenssl'):

docs/proxysetup.rst

+Proxying and/or load balancing the wsgiserver instance behind nginx
+-------------------------------------------------------------------
+
+#) create your project, make sure you've installed django-wsigserver and added it to the installed apps in your settings.py file as described in the README.rst
+#) python manage.py runwsgiserver (This will start the cherrypy webserver on port 8000 by default. In production, you may want to launch this with a process manager like upstart, supervisor or daemon tools)
+#) create an nginx.conf file with 
+
+::
+
+    http {
+      upstream mydjangoproject {
+	server 127.0.0.1:8000 weight=3;
+	# run more instances of wsgiserver on alternative ports to handle more requests
+	# nginx will load balance them
+	#server 127.0.0.1:8001;
+	#server 127.0.0.1:8002;    
+	#server 127.0.0.1:8003;
+      }
+
+      server {
+	listen 80;
+	server_name www.domain.com;
+	location / {
+	  proxy_pass http://mydjangoproject;
+	}
+      }
+    }

docs/similarprojects.rst

+Similar projects
+----------------
+    * django-odeon http://od-eon.com/labs/django-cherrypy-odeon/
+    * django-cpserver
+    * django cherrypy management command 

docs/staticfiles_plan.rst

+With django 1.3, there will be more support for static files based on
+incorporating django-static files into django.contrib.  This is great and it
+should make it possible to automatically deploy django apps with the wsgiserver.
+
+
+
+a new settings parameter
+
+{{STATICFILES_URL}}
+
+django.contrib.staticfiles is being added
+STATICFILES_DIRS
+STATICFILES_FINDERS
+STATICFILES_ROOT
+
+from django.contrib.staticfiles.urls import staticfiles_urlpatterns
+urlpatterns += staticfiles_urlpatterns()