Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Latest commit

 

History

History
32 lines (17 loc) · 1.51 KB

README.rst

File metadata and controls

32 lines (17 loc) · 1.51 KB

Generic Filtering Example Project

A quick and dirty Django project to illustrate an approach to generic filtering that can be used throughout a Django project to ensure that views and other business logic are easily restricted by the currently logged in user.

This is a complement to the presentation: Reusable filtering for Django and DRF

It is mostly for illustrative purposes, but if you do wish to run it yourself you will need to follow this process:

  1. Clone this repo locally with git clone [email protected]:commoncode/filtering-example.git
  2. Change into the locally checked out folder cd filtering-example
  3. Create and activate a python virtualenv (e.g. python3 -v venv filtering_venv && source filtering_venv/bin/activate)
  4. Install the requirements with pip install -r requirements.txt
  5. Run migrations pracman/manage.py migrate
  6. Create a super user with pracman/manage.py createsuperuser
  7. Start dev server pracman/manage.py runserver

Once the above has been completed you should be able to login into admin using: http://127.0.0.1:8000/admin

The following REST endpoints are also available: