A simple app to manage newsroom staff assignments.
Project description
django-assignment-desk
django-assignment-desk
is a simple Django app to store and manage weekly editorial staff assignments.
It depends on a staff list (such as the one provided by django-editorial-staff
), and returns a rich API that can be queried by any number of consumers (we're using it to feed both a read-only web interface and a chatbot).
This app uses django.contrib.postgres
; therefore _it requires a PostgreSQL database and a Python-to-Postgres adapter like psycopg2
or psycopg2-binary
to run.
More detailed documentation will be added at a later date.
Quick start
-
Install this app:
pip install django-assignment-desk
-
Add six entries (four helper apps, "editorial_staff" and "assignment_desk") to your INSTALLED_APPS setting (in
settings.py
) like this:INSTALLED_APPS = [ ... 'django.contrib.humanize', ... 'bootstrap3', 'colorfield', 'rest_framework', ... 'editorial_staff', 'assignment_desk', ]
NOTE: If you already installed
django-editorial-staff
, you may have a number of these in yourINSTALLED_APPS
setting already. They only need to be listed once. -
Add (or update) the following lines to your
settings.py
file (to configure form rendering):BOOTSTRAP3 = { 'field_renderers': { 'default': 'bootstrap3.renderers.FieldRenderer', 'inline': 'bootstrap3.renderers.InlineFieldRenderer', 'immaterial': 'assignment_desk.field_renderers.ImmaterialFieldRenderer', }, }
NOTE: Again, these lines only need to be listed once. If you already had similar lines, replace them with the version written here.
-
Include the editorial_staff and assignment_desk URLconfs in your project's urls.py like this:
url(r'^staff/', include('editorial_staff.urls')), url(r'^assignments/', include('assignment_desk.urls')),
-
Run
python manage.py migrate
to install the data models into your database.NOTE: As mentioned above, this command will fail if you're not using a PostgreSQL database.
-
Start the development server and visit http://127.0.0.1:8000/assignments/ to start editing assignments.
Configuration
You can specify the following configuration options in your project's settings.py
file. All are optional:
Setting name | Intended value(s) | Purpose |
---|---|---|
ASSIGNMENT_DESK_LOGOUT_URL |
Any reversible URL pattern | If set, includes a "log out" link in the navigation on each django-assignment-desk page. |
ASSIGNMENT_DESK_DAY_INTERVAL |
Integer (default is 7) | How many days should be included in an assignment list. |
Front-end development
django-assignment-desk
front-end pages are built using ES6 and SCSS, and this app includes a Gulp installation that converts files written in these dialects to plain JavaScript and CSS, respectively.
When developing on the front-end, you'll need to run this Gulp installation yourself. Follow these steps to get started.
-
Open a terminal window and navigate to the root of this app.
-
Within the app, navigate to
./assignment_desk/staticapp
. -
If this is your first time running Gulp on this project, run
npm install
to install JS dependencies. This may take several minutes. -
Once your dependencies are installed, run
gulp
to begin local development. -
When your Gulp server says it's up and running, visit http://127.0.0.1:3000/assignments/ for a live preview of your front-end files.
-
Proceed to modify your front-end interface by changing files in
./assignment_desk/staticapp/scss/
and./assignment_desk/staticapp/js/
. Your changes will be applied to the Gulp server URL without the need for to reload the page manually.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django-assignment-desk-0.1.7.tar.gz
.
File metadata
- Download URL: django-assignment-desk-0.1.7.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cd012007d9e2fd073738ae28f7145f604da0565cf23be096ac8fa91b0d38b50d |
|
MD5 | b3b05b7430a0d4a76c5961438f6c5b52 |
|
BLAKE2b-256 | 2b20aec5d0614c900d2c06e3ef49698c30361aa8571577f00cddd3ea5d0db102 |
File details
Details for the file django_assignment_desk-0.1.7-py2.py3-none-any.whl
.
File metadata
- Download URL: django_assignment_desk-0.1.7-py2.py3-none-any.whl
- Upload date:
- Size: 2.2 MB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00ed83adc9d16d7c64a066e1787d98ebf54bacabe0e74b527de618bc0e6fbc26 |
|
MD5 | 1367fa9505f367e3a9abc5119d7f54c7 |
|
BLAKE2b-256 | 7e8e8eb831ccaac658c2125ad1eeb809948ab2cf6afe124733b4e00929e00f75 |