Jul 3, 2024
studybud.dev
.python --version
). Update if necessary.pip install virtualenv
, virtualenv env
, env\Scripts\activate
.pip install django
.python manage.py startproject
, runserver
, startapp
.base
. Configured in settings.urls.py
.urls.py
for better organization.settings.py
(e.g., templates
folder).render
method in views to render html
templates.render(request, 'home.html')
.main.html
with navigation and base structure, extend in other templates.Room
and Message
models with relationships (ForeignKey).python manage.py makemigrations
, migrate
.admin.site.register(ModelName)
).Room
and Message
models in admin.py
.Model.objects.all()
, filter()
, get()
, exclude()
, etc.POST
method, validate, save data, and redirect.Room
model.@login_required
for route protection.icontains
lookup).settings.py
(static and media roots).{% static 'path/to/file.css' %}
).