#31781: Not Found The requested resource was not found on this server
-------------------------------------------+------------------------
               Reporter:  Achar007         |          Owner:  nobody
                   Type:  Uncategorized    |         Status:  new
              Component:  Template system  |        Version:  3.0
               Severity:  Normal           |       Keywords:  django
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  1
                  UI/UX:  0                |
-------------------------------------------+------------------------
 I installed django and virtual env.
 I created a project(nandiasgarden-project) and an app(pizza).

 Edited pizza.views under pizza

 {{{
 from django.shortcuts import render

 # Create your views here.

 def home(request):
     return render(request, 'pizza/home.html')

 def order(request):
     return render(request, 'pizza/order.html')

 }}}

 created 2 html files under - pizza/templates/pizza/

 home.html
 {{{
 <h1>Nandia's Garden</h1>
 <a href="{% url 'order' %}">Order a Pizza</a>
 }}}
 order.html
 {{{
 <h1>Order a Pizza</h1>
 }}}

 settings as below:

 {{{
 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = False

 ALLOWED_HOSTS = ['*']

 # Application definition

 INSTALLED_APPS = [
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
     'django.contrib.sessions',
     'django.contrib.messages',
     'django.contrib.staticfiles',
     'pizza',
 ]
 }}}

 And finally urls as

 {{{
 from django.contrib import admin
 from django.urls import path
 from pizza import views

 urlpatterns = [
     path('admin/', admin.site.urls),
     path('',views.home name='home'),
     path('order',views.order name='order'),
 }}}


 when run server and then fire the website, I get below:

 Not Found The requested resource was not found on this server

 How to fix this and what's the resolution ?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31781>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.9b14057083509baffd44df3cb434ffd6%40djangoproject.com.

Reply via email to