GithubHelp home page GithubHelp logo

victorperalta / djoser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunscrapers/djoser

0.0 0.0 0.0 1.5 MB

REST implementation of Django authentication system.

License: MIT License

Python 90.35% Makefile 0.21% HTML 3.69% JavaScript 5.75%

djoser's Introduction

djoser

image

image

image

Codacy Badge

image

REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation. It works with custom user model.

Instead of reusing Django code (e.g. PasswordResetForm), we reimplemented few things to fit better into Single Page App architecture.

Developed by SUNSCRAPERS with passion & patience.

image

Requirements

To be able to run djoser you have to meet following requirements:

  • Python (3.7, 3.8, 3.9, 3.10)
  • Django (2.2, 3.1, 3.2, 4.0)
  • Django REST Framework (3.11.1, 3.12.1, 3.13)

If you need to support other versions, please use djoser<2.2.

Installation

Simply install using pip:

$ pip install djoser

And continue with the steps described at configuration guide.

Documentation

Documentation is available to study at https://djoser.readthedocs.io and in docs directory.

Contributing and development

To start developing on djoser, clone the repository:

$ git clone [email protected]:sunscrapers/djoser.git

We use poetry as dependency management and packaging tool.

$ cd djoser
$ poetry install -E test

This will create a virtualenv with all development dependencies.

To run the test just type:

$ poetry run py.test testproject

We also prepared a convenient Makefile to automate commands above:

$ make init
$ make test

To activate the virtual environment run

$ poetry shell

Without poetry

New versions of pip can use pyproject.toml to build the package and install its dependencies.

$ pip install .[test]
$ cd testproject
$ ./manage.py test

Tox

If you need to run tests against all supported Python and Django versions then invoke:

$ poetry run tox -p all

Example project

You can also play with test project by running following commands:

$ make migrate
$ make runserver

Commiting your code

Before sending patches please make sure you have pre-commit activated in your local git repository:

$ pre-commit install

This will ensure that your code is cleaned before you commit it. Some steps (like black) automatically fix issues but the show their status as FAILED. Just inspect if everything is OK, git-add the files and retry the commit. Other tools (like flake8) require you to manually fix the issues.

Similar projects

List of projects related to Django, REST and authentication:

Please, keep in mind that while using custom authentication and TokenCreateSerializer validation, there is a path that ignores intentional return of None from authenticate() and try to find User using parameters. Probably, that will be changed in the future.

djoser's People

Contributors

pszpetkowski avatar dekoza avatar konradhalas avatar haxoza avatar tomwojcik avatar pmlynarek avatar chadys avatar mmarksnippety avatar hawi74 avatar ferndot avatar zefciu avatar hhuseyinpay avatar kevin-brown avatar akalipetis avatar mrouhi13 avatar rugala avatar nikolakadic avatar dependabot[bot] avatar davidtgq avatar decentral1se avatar loop0 avatar sheepyhollow avatar gone avatar andrewmeares avatar ticosax avatar zilehuda avatar superhawk610 avatar gomesmat avatar nschlemm avatar paoli-a 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.