Posted under » Django on 23 April 2021
By now, you should have install venv and under this environment you have installed django.
First go to your webroot folder and
$ django-admin.py startproject students #v3 $ django-admin startproject students #4
If you intend to use apache then configure WSGI.
2nd you want to create a superuser.
While still under the venv environment, go the webroot folder
$ python manage.py createsuperuser
You may have this error so please comply.
You have 18 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them.
You will be prompted for a username, an email address, and a password for your user.
Next we will migrate from SQLite to MySQL. You should already have installed MySQLclient. Create database and user. Add the mysql bit in settings.py.
$ sudo systemctl daemon-reload $ sudo systemctl restart mysql
We need to verify that the configurations in Django detect your MySQL server properly. Run this.
$ python manage.py migrate
Now go the the website URL and see if everything works.