Info
Name | Chapull Market – Exchange Website Python |
Market | codester.com |
Category | Python |
Tags | commerce, django, dynamic- postgresql, Exchange, html, python, template, website |
This website is designed on purpose to help people exchange their items through the website that users.
General Configurations:
* Setup Python and Django
* Configure settings from file [chapullmarket–>settings.py]
Database Settings for Windows OS:
DATABASES = {
‘default’: {
‘ENGINE’: ‘django.db.backends.sqlite3’,
‘NAME’: ‘database.db’,
‘USER’: ”,
‘PASSWORD’: ”,
# Set to empty string for localhost. Not used with sqlite3.
‘HOST’: ”,
# Set to empty string for default. Not used with sqlite3.
‘PORT’: ”,
}
}
Database Settings for Linux OS:
You can use PostgreSQL. First create database:
sudo -u postgres -g postgres psql < DROP DATABASE IF EXISTS chapullmarket;
DROP ROLE IF EXISTS chapullmarket;
CREATE ROLE chapullmarket PASSWORD ‘chapullmarket’
NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT LOGIN;
CREATE DATABASE chapullmarket OWNER chapullmarket;
EOF
Configure database settings from file [chapullmarket–>settings.py]:
DATABASES = {
‘default’: {
# Using PostgreSQL.
‘ENGINE’: ‘django.db.backends.postgresql_psycopg2’,
‘NAME’: ‘chapullmarket’,
‘USER’: ‘chapullmarket’,
‘PASSWORD’: ‘chapullmarket’,
‘HOST’: ‘localhost’,
‘PORT’: ”,
}
}
Set project and Synchronize Database:
Enter project directory from Commandline or Terminal and follow instructions:
* virtualenv chapullmarketenv
* source chapullmarketenv/bin/activate
* pip install -r Requirements.txt
* python manage.py syncdb
Start and Run:
Enter project directory from Commandline or Terminal and follow instructions:
* python manage.py runserver [host addreset ex: 0.0.0.0:8000]