Coder Social home page Coder Social logo

sushilkanathia / registration-form Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.46 MB

In This Project, I have used Django Frame to Create an webpage. Creating an Login Page, Logut page and Registration page. django have default database db.sqlite which i used to store all data.

Python 80.14% CSS 0.20% HTML 18.64% Dockerfile 1.01%
bootscrap django-framework git html python sqlite

registration-form's Introduction

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.

step1- Create an Project using Command: $ django-admin startproject (projectname)

They create an directory name as project name. In projectname folder there are few files are created that is . _init.py . setting.py . urls.py . wsgi.py . manage.py

From all for these files two files are main and mostly used in this project that is . urls.py . setting.py . manage.py

Step2:- Run the server . To run the server we have to stay in the same directory and run the command:

$ py manage.py runserver

After this execution, it show's a utls and that url shows the django successfully working web page.

Step3:- Create an app for our Project. In django project app is used to provide the functionality to our webpages. how link works

$

py manage.py startapp appname

After Creating an app folder first thing is to do is add app name in the project setting.py folder under INSTALLED APPS section.

In django,build in sqlite database that store all data in the admin panel.

I have also shared the screenshots for the same.

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


beginner-friendly

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.

to run requirements.txt

$ pip install -r requirements.txt

here env/ folder contains all dependencies

Use docker to run

Running locally

 make database settings and connect it to your local database
<pre>$ cd ./user_login_and_register/project </pre>
open <b>settings.py</b> file
<pre>
  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.
run migrations

$ python manage.py migrate

now, runserver
$ python manage.py runserver

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

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)

registration-form's People

Contributors

sushilkanathia avatar

Watchers

 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.