Skip to content

easily switch between django users for dummy content creation for newly built crud apps

Notifications You must be signed in to change notification settings

jeffisabelle/django-session-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-session-switcher

django-session-switcher allows you to quickly switch between dummy users. Handy tool to create dummy content for your side projects from multiple users.

Usage

  1. Install the package
pip install django-session-switcher
  1. Add django_session_switcher to your INSTALLED_APPS settings.
INSTALLED_APPS = [
    ...,
    "django_session_switcher",
]
  1. Add the middleware to your project
MIDDLEWARE = [
    ...,
    "django_session_switcher.middleware.SessionSwitcherMiddleware",
]
  1. Include the django_session_switchers URLconf in your project urls.py like this
path("__dss__/", include("django_session_switcher.urls")),
  1. Run python manage.py migrate to create the models.

  2. You need to add the dummy users to the django_session_switcher's Session User model. You can do this through django admin.

  3. Once you have added some users to Session User you will be able to switch between added users with a single click.

About

easily switch between django users for dummy content creation for newly built crud apps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published