Graveyard is an attempt at open-source reimplementation of DraciDoupe.cz (referred to as DDCZ in this text).
Developer's documentation is at Read the Docs.
Production is running at http://nove.dracidoupe.cz/ . But be warned, we are heading for the root domain soon!
Contributions are welcome provided you agree your work will be shared under the same license as Graveyard (MIT). Please use ruff for code formatting and verification (VS Code integration here).
If you don't know where to start, take a look at the roadmap or ask Almad on development Slack or community Discord or in Pošta on DraciDoupe.cz.
Please install EditorConfig support for your editor (plugin for VS Code, plugin for PyCharm/WebStorm/IDEAJ)
You can run Graveyard either directly on your machine or inside Docker. Arm64 systems (like M1 Mac) are supported.
Installing and running Graveyard directly is faster (on some systems) and removes one lever of indirection, but it makes the setup more complicated.
Running in Docker requires familiarity with it, but it makes setup easier and guarantees consistency with the testing environment (and hopefully in the future, production environment as well).
In both cases, first clone this repository and run all commands in its directory.
Graveyard is not yet compatible with Python 3.10+.
Requirements:
You have Docker CE installed
You have installed docker-compose
Createyour own copy of docker-compose configuration
cp docker-compose.example.yml docker-compose.yml
Create your own copy of local configuration
cp graveyard/settings/local.example.py graveyard/settings/local.py
Verify you have everything ready by running the test suite:
docker-compose run web python3 manage.py test
If you see output like this:
(graveyard-venv) almad@zeruel:~/projects/graveyard$ docker-compose run web python3 manage.py test
Starting graveyard_db_1 ... done
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
....
----------------------------------------------------------------------
Ran 4 tests in 0.000s
OK
Destroying test database for alias 'default'...
(graveyard-venv) almad@zeruel:~/projects/graveyard$
You are all set. Afterwards, install database schema by running
docker-compose run web python3 manage.py migrate
and load data about pages
docker-compose run web python3 manage.py loaddata pages
You are done! Now you can just run the project and develop using
docker-compose start
Verify your application works and open http://localhost:8000
(localhost
may be a different host if you are not working on linux). If so, create yourself a superuser.
For all commands in the manual that ask for python manage.py command
, run docker-compose run web python3 manage.py command
instead
Graveyard is currently written in Django. Requirements to develop it:
To use the project, clone this repository, enter its directory with cd graveyard
and:
python3 -m venv gvenv
sudo apt-get update && sudo apt-get install python3-pip && sudo pip3 install virtualenv
source gvenv/bin/activate
pip install -r requirements.txt
cp graveyard/settings/local.example.py graveyard/settings/local.py
CREATE DATABASE dracidoupe_cz DEFAULT CHARACTER SET latin2;
python manage.py test
. You should see output like this:(graveyard-venv) almad@zeruel:~/projects/graveyard$ python manage.py test
Creating test database for alias 'default'...
System check identified no issues (0 silenced).
...........
----------------------------------------------------------------------
Ran 11 tests in 0.031s
OK
Destroying test database for alias 'default'...
(graveyard-venv) almad@zeruel:~/projects/graveyard$
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
, you have to go to the linked page and download the chromedriver to your computer. Place it somewhere in $PATH
like /usr/local/bin
python manage.py migrate
python manage.py loaddata pages
python manage.py runserver
http://localhost:8000
Follow the list above, except:
gvenv\Scripts\activate
instaed of source gvenv/bin/activate
python manage.py loaddata editorarticles
python manage.py createsuperuser
http://localhost:8000/admin/
If you get something like this:
File "/tmp/pip-install-wfhe9zue/mysqlclient/setup_posix.py", line 29, in mysql_config
raise EnvironmentError("%s not found" % (_mysql_config_path,))
OSError: mysql_config not found
you may be using MariaDB fork of MySQL that the Python client is not equipped to talk to, installation-wise. You need to manually symlink the appropriate command:
ln -s /usr/bin/mariadb_config /usr/bin/mysql_config
If even mysql_config
is not there, you have to install development headers for the database. That's apt-get install libmariadbclient-dev
on Debian.
error: invalid command 'bdist_wheel'
Old setuptools: pip install setuptools -U
Use python manage.py registeruser
command, see manage.py registeruser --help
for parameters.
Example:
python manage.py registeruser mytestuser mytestuser@example.com logintograveyard
pip install django-debug-toolbar==2.2.1
from .base import INSTALLED_APPS, MIDDLEWARE
INSTALLED_APPS.append("debug_toolbar")
MIDDLEWARE.insert(
0,
"debug_toolbar.middleware.DebugToolbarMiddleware",
)
INTERNAL_IPS = ["127.0.0.1", "::1"]