项目作者: omkar-hardwell

项目描述 :
Django web application
高级语言: Python
项目地址: git://github.com/omkar-hardwell/django-crud.git
创建时间: 2018-07-07T09:52:16Z
项目社区:https://github.com/omkar-hardwell/django-crud

开源协议:

下载


django-crud

This is the web application to manage Department and Employee details.

Installation

The installation is very straightforward and make sure you are using at least python 3.6.x and later.
Make sure pip setuptool is installed with python package.

Create virtual environment using following commands.

  1. $ cd django-crud
  2. $ pip install virtualenv
  3. $ virtualenv env

Activate virtual environment.

Linux or Mac

  1. $ source env/bin/activate

OR

Windows

  1. $ env\Scripts\activate

Deactivate virtual environment.

  1. (env) $ deactivate

Install dependencies/packages.

  1. (env) $ pip install -r requirements.txt

Install mysqlclient to connect MySQL database.

Add mysqlclient to requirements.txt

Note(Windows): Requires Microsoft Visual C++ 14.0)

or

Run following command to install mysqlclient system wide.

  1. $ pip install --only-binary :all: mysqlclient

Migration

Set environment variables (like, Database credentials etc.)

The migrate looks at the INSTALLED_APPS setting and creates any necessary database tables according to the database settings in your settings.py file and the database migrations.

Run following commands.

  1. (env) $ python mywebapps/manage.py migrate
  2. (env) $ python mywebapps/manage.py makemigrations crudwebapp
  3. (env) $ python mywebapps/manage.py migrate

Running

When all dependencies installed and configurations are set, run the application.

  1. (env) $ python mywebapps/manage.py runserver

Access application by entering http://127.0.0.1:8000/ or http://localhost:8000/ url on browser.

Creating an admin user follow this steps.

Access admin panel http://127.0.0.1:8000/admin/ or http://localhost:8000/admin/ url on browser.

Testing

Note: Test cases are pending.

For style guide enforcement (flake8)

  1. (env) $ flake8 file_path/

References