An open API service indexing awesome lists of open source software.

https://github.com/itsvinayak/user_login_and_register

user login and register system in django
https://github.com/itsvinayak/user_login_and_register

django django-framework docker geeksforgeeks geeksforgeeks-python geeksforgeeks-solutions login login-system register user users virtualenv

Last synced: 8 months ago
JSON representation

user login and register system in django

Awesome Lists containing this project

README

          

# User login and register system implementation in django
![](https://img.shields.io/github/repo-size/itsvinayak/user_login_and_register.svg?label=Repo%20size&style=flat-square) ![contributions welcome](https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)
  [![Run Python black code formatter](https://github.com/itsvinayak/user_login_and_register/actions/workflows/main.yml/badge.svg)](https://github.com/itsvinayak/user_login_and_register/actions/workflows/main.yml)

Django is an open-source python web framework used for rapid development, pragmatic, maintainable, clean design, and secures websites. A web application framework is a toolkit of all components need for application development. The main goal of the Django framework is to allow developers to focus on components of the application that are new instead of spending time on already developed components. Django is fully featured than many other frameworks on the market. It takes care of a lot of hassle involved in the web development; enables users to focus on developing components needed for their application.

Django by default provides an authentication system configuration. User objects are the core of the authentication system.today we will implement Django’s authentication system.

django based login,logout and register system [django docs on auth system](https://docs.djangoproject.com/en/2.2/topics/auth/default/)

---

learn how to make on geeksforgeeks : https://www.geeksforgeeks.org/django-sign-up-and-login-with-confirmation-email-python/

![beginner-friendly](https://img.shields.io/badge/beginner%20friendly-django%20project%20-green)
---

## Virtualenv & Dependencies

create a virtualenv and run requirements.txt

virtualenv

pip install virtualenv

what is virtual environment ?

A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. This is one of the most important tools that most of the Python developers use.


read more...

to run requirements.txt

$ pip install -r requirements.txt

here env/ folder contains all dependencies

## Use docker to run

How to Install and Configure Docker in Ubuntu?

Dockerizing a simple Django app

pull docker image using

$ sudo docker pull itssvinayak/user_login_and_register:latest

run docker file using

$ sudo docker run -p 8000:8000 user_login_and_register

## Running locally



  1. clone repository
    $ git clone https://github.com/itsvinayak/user_login_and_register.git



  2. make database settings and connect it to your local database
    $ cd ./user_login_and_register/project 

    open settings.py file

    DATABASES = {
    "default": {
    "ENGINE": "django.db.backends.mysql",
    "NAME": "iert",
    "USER": "root",
    "HOST": "localhost",
    "PASSWORD": "vinayak",
    "PORT": "3306",
    "OPTIONS": {"sql_mode": "traditional"},
    }
    }

    set this part according to needs.


  3. run migrations
    $ python manage.py migrate



  4. now, runserver
    $ python manage.py runserver


![alt text](https://github.com/itsvinayak/user_login_and_register/blob/master/Screenshot%20from%202019-07-23%2007-26-47.png)

---

### Implement Token Authentication using Django REST Framework

Token authentication refers to exchanging username and password for a token that will be used in all subsequent requests so to identify the user on the server side.This article revolves about implementing token authentication using Django REST Framework to make an API. The token authentication works by providing token in exchange for exchanging usernames and passwords.

---
install django rest_framework

$ pip install djangorestframework

read more at geeksforgeeks

---

![login](https://github.com/itsvinayak/user_login_and_register/blob/master/Screenshot%20from%202019-07-23%2007-27-12.png)

## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fitsvinayak%2Fuser_login_and_register.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fitsvinayak%2Fuser_login_and_register?ref=badge_large)

# Errors

## error when trying to migrate or attempting to runserver

Simply try "python3 manage.py migrate" or "python3 manage.py runserver" instead

or

Django is not installed (or installed properly)