Giter Site home page Giter Site logo

egorsmkv / simple-django-login-and-register Goto Github PK

View Code? Open in Web Editor NEW
818.0 818.0 430.0 2.78 MB

An example of Django project with basic user functionality.

License: BSD 3-Clause "New" or "Revised" License

Python 70.76% CSS 0.04% JavaScript 1.52% HTML 27.69%
bootstrap django django-bootstrap4 django-login django-registration python python3

simple-django-login-and-register's Introduction

Simple Django Login and Registration

An example of Django project with basic user functionality.

Screenshots

Log In Create an account Authorized page
Password reset Set new password Password change

Functionality

  • Log in
    • via username & password
    • via email & password
    • via email or username & password
    • with a remember me checkbox (optional)
  • Create an account
  • Log out
  • Profile activation via email
  • Reset password
  • Remind a username
  • Resend an activation code
  • Change password
  • Change email
  • Change profile
  • Multilingual: English, French, Russian, Simplified Chinese and Spanish

If you need dynamic URLs with the language code, check out https://github.com/egorsmkv/simple-django-login-and-register-dynamic-lang

Installing

Clone the project

git clone https://github.com/egorsmkv/simple-django-login-and-register
cd simple-django-login-and-register

Install dependencies & activate virtualenv

Create a virtualenv using conda (optional)

conda create -n simple-django-login-and-register python=3.11

conda activate simple-django-login-and-register

Install dependencies

pip install -U poetry

poetry install
poetry shell

Configure the settings (connection to the database, connection to an SMTP server, and other options)

  1. Edit source/app/conf/development/settings.py if you want to develop the project.

  2. Edit source/app/conf/production/settings.py if you want to run the project in production.

Apply migrations

python source/manage.py migrate

Collect static files (only on a production server)

python source/manage.py collectstatic

Running

A development server

Just run this command:

python source/manage.py runserver

simple-django-login-and-register's People

Contributors

dependabot[bot] avatar egorsmkv avatar hanwentao avatar javier747belbruno avatar terminalfi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-django-login-and-register's Issues

Add checks when a user authenticated

Like in SignInView

    def dispatch(self, request, *args, **kwargs):
        # Do not show the sign in page if user already authenticated
        if request.user.is_authenticated:
            return redirect('index')

MultipleObjectsReturned on ResendActivation

Since you are using either username or email to log in, and no unique constraint is set, there are possibilities of having multiple users with the same credentials.

In my case, first I registered through the website which created a normal user. I then needed a superuser to check if everything was working as intended and I used the same email for both. But, once the accounts were created, if I use my email as an input, this error is thrown since get() only works if the QuerySet has one object but I had two. I think you might need to account for such a case as well. Thank you!

Fix the translation line

письмо, пожалуйста проверь папку спама или удостоверьтесь

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.