pacman -S pyalpm python-chardet python-django python-psycopg2 python-requests
-
In the directory
mysite
copylocal_settings.py.example
tolocal_settings.py
and editDEBUG = True
and theSECRET_KEY
variable. -
Configure a connection to a PostgreSQL database in the Django database settings in the
mysite/local_settings.py
file. -
Make sure that the pg_trgm extension is created in the database. For example:
psql --username=<username> --dbname=<dbname> --command "create extension if not exists pg_trgm;"
-
Make migrations.
./manage.py makemigrations
-
Migrate changes.
./manage.py migrate
-
Start the development web server with
./manage.py runserver
. The site should be available at http://localhost:8000, saying that there are 0 man pages and 0 packages (because they were not imported yet). The server will automatically reload when you make changes to the webapp code or templates. -
Run the
update.py
script to import some man pages. However, note that the full import requires to download about 7.5 GB of packages from a mirror of the Arch repos and then the extraction takes about 20-30 minutes. (The volume of all man pages is less than 300 MB though.) If you won't need all man pages for the development, you can run e.g.update.py --only-repos core
to import only man pages from the core repository (the smallest one, download size is about 160 MB) or evenupdate.py --only-packages coreutils man-pages
.