Django
Django
What Is Django?
• URL Routing
Create Project and App
The file system you want to store the code (in the virtual environment)
2. Views are python functions that take http requests and return http
response, like html documents.
•
Example Code Using Forms
Forms are used for taking input from the user in some manner and using that information
for logical operations on databases. Creating Forms
Views
A form comes with 3 in-built methods
that can be used to render Django form
fields.
•{{ form.as_table }} will render them
as table cells wrapped in <tr> tags
•{{ form.as_p }} will render them
wrapped in <p> tags
•{{ form.as_ul }} will render them
wrapped in <li> tags
Templates :home.HTML
{% csrf_token %}
{{form }}
</form>
Models
ModelForm is a class that is used to directly convert a model into a Django
form.
OUTPUT
Thankyou