What order do you take,
To create a page.html to show up?
Is it a View, Model, ect? What?
For further actions, you may consider blocking this person and/or reporting abuse
What order do you take,
To create a page.html to show up?
Is it a View, Model, ect? What?
For further actions, you may consider blocking this person and/or reporting abuse
Philip Thomas -
Kevin Meneses González -
Omar Urbano | LightningChart -
Lakshmi Pritha Nadesan -
Top comments (5)
It's been a while since I dabbled with dJango. But IIRC:
Models are your interface to the database and not really necessary for a "Hello World" type of page.
What I would do is create a single stub view. It would look for a context variable and use that to create or modify a text string.
Then I would create the URLS and they all call the stub.
So, short answer Views and URLS first. Models next (completely the opposite of how the django tutorial presents it.
I'm assuming this page.html requires models since you are using django.
My own way doing it is, I create a model first then views then urls.
But there are other methodologies justified by the philosophy of some programmer/s.
Some codes in the Test Driven Development (TDD) approach, Behavior Driven Development (BDD), to name a few.
If you are interested in these, I think you can pick a good book at Amazon.
First create the URL, next create the view and if You need a model then you create that
I’ve created urls, for a httprequest, it worked when I had a “
home page<\h1>”,
But when I tried to have a home.html page render.... it doesn’t show
My manage.py is at the bottom and I don’t have a duplicate name of a folder. I made a folder first and then ran the commands