All Projects → CleitonDeLima → Django Login Required Middleware

CleitonDeLima / Django Login Required Middleware

Licence: mit
Requires login to all requests through middleware.

Programming Languages

python
139335 projects - #7 most used programming language
python3
1442 projects

Projects that are alternatives of or similar to Django Login Required Middleware

Django Channels React Multiplayer
turn based strategy game using django channels, redux, and react hooks
Stars: ✭ 52 (+160%)
Mutual labels:  middleware, django
Everbug
Django debug tool for browser
Stars: ✭ 114 (+470%)
Mutual labels:  middleware, django
Django Compression Middleware
Django middleware to compress responses using several algorithms.
Stars: ✭ 23 (+15%)
Mutual labels:  middleware, django
Middlewares
💥 Middlewares / Relay / PSR-7 support to Nette Framework (@nette)
Stars: ✭ 13 (-35%)
Mutual labels:  middleware
Shardingsphere Elasticjob
Distributed scheduled job framework
Stars: ✭ 7,369 (+36745%)
Mutual labels:  middleware
Georide Position
get the last day deplacement of the georide tracker
Stars: ✭ 15 (-25%)
Mutual labels:  django
Django Domande
[UNMAINTAINED] A plugable Django app to represent generic questions on forms.
Stars: ✭ 15 (-25%)
Mutual labels:  django
Redux Dynamic Modules
Modularize Redux by dynamically loading reducers and middlewares.
Stars: ✭ 874 (+4270%)
Mutual labels:  middleware
Timed Backend
Django API for the Timed application
Stars: ✭ 15 (-25%)
Mutual labels:  django
Django Bootstrap4
Bootstrap 4 integration with Django.
Stars: ✭ 877 (+4285%)
Mutual labels:  django
Contributr
An online tool for programmers to find projects they can contribute to and project maintainers to find contributors.
Stars: ✭ 14 (-30%)
Mutual labels:  django
Djangoffice
Project management/CRM for small offices - Clients, Jobs, Tasks, Rates, Activities, Timesheets, Contacts, Invoices etc. etc.
Stars: ✭ 13 (-35%)
Mutual labels:  django
Bootcamp Kodluyoruz Org
Kodluyoruz.org icin Gelistirilen BootCamp Altyapisi
Stars: ✭ 15 (-25%)
Mutual labels:  django
Django Suit Daterange Filter
Filter for django-admin allowing lookups by date range
Stars: ✭ 13 (-35%)
Mutual labels:  django
Gentleman
Full-featured, plugin-driven, extensible HTTP client toolkit for Go
Stars: ✭ 886 (+4330%)
Mutual labels:  middleware
Carter
Carter is framework that is a thin layer of extension methods and functionality over ASP.NET Core allowing code to be more explicit and most importantly more enjoyable.
Stars: ✭ 875 (+4275%)
Mutual labels:  middleware
Drf Tus
A Tus (tus.io) library for Django Rest Framework
Stars: ✭ 15 (-25%)
Mutual labels:  django
Channelslightscontrol
Demo app with Django Channels to control Lights over websockets. Made for PyStPete meetup(https://www.meetup.com/Saint-Petersburg-Python-Meetup/).
Stars: ✭ 14 (-30%)
Mutual labels:  django
Blazar
Pre-Render Pages on the Fly in Laravel
Stars: ✭ 14 (-30%)
Mutual labels:  middleware
Grpc Tools
A suite of gRPC debugging tools. Like Fiddler/Charles but for gRPC.
Stars: ✭ 881 (+4305%)
Mutual labels:  middleware

django-login-required-middleware

Tests Coverage Status PyPI Version PyPI downloads

django-login-required-middleware provide login to all requests through middleware.

If the website has many views and almost all use LoginRequiredMixin or the login_required decorator, using django-login-required can keep the code of your views more clear and avoids forgetting authentication of view.

Requirements

  • Python: 3.6, 3.7, 3.8
  • Django: 1.11, 2.0, 2.1, 2.2, 3.0x

Quick start

  1. Install pip install django-login-required-middleware

  2. Add login_required.middleware.LoginRequiredMiddleware to MIDDLEWARE after django.contrib.auth.middleware.AuthenticationMiddleware

  3. (Optional) Add LOGIN_REQUIRED_IGNORE_PATHS setting.
    Any requests which match these paths will be ignored. This setting should be a list filled with regex paths (settings.LOGIN_URL always included).

    Example:

    LOGIN_REQUIRED_IGNORE_PATHS = [
        r'/accounts/logout/$'
        r'/accounts/signup/$',
        r'/admin/$',
        r'/admin/login/$',
        r'/about/$'
    ]
    
  4. (Optional) Add LOGIN_REQUIRED_IGNORE_VIEW_NAMES setting. Any requests which match these url name will be ignored. This setting should be a list filled with url names.

    Example:

    LOGIN_REQUIRED_IGNORE_VIEW_NAMES = [
        'home',
        'login',
        'admin:index',
        'admin:login',
        'namespace:url_name',
    ]
    
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].