Hello Philip, I use the same tutorial book "Django for beginners" as you
and I understand why the author of the book refers to the pages directory
as if there is only one.
You are having two Directories because you ran this command:

 $ django-admin startproject pages

The Author of the book ran this other command below instead of yours, that
is why it bothers you that the author refers to the pages directory as if
there it were only one. See the command that makes this possible below:

$ django-admin startproject pages .

(the difference between the two commands is the space and dot after the
name of your project, 'pages')

On Sat, Mar 7, 2020, 1:18 AM Shishir Jha <shishirjha...@gmail.com> wrote:

> "One thing that bothers me is that the author of the book refers to the
> pages directory as if there is only one.  In fact, django created two. The
> top level, (Is that referred to as the base?) has manage.py in it.  One of
> the childs of this is another ‘page’ which is where I put urls.py.  At one
> point I put urls.py
>
> In both ‘page’ directories, figuring the one that the one in the wrong
> place would be ignored.  This didn’t seem to make any difference.  Is it
> possible that the book was written when there was only one “page” directory
> and the code in the book won’t work with a second “page” sub-directory?"
>
>
> Outer "pages" is just the directory to store the django project and
> initialise the project using pipenv and all. That has nothing to do with
> the project itself. The "pages" inside is one of the apps of the
> project(This project has only one app). Django has this concept of
> "projects" and "apps". Project means whole web application that you are
> developing and apps are specific functionalities inside the web app. So,
> pay attention to the "pages" folder inside only, it will have "urls.py"
> file to display pages in specific routes, and other "urls.py" is inside
> "pages_project" which represents whole project. The "urls.py" file here is
> to let django know which apps have urls setup and where to look for them
>
>
> On Sat, Mar 7, 2020 at 4:04 AM Jorge Gimeno <jlgimen...@gmail.com> wrote:
>
>> I think Alvaro is on to something.  I just noticed that there ins't a
>> virtual enviroment active, and the traceback shows that pipenv run wasn't
>> used either. Can we try pipenv shell and then running python manage.py
>> runserver again? If you didn't install Django using pipenv install, do that
>> first.
>>
>> -Jorge
>>
>> On Fri, Mar 6, 2020 at 3:07 AM Alvaro Orozco <
>> alvaro.orozco.t...@gmail.com> wrote:
>>
>>> It seems like you're not activating the virtual environment. Active the
>>> virtual environment and install the dependencies.
>>>
>>> On Thu, Mar 5, 2020 at 11:02 PM Shishir Jha <shishirjha...@gmail.com>
>>> wrote:
>>>
>>>> Can you show the code that you have written until page 55?
>>>>
>>>>
>>>> On Fri, 6 Mar 2020, 9:01 am Philip Means, <means....@gmail.com> wrote:
>>>>
>>>>> Thank you for your response.  The book is Django for Beginners, by
>>>>> William S. Vincent.  I will copy and send you the chapter I am having
>>>>> trouble with.  My directory structure, as created by Django, doesn't seem
>>>>> to be the same as his, so I will send you that as well.  The problem I am
>>>>> having
>>>>> is that after the changes to the files have been made, and I
>>>>> "runserver" (on page 55) I get a huge error dialog that seems to say that
>>>>> django can't find the app. I have deleted the project several times and
>>>>> re-entered it, so I think it is unlikely that it is a typing error.
>>>>>
>>>>>
>>>>> On Thu, Mar 5, 2020 at 8:27 PM Jorge Gimeno <jlgimen...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>> On Thu, Mar 5, 2020 at 6:04 PM Philip Means <means....@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> I am new to web development.  Wanted to help my daughter with a
>>>>>>> simple website (she does pet portraits) and learn something that 
>>>>>>> interests
>>>>>>> me.  I watched some you tube tutorials, then bought a book.  First 
>>>>>>> couple
>>>>>>> simple projects went OK.  Then I got to templates and I have not been 
>>>>>>> able
>>>>>>> to get the example project to work.  Been banging my head against the 
>>>>>>> wall
>>>>>>> for about a week.  Part of the problem is my directory structure does 
>>>>>>> not
>>>>>>> look like the authors and so I am not sure I am putting things in the 
>>>>>>> right
>>>>>>> place. When I go searching for another explanation of how to set it up, 
>>>>>>> I
>>>>>>> find that nobody seems to do it the same way.  Also, I find the jargon
>>>>>>> confusing.  At this point I just want to display a simple html page.  If
>>>>>>> this is in the wrong place, maybe someone can direct me to a better one.
>>>>>>>
>>>>>>> --
>>>>>>> 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+unsubscr...@googlegroups.com.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/django-users/fe83a557-759d-460d-96ec-2c7fd18117bb%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/django-users/fe83a557-759d-460d-96ec-2c7fd18117bb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>>
>>>>>> Django is a framework that supports a lot of features, and that means
>>>>>> there's a lot of moving parts.  However, similar to driving a car, you 
>>>>>> need
>>>>>> to know a few things to get things working, rather than knowing the
>>>>>> niceties of how everything works.
>>>>>>
>>>>>> To address your point about project structure, there's a lot of
>>>>>> opinions on this (most of them are subjective). I have a structure I use
>>>>>> and I'm comfortable with, but Django will support some variety in this.
>>>>>>
>>>>>> Without seeing what code you have and what happens that is not
>>>>>> expected, we don't know where we can help.  So, to help us understand, we
>>>>>> need to know a few things.
>>>>>>
>>>>>> 1.  What steps did you take to get here?
>>>>>>
>>>>>> 2..  What goes wrong?  If there's a traceback, copying and pasting it
>>>>>> is invaluable.
>>>>>>
>>>>>> 3.  We may ask to see code.  Again, copying and pasting that will
>>>>>> help us understand what is going on.
>>>>>>
>>>>>> You said that your project isn't working once you get to templates.
>>>>>> Is there a book or tutorial you are following?  That might help us know
>>>>>> where to start.
>>>>>>
>>>>>> In addition to this list, there is a forum at forum.djangoproject.com
>>>>>> (I follow posts in there as well).  That might be another resource for 
>>>>>> you,
>>>>>> as sometimes the question you have has already been answered.
>>>>>>
>>>>>> -Jorge
>>>>>>
>>>>>> --
>>>>>> 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+unsubscr...@googlegroups.com.
>>>>>> To view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/django-users/CANfN%3DK9POCHxkn8-OoU2Yoy3rj%3D%3D9%3DPVOZo0E07fOrPbqcV87w%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/django-users/CANfN%3DK9POCHxkn8-OoU2Yoy3rj%3D%3D9%3DPVOZo0E07fOrPbqcV87w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> 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+unsubscr...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-users/CAM%3DzXYddr_TyXy43rhgtAAfJNJS%3D7D-EE6KngCcyYuhGQ9wXcw%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAM%3DzXYddr_TyXy43rhgtAAfJNJS%3D7D-EE6KngCcyYuhGQ9wXcw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> 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+unsubscr...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CA%2BC7wFQhMzBAWQH-f3N8uxcUYyPtPY8tLLn2Df0eL114DL9%3DQA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CA%2BC7wFQhMzBAWQH-f3N8uxcUYyPtPY8tLLn2Df0eL114DL9%3DQA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAJeZY9eivYpJngtnv8qA4KZDC2aAnWXiQgeoLOFvpVG%2BfP7Qrg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAJeZY9eivYpJngtnv8qA4KZDC2aAnWXiQgeoLOFvpVG%2BfP7Qrg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANfN%3DK-uR4v5o%3Dgw2jomf2PcCQv_qhM-3QfnmTmBSQ92Afe8tw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANfN%3DK-uR4v5o%3Dgw2jomf2PcCQv_qhM-3QfnmTmBSQ92Afe8tw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BC7wFRG5Az-euL0RgV4Kg07dzeOWfCPBptjVcjb6xLHYTajpQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BC7wFRG5Az-euL0RgV4Kg07dzeOWfCPBptjVcjb6xLHYTajpQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAESTON_vz1YnVjOSWVAX-z4qoGz%2B4PmScSOJnyHFtwfkZHPLfg%40mail.gmail.com.

Reply via email to