Thank you all for the replies.
I will try the middleware solution and tell you how it's going. :)

It's nice to see that our group is big enough to get ~15 replies in 2
days.

Thanks,
Arshavski Alexander.

On Feb 5, 5:14 am, Graham Dumpleton <graham.dumple...@gmail.com>
wrote:
> On Feb 5, 1:25 am, Adam Stein <a...@eng.mc.xerox.com> wrote:
>
> > I do something similiar where I have an extra item in the url.  To get
> > Apache and the Django server to match, I just add the extra part in
> > urls.py that I'm matching.  So instead of something like:
>
> > (r'^admin/(.*)', admin.site.root)
>
> > in Alex's case, it would be:
>
> > (r'^peergw/admin/(.*)', admin.site.root)
>
> > The same would go for any other match, just add the 'peergw' in front.
>
> > That way, the exact same URL can be used in both places.
>
> Which will then not work if you move to mod_wsgi or other WSGI hosting
> systems where SCRIPT_NAME is correctly set to be the mount point of
> the application. The django.root option is a mod_python specific hack
> to work around inadequacies in mod_python. It would not be wise to
> rely on mod_python broken behaviour of urls.py working how it does for
> you if django.root not set.
>
> Graham
>
>
>
> > On Wed, 2009-02-04 at 15:11 +0100, Ales Zoulek wrote:
> > > As I undrestood it is that it's infact *used* on Apache.
> > > That's why the django project is on "/peergw" - Apache, but "/" - dev 
> > > server.
>
> > > And Alex wants to simulate this behaviour on dev server side.
>
> > > Or am I wrong?
>
> > > A.
>
> > > On Wed, Feb 4, 2009 at 3:02 PM, Karen Tracey <kmtra...@gmail.com> wrote:
> > > > On Wed, Feb 4, 2009 at 4:46 AM, Ales Zoulek <ales.zou...@gmail.com> 
> > > > wrote:
>
> > > >> That's not as easy as it seams, quick fix/hack would be middleware
> > > >> that strips out /pergw from the url. That middleware would be used
> > > >> only for dev server, not for apache.
>
> > > > What about simply using the django.root PythonOption when running under
> > > > Apache:
>
> > > >http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#basi...
>
> > > > Its entire reason for being is, I believe, to handle situations like 
> > > > this.
>
> > > > Karen
>
> > > >> A.
>
> > > >> On Wed, Feb 4, 2009 at 9:39 AM, knight <alexar...@gmail.com> wrote:
>
> > > >> > My production version is running on different computer with apache
> > > >> > installed on http://<some ip with port>/peergw
> > > >> > and development version on my computer is running on http://<some ip
> > > >> > with port>.
> > > >> > I want them both to run on http://<some ip with port>/peergw.
> > > >> > The port has no difference.
>
> > > >> > Thanks, Alex A.
>
> > > >> > On Feb 4, 9:58 am, Ian Lewis <ianmle...@gmail.com> wrote:
> > > >> >> What are you trying to do? If your development appserver is 
> > > >> >> conflicting
> > > >> >> with
> > > >> >> a locally installed apache then why not just use a different port?
>
> > > >> >> python manage.py runserver 8001
>
> > > >> >> 2009/2/4 knight <alexar...@gmail.com>
>
> > > >> >> > Hi,
>
> > > >> >> > My question is:
>
> > > >> >> > Is there a way to change my default app url in development server
> > > >> >> > fromhttp://localhost:8000tohttp://localhost:8000/peergw.
>
> > > >> >> > If it's a problem, maybe someone have a good reference for
> > > >> >> > configuring
> > > >> >> > apache server on MAC.
>
> > > >> >> > Regards,
> > > >> >> > Arshavski Alexander.
>
> > > >> >> --
> > > >> >> =======================================
> > > >> >> 株式会社ビープラウド  イアン・ルイス
> > > >> >> 〒150-0012
> > > >> >> 東京都渋谷区広尾1-11-2アイオス広尾ビル604
> > > >> >> email: ianmle...@beproud.jp
> > > >> >> TEL:03-5795-2707
> > > >> >> FAX:03-5795-2708http://www.beproud.jp/
> > > >> >> =======================================
>
> > > >> --
> > > >> ------------------------------------------------------
> > > >> Ales Zoulek
> > > >> +420 604 332 515
> > > >> Jabber: a...@jabber.cz
> > > >> ICQ: 82647256
> > > >> ------------------------------------------------------
>
> > --
> > Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> > Disclaimer: Any/All views expressed
> > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
>
>
--~--~---------~--~----~------------~-------~--~----~
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