Whats the structure of your project.? On Tue, Apr 23, 2019, 7:13 AM Deepali Singh <[email protected]> wrote:
> I have new to django ad i have created my project my pieshop,,,,I don't > know how it is showing 3 folders in the app > > On Mon, 22 Apr 2019 at 22:08, Robert Wahoo <[email protected]> wrote: > >> Actually, I found why I got that last message, was a typo on my part. >> >> >> >> On to the next problem…Thank you. >> >> >> >> *From: *"[email protected]" <[email protected]> >> on behalf of "Victor H. Velasquez Rizo" <[email protected]> >> *Reply-To: *"[email protected]" < >> [email protected]> >> *Date: *Sunday, April 21, 2019 at 9:02 PM >> *To: *"[email protected]" <[email protected]> >> *Subject: *Re: problems with url and views - new to django >> >> >> >> *Hello Rob.* >> >> With the url "hello/", your trying to call the "hello" function on your >> view.py. >> >> *First*, you need to import "hello" to be able to use it. from *from >> lct_app.views import hello* >> >> *Second,* call the function. path('hello/', hello), >> >> >> >> *urls.py* >> >> from django.contrib import admin >> >> from django.urls import path >> >> from lct_app.views import hello >> >> >> >> urlpatterns = [ >> >> path('admin/', admin.site.urls), >> >> path('hello/', hello), >> >> ] >> >> >> >> *views.py* >> >> >> >> from django.shortcuts import render >> >> >> >> def hello(request): >> >> return render(request, "lct_app/templates/hello.html", {}) >> >> >> >> On Sun, Apr 21, 2019 at 5:07 PM Rob W <[email protected]> wrote: >> >> setting up a new project. >> >> all good, loaded up the project on localhost. >> >> >> >> however, when creating a view then setting the url, it doesn't work. >> >> >> >> >> >> *urls.py* >> >> >> >> from django.contrib import admin >> >> from django.urls import path >> >> >> >> urlpatterns = [ >> >> path('admin/', admin.site.urls), >> >> path('hello/', lct_app.site.urls), >> >> >> >> >> >> *views.py* >> >> >> >> from django.shortcuts import render >> >> >> >> def hello(request): >> >> return render(request, "lct_app/templates/hello.html", {}) >> >> >> >> i comment out the path in urls.py, django comes back. what am i missing? >> >> >> >> >> >> >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> 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/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/4872beca-597c-4689-a12e-9e888c5266ca%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> -- >> >> >> >> >> Atte...,. >> Vìctor Hugo Velàsquez Rizo >> Cali - Colombia >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> 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/CAFCXTzga%3DFAMdPFwhfp3yMEtyZkA7rzmjhB29rAG160ALuP3Og%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAFCXTzga%3DFAMdPFwhfp3yMEtyZkA7rzmjhB29rAG160ALuP3Og%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> -- >> 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 [email protected]. >> To post to this group, send email to [email protected]. >> 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/BL0PR01MB4354017875EE71CD3DF45828F4220%40BL0PR01MB4354.prod.exchangelabs.com >> <https://groups.google.com/d/msgid/django-users/BL0PR01MB4354017875EE71CD3DF45828F4220%40BL0PR01MB4354.prod.exchangelabs.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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/CANbmnTJ7NbZ5KSE-upeT8Hba4H4oTFFi_bL_7aYfPwNRQx8FGg%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CANbmnTJ7NbZ5KSE-upeT8Hba4H4oTFFi_bL_7aYfPwNRQx8FGg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. 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/CAFCXTzg%3DL2H5CZ8j-VAb0MzbmRuvHv-NhXkxb5_1wrA%2BUaEH6A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

