Created
January 25, 2022 03:56
-
-
Save erwinagpasa/4eb738257b6b1cd32f7b954ee093092a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# graphr | |
1. Make sure you have Mysql up and running. | |
2. Create a folder "graphr" go inside. | |
3. Install pipenv Run: pip install pipenv. | |
4. From "graphr folder" Run: pipenv shell (to activate the python environment). | |
5. To check what's already installed Run: pip list | |
6. Install Django Run: pip install django | |
7. Install MySQL Client Run: pip install mysqlclient. | |
8. Now create a project Run: django-admin startproject "graphr_core" (or any folder/project name) | |
9. Go inside the project folder edit settings.py to edit the database config. | |
10. Inside the project Run: python manage.py migrate (to migrate the table in your mysql database) | |
11. Run python manage.py runserver | |
12. Creating admin user Run: python manage.py createsuperuser | |
#MySQL Commands | |
Setting username | |
Type mysql in the terminal | |
mysql -u yourusername -p | |
``` | |
password: | |
``` | |
To use the database | |
mysql> create database database_name; | |
mysql> use database_name; | |
mysql> show table |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment