On Tuesday, 12 November 2013 17:42:06 UTC, fred wrote:

>  We deploy with Apache and it serves both django and generic html.  We 
> are a small shop with internal applications and minimal server load and we 
> are not ready to have a django server and an html server.
>
>  
>
> I use the /wsgi  prefix in my url’s to identify what goes to django (via 
> the httpd wsgi.conf file)
>
>  
>
> When I deploy with wsgi in production my urls look like  
> http://myserver.mydomain.com/wsgi/myapp
>
>  
>
> But when running the debug server I get http://localhost/myapp 
>
>  
>
> Is there a clean way to handle this without having to define the “/wsgi” 
> prefix and use it conditionally based on whether I’m Unix (production) or 
> Windows (debug)???
>

There's no need to insert the prefix at all. As long as you consistently 
use the {% url %} tag (or the reverse() function) throughout your 
application to calculate URLs, Django will take account of the WSGI server 
prefix and use it properly.
--
DR.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b5c6f423-0ed5-4b7d-91cc-df130e9f8598%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to