Beginner Approach to Django Project Structure
Ruth Ikegah (~ruth76) |
The Django project structure (a web framework) is based on the M-V-T (Model-View-Template) software design pattern. The model is what handles or maintains your data in the form of a database (generally relational databases) such as MySQL, Postgresql). Models deals with database operations like creating and updating tables, fetching, and updating data. The View is what presents the model to the user as an HTTP response( results of your web search ‘beautiful cities’). It takes a web request and returns a web response. The Template: Django mainly functions with backend so to present it better to the user and provide a layout for the website, it makes use of templates.
When a project is started in Django, it comes with a default app containing some pretty cool files: Settings.py, urls.py, views.py, etc. Now each of these files has functions, some of which you should not edit or change.
This talk will explain what each of the files does, why it is there, and how to use them, as understanding the structure of a framework is really necessary to better web development
The attendees should know:
- Basics of Python
This is my blog series on Python and Django : here
I'm Ruth Ikegah from Nigeria, Africa. BSc.Microbiology, currently doing cool stuff with Python and Django (beginner level), a beginner Open-source advocate, lover and enthusiast, a people's person, and I am in love with cakes.