Coder Social home page Coder Social logo

django-student-management-sytem-'s Introduction

Django Toy Project

A simple CRUD project using the django framework

This repo consists of a source code of a python script and SQLAlchemy to make an interactive student management system using Django framework

How is it done?

You might be wondering that how the application performs many operations like creation, deletion, and update of assignments. Well, it was not that complicated as you may think. All these were achieved with the help of Database operation.

We all know that computers can store and retrieve data easily, so in order to do this operation, we used the Database. We have used queries to pick and formulate the data in a specific structure from Database. This repo consists of a basic example of how to do that.

Getting start

To get started with the code on this repo, you need to either clone or download this repo into your machine just as shown below;

git clone [email protected]:mountblue/cohort-16-python/gopinath_v/django-toy-project.git

Running the App

Part 1: Create Database and virtualenv

Create Database

$ sudo -u postgres psql
postgres=# \i create_db.sql
postgres=# \q

Install the virtualenv package

$ pip install virtualenv

Create the virtual environment

To create a virtual environment, you must specify a path. You may provide any name in the place of :

$ virtualenv <mypython>

Activate the virtual environment

$ source mypython/bin/activate

Now you can load the requirements.txt.

Dependencies

Before running the application, you need to have some packages preinstalled. So I have provided all the required packages and their versions in requirements.txt file by running the below command you will be able to install all the packages.

$ pip install -r requirements.txt

Part 1: Create and provide information to .env file.

To run this, you need to create and provide the environment values in .env file.

Move to project directory

$ cd django-toy-project

Create .env file

create a .env file inside studentapp folder

$ cd studentapp
$ touch .env

provide these information inside .env file.

EMAIL_USER=YOUR_EMAIL_ID
EMAIL_PASSWORD=YOUR_PASSWORD
SECURITY_KEY=GENERATED_ONE
NOTE: Do not provide space inbetween = and key,value inside .env file

open the terminal

SECRET_KEY generation

$ python3
>>> import secrets
>>> secrets.token_hex(16)

Provide email id and password in .env file.

for creating and accessing admin operations create superuser

python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py createsuperuser
Note: provide your username and password in required place to create admin user.

Part 3: Running the application on server

$ python3 manage.py runserver

Now you can access the app on your local server

Deactivate the virtual environment

if you have followed step1, use this command to get out of virtualenv

$ deactivate

Delete Database

$ sudo -u postgres psql
postgres=# \i delete_db.sql
postgres=# \q

django-student-management-sytem-'s People

Contributors

mukund-mountblue avatar

Watchers

Gopinath V avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.