Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

17 views
Skip to first unread message

NoviceSortOf

unread,
Dec 21, 2016, 8:43:23 PM12/21/16
to Django users

URLs not defined in my urls.py all show my home page and not a 404 missing page error.

For instance 

Naturally shows my home page.

Shows the downloadable catalogs
 
then anything goes.

or


Shows my homepage

Why isn't my project issuing 404 or other errors when page not found?

Please advise 


Vijay Khemlani

unread,
Dec 21, 2016, 8:56:57 PM12/21/16
to django...@googlegroups.com
show your urls.py

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/94dc7439-38f5-464c-b93e-001faf03491c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

NoviceSortOf

unread,
Dec 22, 2016, 6:36:09 AM12/22/16
to Django users
Thanks for the response... Apache setting and URL's follow.

Apache setting looks like this...
<Directory /var/www/devel/area1/bookstor>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
=========



URLS look like this
urlpatterns = patterns('',
      (r'^search/$', search),
      (r'^searchadv/$', searchadv),  
      (r'^searchcat/$', searchcat),  
      (r'^searchhlt/$', searchhlt),  
      (r'^searchquick/$', searchquick), 
      (r'^edition/(?P<copyid>\w+)/$',edition),          
      (r'^add_to_cart/(?P<copyid>\w+)/$',add_to_cart),              
      (r'^remove_from_cart/(?P<copyid>\w+)/$',remove_from_cart),                  
      (r'^view_cart/$',view_cart),   
      (r'^cart_mail/$',cart_mail),        
      (r'^cart_maileasy/$',cart_maileasy),        
      (r'^check_out/$',check_out),   
      (r'^check_outeasy/$',check_outeasy),            
      (r'^login/$',login),  
      (r'^testit/$',testit),    
      (r'^request_catalogs/$',request_catalogs),
      (r'^request_catalogs/$',request_catalogs),
      (r'^profileopt/$', TemplateView.as_view(template_name= "profiles/profileopt.html")),
      (r'^library.htm/$', TemplateView.as_view(template_name= "library.html")),
      (r'^collect.htm/$', TemplateView.as_view(template_name= "collect.html")),
      (r'^ecatalogsdnld.htm/$', TemplateView.as_view(template_name= "ecatalogsdnld2.html")),
      (r'^about.htm/$', TemplateView.as_view(template_name= "about.html")),
      (r'^contactus.htm/$', TemplateView.as_view(template_name= "contactus.html")),
      (r'^subjectslst/$', TemplateView.as_view(template_name= "subjectslst.html")),
      (r'$',index2),          
      (r'^index2/$',index2),    
)
















On Thursday, December 22, 2016 at 2:56:57 AM UTC+1, Vijay Khemlani wrote:
show your urls.py

On Wed, Dec 21, 2016 at 10:43 PM, NoviceSortOf <dljons...@gmail.com> wrote:

URLs not defined in my urls.py all show my home page and not a 404 missing page error.

For instance 

Naturally shows my home page.

Shows the downloadable catalogs
 
then anything goes.

or


Shows my homepage

Why isn't my project issuing 404 or other errors when page not found?

Please advise 


--
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...@googlegroups.com.

Vijay Khemlani

unread,
Dec 22, 2016, 7:00:36 AM12/22/16
to django...@googlegroups.com
(r'$',index2), matches anything i think

you would need something like

(r'^/$',index2),   

To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.

NoviceSortOf

unread,
Dec 22, 2016, 7:35:50 AM12/22/16
to Django users
Thanks that does the job.

I'm editing subject to read as 'Solved' 

- Is this considered best practice in this form?
Reply all
Reply to author
Forward
0 new messages