okay thank you lets me trying
On Mon, Nov 26, 2018 at 6:35 AM Yavin Aalto Arba
wrote:
> It's kinda all over the place.
>
> 1. conventions:
> urlpatterns is a list not a tuple
> 2.
> 'restaurants.views', without include? what's this for?
>
> 3. You did not close the parenthesis correctly in the
On Mon, Nov 26, 2018 at 04:34:42PM +0200, Yavin Aalto Arba wrote:
> It's kinda all over the place.
>
> 1. conventions:
> urlpatterns is a list not a tuple
> 2.
> 'restaurants.views', without include? what's this for?
>
> 3. You did not close the parenthesis correctly in the second item, here's
It's kinda all over the place.
1. conventions:
urlpatterns is a list not a tuple
2.
'restaurants.views', without include? what's this for?
3. You did not close the parenthesis correctly in the second item, here's
how its supposed to be written:
path('',ListView.as_view(model=Food,
even if i close it is not working
On Mon, Nov 26, 2018 at 5:54 AM Michal Petrucha <
michal.petru...@konk.org> wrote:
> On Mon, Nov 26, 2018 at 02:48:25PM -0800, Abba Haruna wrote:
> > # from django.conf.urls import patterns, url
> > from django.conf.urls.static import static
> > from
On Mon, Nov 26, 2018 at 02:48:25PM -0800, Abba Haruna wrote:
> # from django.conf.urls import patterns, url
> from django.conf.urls.static import static
> from django.views.generic import ListView
> from restaurants.models import Food
> from django.conf import settings
>
> urlpatterns =
# from django.conf.urls import patterns, url
from django.conf.urls.static import static
from django.views.generic import ListView
from restaurants.models import Food
from django.conf import settings
urlpatterns = ('restaurants.views',
path('',ListView.as_view(model=Food,
Yes lets me show you the code
On Mon, Nov 26, 2018 at 5:47 AM Yavin Aalto Arba
wrote:
> did you import settings?
>
> On Mon, 26 Nov 2018 at 15:34, Abba Haruna wrote:
>
>> if settings.DEBUG:
>> # urlpatterns += patterns('',
>> # ('media/(?P.*)',
>> # 'django.views.static.serve',
>> #
did you import settings?
On Mon, 26 Nov 2018 at 15:34, Abba Haruna wrote:
> if settings.DEBUG:
> # urlpatterns += patterns('',
> # ('media/(?P.*)',
> # 'django.views.static.serve',
> # {'document_root': settings.MEDIA_ROOT}))
>
>
>
> this is the result
>
> File
8 matches
Mail list logo