1👍
https://docs.djangoproject.com/en/1.8/intro/tutorial01/, you have a lot to learn my friend but this tutorial will teach you how to get setup/install Django and give you a good base to start up with. Good luck with learning my man, any questions just comment below. BTW what you just did was not even Django at all, it was just starting a local webserver in python.
0👍
Obviously, teaching yourself is the hardest way to learn any skill. If you really do want to learn django, or anything else life, you’re going to have to commit yourself, be patient, and ready to fail.
If you’re really serious about this, I would work through the Django Book. This covers every aspect of django to get you started.
You’re going to run into problems early and often. When you do so, stop and consort the docs, never be afraid to look directly at the source code and as always, come to SO with specific questions.
To answer you’re more specific question, Django is nice in the fact that it hides all of the code you have above. For instance, once you have it configured, the line below will start a local server and you’ll be able to interact with your web app through a web browser.
python manage.py runserver
- How do i setup django in wamp?
- Updating template view with error message in django
- Running code on Django application start
- String not matching in django/python
- How do I create an additional non-model CharField for a DRF 3 serializer?
0👍
Looks like you’re trying to execute the python script directly from browser.
First you must call the script from the command-line, then check the address on browser.
Also, you need to call the playServer()
method at the end of the file to start the HTTP server.
then go the the address:port on your browser. It’ll look something like this:
Now about the second question,
I’ll highly recommend you to start with Flask instead of Django.
It’s simpler than django and best for beginners, and does less magic.
Also, as soon as you’re comfortable with flask, you can easily move to django and have more fun while playing with it thereafter.
- Django FieldError at / Unknown field(s) (type) specified for Model
- Combining a Django model + modelform as a single unit
- Getting javascript array from django json dumped dictionary
- Django limit_choices_to on ManyToMany related with Inline
- Nginx does not forwards remote address to gunicorn