I made a mistake in the alternative section I posted in my last
response.  You would need to remove the '^' from each of the
urlpatterns starting with '^polls' and replace it with '.*polls'.  In
any case, adding '^mysite' to the beginning of each urlpattern is the
more explicit way to go.

Sorry,

Sean

On 10/19/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> Your urlpatterns are not correct.  Given your current apache
> configuration, the beginning of each of your patterns will need to
> start with '^mysite'.  Alternatively, you can try removing the '^' at
> the beginning of each of the polls url patterns.  That symbol
> indicates that the regex pattern should start its match at the
> beginning of the string, and it will never match your urls because
> they all start with 'mysite'.
>
> As for the admin section, create another apache location similar to
> the one you created for mysite.  In fact, copy and paste the location
> you have for mysite and substitute 'admin' for 'mysite'.  That should
> get your admin to work.
>
> Sean
>
> On 10/19/06, Tipan <[EMAIL PROTECTED]> wrote:
> >
> > Clint,
> >
> > Thanks for the advice. I have changed the urls.py which is found in the
> > mysite folder and this now brings the simple list of polls on to the
> > screen (http://localhost/mysite/). Adding a /polls/ to the url throws
> > up an error (as it did before).
> >
> > My urls.py now looks like this:
> >
> >
> > ---------------------
> > from django.conf.urls.defaults import *
> >
> > urlpatterns = patterns('',
> >     # Example:
> >     (r'^mysite/$', 'mysite.polls.views.index'),
> >     (r'^polls/$', 'mysite.polls.views.index'),
> >     (r'^polls/(?P<poll_id>\d+)/$', 'mysite.polls.views.detail'),
> >     (r'^polls/(?P<poll_id>\d+)/results/$',
> > 'mysite.polls.views.results'),
> >     (r'^polls/(?P<poll_id>\d+)/vote/$', 'mysite.polls.views.vote'),
> >
> >     # Uncomment this for admin:
> >     (r'^admin/', include('django.contrib.admin.urls')),
> > -------------------------------------------
> >
> > However, using the lite server when I enter the URL:
> > http://localhost:8000/admin/
> > I get the my administration interface with table access, sidebar etc.
> >
> > Typing the same URL when Apache is running gets me a "cannot connect to
> > server" message.
> >
> > Clearly to 2 servers are interpreting differently and I wonder whether
> > my apache config file httpd.conf is correct. The location lines I've
> > added to it are:
> > -------------------
> > <Location "/mysite/">
> >     SetHandler python-program
> >     PythonPath "['c:/data/business/projects/django_test'] + sys.path"
> >     PythonHandler django.core.handlers.modpython
> >     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
> >     PythonDebug On
> >
> > </Location>
> > --------------------
> >
> > Any thoughts?
> >
> > Regards, Tim
> >
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to