Thursday, May 31, 2018

Re: href not working

On donderdag 31 mei 2018 15:49:28 CEST Caleb Bryson wrote:
> my blog view.py is empty at the moment
>
>
> Mysite url.py
>
> from django.contrib import admin
>
> from django.conf.urls import url, include
>
>
>
> urlpatterns = [
>
> url(r'^admin/', admin.site.urls),
>
> url(r'^', include( 'hybridair.urls')),

This matches anything that has a beginning. So that always matches, anything
after it, is ignored (Django works on first match base).


> url(r'^', views.index, name='index'),

And again.

So anything that is not admin, goes to the homepage.
--
Melvyn Sopacua

--
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-users@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/2507550.5rhCOJ8Mzy%40fritzbook.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment