🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: pl.comp.lang.python
1 messages
1 total messages Started by KO Fri, 01 Jun 2012 13:03
django na apachu
#28431
Author: KO
Date: Fri, 01 Jun 2012 13:03
66 lines
2189 bytes
Witam.
Mam dwie bardzo proste djangowe aplikacje dzialajace na apachu:

http://mojserwer/app1
http://mojserwer/app2

Na golym http://mojserwer/ dziala jakas inna strona, chyba w javie.


W konfiguracji "innej strony" jest ustawione:
ProxyPass /app1 !
ProxyPass /app2 !


Konfiguracja moich wyglada tak:
(app(1/2) znaczy, ze wszystko inne jest takie samo, tylko w jedym pliku
jest app1 a w drugim app2)

<Location "/app(1/2)">
	SetHandler python-program
	PythonHandler django.core.handlers.modpython
	SetEnv DJANGO_SETTINGS_MODULE app(1/2).settins
	PythonPath "['/var/www/html/app(1/2)'] + sys.path"
</Location>


struktura katalogow tez taka sama:
/var/www/html/app(1/2)/
....manage.py
....app(1/2)/
........settings.py
........urls.py
........wsgi.py
....site/
........models.py
........views.py
........templates/


urls.py wygladaja tak:
urlpatterns = patterns('',
    url(r'^app(1/2)/?$', 'app(1/2).views.home', name='home-page'),
)


Teraz problem:
Jezeli wejde na http://mojserwer/app1 i zaczne odswiezac,
to mniej wiecej w polowie przypadkow dostane taki blad:
Using URLconf defined in app2.urls, Django tried
these URL patters, in this order:
//tutaj wyswietlona zawartosc mojego app2.urls
The current URL, app1/ didn't match any of these


I to samo tylko odwrotnie :) dla app2


Wyglada na to, ze niezaleznie od tego czy zawolam /app1 czy /app2 serwer uzywa
przypadkowego app(1/2).urls

Czy ktos ma pomysl co tutaj jest nie tak?



-- 
ko
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads