I am learing from there : Python and Django Full Stack Web Developer Bootcamp
My learing app is hosted here : Practise App in Pythonanywhere
- install conda (miniconda or anaconda)
conda create --name env_name django
conda activate env_name
- Check virtual environment list :
conda info --envs
- Viewing a list of the packages in an environment :
conda list -n envirnment_name
or- Activate the envirment :
conda activate env_name
pip list
- Activate the envirment :
-
django-admin startproject project_name
-
cd project_name
python manage.py startapp app_name
start project : python manage.py runserver
python manage.py migrate
python manage.py makemigrations app_name
python manage.py migrate
python manage.py createsuperuser
- install crispy :
pip install django-crispy-forms
- Documentation
- install Bcrypt :
pip install bcrypt
- install Django Argon :
pip install argon2-cffi
- install python imaging library :
pip install pillow
- Getting Started
- Form and field validation
- Validators
- clean
- Model field reference
- Custom Template
- The Django template language
- Django’s Templates
- #27956 closed Bug (fixed)
- Template Filter
- Built-in filter reference
- Writing custom template filters
- How to Use Bootstrap 4 Forms With Django
- form.as_p
- Password Authentication
-
from django.conf.urls import url
vsfrom django.urls import path
: url and path are not same ! -
Django 2.0 removes the
django.core.urlresolvers
module, which was moved todjango.urls
in version 1.10. You should change any import to usedjango.urls
instead, like this:from django.urls import reverse
-
In
OneToOneField()
andForeignkey()
:on_delete=models.CASCADE
field is required! -
use
from django.contrib.auth.views import LoginView
insted offrom django.contrib.auth import views
and useLoginView.as_view()
in the urlpattern insted of 'views.login'