Git Product home page Git Product logo

user-registration-and-login-system's Introduction

User-Registration-and-Login-system

a user registration and login logout system using Django and Postgresql Database

Initialize the project

Create and activate a virtualenv:
  1. virtualenv venv. This will a create a vitual environment called "venv" that helps with controlling dependencies.(For windows run mkvirtualenv venv)
  2. source venv/bin/activate. (For windows run workon venv)
Install dependencies:

(while in the activated virtual environment)

pip install -r requirements.txt

NOTE: After installing dependencies, pip-tools is also installed. You can now use it to manage package dependencies of your project.

Add a new package to requirements.txt and run the following command to auto-update requirements.txt file

pip freeze > requirements.txt

Run the following command to sync your virtualenv

pip-sync

This will install/upgrade/uninstall everything necessary to match the requirements.txt contents.

Migrate, create a superuser, and run the server:
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver

PostgreSQL Setup

  1. Download postgresql setup form https://www.postgresql.org/download/
  2. Download pgadmin setup from https://www.pgadmin.org/download/
  3. Start pgadmin and make a new database.

Security settings for Postgresql

There are a couple of security settings to setup manually. Open the DjangoProject/settings.py file and change USER and PASSWORD here:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'database name',              #change this with your database name   
        'USER': 'postgres',                   #change this with your postgresql username. default is 'postgres'
        'PASSWORD': 'postgresql password',    #change this with your postgresql password
        'HOST': 'localhost',
    }
}

user-registration-and-login-system's People

Contributors

amangupta0709 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

user-registration-and-login-system's Issues

CSRF token invalid

When we reload the page once we sign in then it gives an error "CSRF verification failed. Request aborted".
CSRF Issue

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.