Sorry it took me so long to get back to you.
On Thu, Aug 18, 2022 at 10:16 PM hajar Benjat <hajarbenjat@gmail.com> wrote:
--for example this is your project name 'firstproject' and this is your app name 'firstapp' in your template you will create a html page named 'index.html' in your 'firstapp' views.py you need to create a function for example :def index(request):return render(request, 'index.html')in your 'firstapp' urls.py you need something like thisurlpatterns = [path('',views.index,name="index"),]and then in your 'firstproject' urls.py you need thisfrom django.urls import path,include]urlpatterns = [path('admin/', admin.site.urls),path('', include('firstapp.urls')),Le jeu. 18 août 2022 à 22:06, hajar Benjat <hajarbenjat@gmail.com> a écrit :did you make it right (what about the urls.py and views.py )--HAJAR BENJAT
- Specialized Master in Information Systems Engineering
At CADI AYYAD UNIVERSITY – FSSM Marrakech
- Computer Science Teacher
P: +212698608188
LinkedIn: https://www.linkedin.com/in/hajar-benjat-a92132106
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMcj6Wf3evMhypW%3DOChVi-nUXoDQRU%2BZB-AFLtyEfvh1JJVh6Q%40mail.gmail.com.
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJnMy6fpOPS12sJzxusXxNAYd2t67KqpR%2Bb71JZF2JQc1PZCYQ%40mail.gmail.com.
No comments:
Post a Comment