Skip to content

A django website with Facebook and Google login options and database support through models

Notifications You must be signed in to change notification settings

viveakrt/Shoppie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shoppie - Django website

A Shopping website with django.

Click To See django admin: Shoppie

Login for DjangoAdmin
User :vivek
password :weareheros

=======version used=======

python -> 3.5.4
django -> 2.1
pip -> 18.0
virtualenv->16.0.0

=======Frist of all create environment======

cmd -> pip intall virtualenv
cmd -> virtalenv envname
cmd -> cd envname
cmd -> cd scripts
cmd -> activate

=======Now Create A Django project and app======

cmd -> django-admin startproject projectname
cmd -> django-admin startapp appname
cmd -> python manage.py runserver 

=======Link mysql database=======

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'throughdjango',
        'USER': 'root',
        'PASSWORD': '12345',
    }
}

=======Link Installed app=========

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'Home',
]

========Check For correct connection======

(env1) A:\College Project\Django project\shopie>python manage.py shell
Python 3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:17:05) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from django.db import connection
>>> c=connection.cursor()
>>> //if no error means connect successfully

========create models or work with model.py=======

class User(models.Model):           //User changed into table name as Home_User
    Loginas = models.CharField()    //loginas changed in column and char is input type
    Uname = models.CharField()      //Uname changed in column and char is input type
    Password = models.CharField()   //Password changed in column and char is input type
    Email = modles.CharField()      //Email changed in column and char is input type

=======install sqlclient=============

cmd ->pip install pymysql cmd ->pip install --only-binary :all: mysqlclient cmd ->python manage.py check

=========migrations of code=========

for converting or creating or make changes in databases we need to make the migrations using commands
(env1) A:\College Project\Django project\shopie>python manage.py makemigratations
(env1) A:\College Project\Django project\shopie>python manage.py migrate

=========Create SuperUser===============

cmd -> python manage.py createsuperuser

About

A django website with Facebook and Google login options and database support through models

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published