This app is used to collect URLs for projects. Projects can declare certain metadata fields to be included in the information provided with each URL nomination. The URLs themselves are collected through nominations, which are entered by individuals who believe that URL to be somehow related to the project. Each project then maintains a list of URLs which are scored based on whether nominators deem those URLs to be in-scope or out-of-scope for the current project. Reports are automatically generated for each project and show overall URL scores, how many nominations each has received, which URLs were nominated by person or institution, etc.
UNT Libraries developed this app to determine which URLs to harvest in web crawls for certain archival projects.
- Python 3.8-3.10
- Django 4.2
-
Install from GitHub.
$ pip install git+git://github.com/unt-libraries/django-nomination.git
-
Add nomination to INSTALLED_APPS.
INSTALLED_APPS = ( 'django.contrib.admin', 'nomination', )
-
Add the URL patterns.
urlpatterns = [ path('admin/', admin.site.urls), path('nomination/', include('nomination.urls')), ]
-
Run the migrations.
$ python manage.py migrate
-
Change the contact information shown in the app by overriding the
contact_info.html
template.
-
Install Docker Compose.
$ pip install docker-compose
-
Clone the repository.
$ git clone https://github.com/unt-libraries/django-nomination
-
Start the container as a daemon.
$ docker compose up -d # Use 'docker compose stop' to stop the container.
At this point you should be able to access your local instance of the site by visiting
<dockerhost>:8000/nomination/
. -
Create a superuser for access to the admin sites.
$ docker compose run --rm web python manage.py createsuperuser
-
If desired, run the tests.
$ docker compose run --rm web tox
If you are on RHEL, your installation and commands may be different.
-
$ sudo dnf install podman-compose
-
Clone the repository.
$ git clone https://github.com/unt-libraries/django-nomination
-
If you have SELinux, you may need to temporarily add
:Z
to the web volume in the docker-compose.yml. It will look like.:/app/:Z
. -
Start the container as a daemon.
$ sudo podman-compose up -d # Use 'sudo podman-compose stop' to stop the container.
At this point you should be able to access your local instance of the site by visiting
<dockerhost>:8000/nomination/
. -
Create a superuser for access to the admin sites.
$ sudo podman-compose run --rm web python manage.py createsuperuser
-
If desired, run the tests.
$ sudo podman-compose run --rm web tox
For bulk loading of URL nominations into a Nomination Tool instance,
there is a fielded_batch_ingest
management command. Input file formats
include:
- text file - one URL per line
- CSV - lines contain a
url
field as well as additional arbitrary metadata fields that must be named on the first line (e.g. the first line of the CSV might look likeurl,Title,List_Name
) - pickled dictionary - serialized Python object in pickle format. This allows multivalued attributes that can be stored in a Python dictionary as lists.
To view details on this bulk loading tool, run:
$ python manage.py fielded_batch_ingest -h
For example, to load a CSV file:
$ python manage.py fielded_batch_ingest tests/data/test.csv --nominator 2 --project project1 --csv
There are two scripts made available with this app that can help with batch
uploading of project information, such as project metadata and URL nominations.
They are located in the user_scripts subdirectory and are intended to be run
from the machine serving the app. They require access to the settings file used
by the Django project hosting the app. If you are serving the app using a virtual
environment, the script will need to be run from within that same environment.
The scripts are well-commented and designed to be used from the
command-line. Invoke them with the -h
flag to see their help documentation.
See LICENSE.txt.
- Brandon Fredericks
- Lauren Ko
- Mark Phillips
- Joey Liechty
- Gio Gottardi
- Jason Ellis
- Madhulika Bayyavarapu
- Gracie Flores-Hays