Skip to content

abiudrn/Django_Start

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Start Project
===================================================
$ django-admin startproject aura_cms


Runserver
===================================================
$ python manage.py runserver


Creating App
===================================================
$ python manage.py startapp cms


Connecting to MySQL_Db
===================================================
In CMD

pip install wheel
pip install pymysql


In settings.py

import pymysql
pymysql.install_as_MySQLdb()


DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'cms',
        'HOST': 'localhost',
        'PORT': '3306',
        'USER': 'root',
        'PASSWORD': '',
    }
}

Creating Models
===================================================

Change your models (in models.py).

Include App('blog') in the settings.py

Run python manage.py makemigrations blog - to create migrations for those changes
Run python manage.py migrate - to apply those changes to the database.


Creating an Admin User
===================================================

$ python manage.py createsuperuser

from .models import Post - add on admin.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 31.2%
  • JavaScript 30.7%
  • HTML 26.3%
  • Python 11.8%