I'm setting up a standard deploy on a CentOS 6 system that I hope will
be the template for all applications for my small company.  We tend to
put only 1 or 2 applications on a VMware image more for administrative
purposes and to avoid a problem/debugging on one system from impacting
other unrelated systems.  We have a very light load and are using Flex
with Django rather than HTML.  We are using wsgi and apache that are the
default versions installed with CentOS  yum installer.  This is also a
Python 2.6 environment.

 

My deploy structure looks like this.  The idea is that I (the developer)
upload the new files into /tmp/yyyy-mm-dd and the sysadmin moves them to
the deploy directory and recreates the symlink for "production"

drwxr-xr-x. 3 root   root   4096 Nov  8 07:12 2011-11-05 #older but we
keep it incase we need to revert.

drwxr-xr-x  4 root   root   4096 Nov 16 07:57 2011-11-16

lrwxrwxrwx  1 root   root     10 Nov 16 09:21 production -> 2011-11-16

 

[root@accapp6 therapydeploy]# cd production

[root@accapp6 production]# ll

total 8

drwxr-xr-x 5 root root 4096 Nov 15 09:47 AccTherapySite # this is my
django site directory (i.e. contains settings.py)

drwxr-xr-x 5 root root 4096 Aug 19 06:43 therapy         # this is the
Flex production build which contains an index.html to launch the app

 

I've configured apache to map "wsgi" to my wsgi-scripts director so all
I need to do to deploy a new app is to drop a new wsgi file in the wsgi
scripts directory.  then in my wsgi-scripts directory I have a python
wsgi script that includes.  

sys.path.insert(0, '/home/therapydeploy/production')

import AccTherapySite.settings as  settings

 

This seems to be working well, although I have not yet beat it to death.
The URL's that Flex uses to get to django are long and ugly like

http://myserver.mydomain.org/wsgi/therapy/django/AccTherapySite/app/getl
ist/schedulemodes 

and my question is: "Is there a better way to define these URL's or trim
them once my wsgi app is handling the call so I don't reveal so many
nodes?"

 

My primary urls.py (same level as settings.py) contains

urlpatterns = patterns('',

    (r'^django/AccTherapySite/app/', include('AccTherapySite.app.urls')
),

 

)

 

While app/urls.py contains

urlpatterns = patterns('AccTherapySite.app.views',

 

    (r'^getlist/([a-z]*)',   views.getlist),

    (r'^getcsv/([a-z]*)',  views.getcsv),

    (r'^getraw/([a-z]*)',  views.getraw),

    (r'^edit/([a-z]*)',  views.edit),

     ...

 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to