Package: jawanndenn
What is jawanndenn?jawanndennis a simple web application to schedule meetings and run
polls, a libre alternative to Doodle.  It is using the following technology:PythonDocker ComposeDjangoDjango ExtensionsDjango Ratelimit+msgpack-pythondjango-redisDjango REST frameworkFactory BoyGunicorn+gunicorn-color-loggerparameterizedpre-commitpython-rapidjsonsentry-pythonwait-for-itJavaScript / CSS / FontsGoogle Webfonts HelperjQueryjQuery notyMaterializeRobotoStoragePostgreSQLRedisSQLiteSchedulingSupercronicjawanndennislibre softwaredeveloped bySebastian Pipping. The
server code is licensed under theGNU Affero GPL licenseversion 3
or later whereas the client code is licensed under theGNU GPL
licenseversion 3 or later.Pleasereport bugsand let me know if youlikeit.Poll Setup FormatThe textarea titled “Setup (JSON)” uses
a simpleJSON-based format that knows the following keys:equal_width— a bool to control whether all options are pumped up
to the same width (trueorfalse) to counter potential voter biaslifetime— duration after which this poll will be deleted;
can be"week"or"month"; an enum-like stringoptions— a list of strings, one for each option;
supportsMarkdown-like syntax for: bold, italic, inline codetitle— the title or headline of the poll to run;
supportsMarkdown-like syntax for: bold, italic, inline codeInstallationTo install the latest release without cloning the Git repository:# pip3 install jawanndenn --userTo install from a Git clone:# ./setup.py install --userDeployment with docker-composeCreate a simple file.envlike this one:JAWANNDENN_POSTGRES_NAME=jawanndenn
JAWANNDENN_POSTGRES_USER=jawanndenn
JAWANNDENN_POSTGRES_PASSWORD=dEb2PIcinemA8poH
JAWANNDENN_SECRET_KEY=606ea88f183a27919d5c27ec7f948906d23fdd7821684eb59e8bcf7377e3853bMake sure toadjust these valuesafter copy and paste!You can then build and run a docker image usingdocker-composeup--build.The app is served onlocalhost:54080.
PostgreSQL data is saved to~/.jawanndenn-docker-pgdata/on the host system.
There is also an instance of Redis used for cross-process rate limiting,
and a “cron” housekeeping container that will go delete polls that have exceeded their
configured lifetime, every 60 minutes.(If you need a low-maintenance SSL reverse proxy in front of jawanndenn,docker-ssl-reverse-proxycould be of interest.)There is a few more environment variables that you could want to adjust in your environment.
Altogether, there are these variables:Environment variablesDJANGO_SETTINGS_MODULEDjango settings module to use, leave as is, defaults tojawanndenn.settings(seedocker-compose.yml)JAWANNDENN_ALLOWED_HOSTSHostnames to serve jawanndenn at, list separated by comma,
is set tojawanndenn.de,www.jawanndenn.deon the main production server,
defaults to127.0.0.1,0.0.0.0,localhost(seejawanndenn/settings.py)JAWANNDENN_DEBUGDebug mode, disabled for all values butTrue, disabled by default,
should never be enabled in production for security
(seejawanndenn/settings.py)JAWANNDENN_MAX_POLLSMaximum total number of polls to store, denial of service protection,
defaults to1000(seejawanndenn/settings.pyanddocker-compose.yml)JAWANNDENN_MAX_VOTES_PER_POLLMaximum total number of polls to store, denial of service protection,
defaults to40(seejawanndenn/settings.py)JAWANNDENN_POSTGRES_HOSTHostname of the PostgreSQL database to connect to; defaults topostgres(seedocker-compose.yml)JAWANNDENN_POSTGRES_NAMEDatabase name of the PostgreSQL database to connect to;
no default, always requiredJAWANNDENN_POSTGRES_PASSWORDPassword for log-in with the PostgreSQL database;
no default, always requiredJAWANNDENN_POSTGRES_PORTPort of the PostgreSQL database to connect to; defaults to5432(seedocker-compose.yml)JAWANNDENN_POSTGRES_USERUsername for log-in with the PostgreSQL database;
no default, always requiredJAWANNDENN_REDIS_HOSTHostname of the Redis database to connect to; defaults toredis(seedocker-compose.yml)JAWANNDENN_REDIS_PORTPort of the Redis database to connect to; defaults to6379(seedocker-compose.yml)JAWANNDENN_SECRET_KEYDjango secret key;
should be long, generated, not used elsewhere; no default, always requiredJAWANNDENN_SENTRY_DSNData source name (DSN)for use withSentry, disabled/empty by default
(seejawanndenn/settings.py)JAWANNDENN_URL_PREFIXPrefix string to insert into URLs rather after the domain name
to help with hosting multiple apps under the same domain side by side;
e.g. prefixprefix123will result in URLs likehttps://<domain>/prefix123/poll/<id>;
empty by default
(seejawanndenn/settings.py)Command line usageWhen installed, invocation is as simple as# jawanndennDuring development, you may want to runjawanndennfrom the Git clone
using# PYTHONPATH=. python3 -m jawanndenn --debugCurrently supported arguments are:# jawanndenn --help
usage: jawanndenn [-h] [--debug] [--host HOST] [--port PORT]
                  [--url-prefix PATH] [--database-sqlite3 FILE]
                  [--django-secret-key-file FILE] [--max-polls COUNT]
                  [--max-votes-per-poll COUNT] [--dumpdata]
                  [--loaddata FILE.json]

optional arguments:
  -h, --help            show this help message and exit
  --debug               Enable debug mode (default: disabled)
  --host HOST           Hostname or IP address to listen at (default:
                        127.0.0.1)
  --port PORT           Port to listen at (default: 8080)
  --url-prefix PATH     Path to prepend to URLs (default: "")
  --database-sqlite3 FILE
                        File to write the database to (default:
                        ~/jawanndenn.sqlite3)
  --django-secret-key-file FILE
                        File to use for Django secret key data (default:
                        ~/jawanndenn.secret_key)

limit configuration:
  --max-polls COUNT     Maximum number of polls total (default: 1000)
  --max-votes-per-poll COUNT
                        Maximum number of votes per poll (default: 40)

data import/export arguments:
  --dumpdata            Dump a JSON export of the database to standard output,
                        then quit.
  --loaddata FILE.json  Load a JSON export of the database from FILE.json,
                        then quit.Migrating data from jawanndenn 1.x to 2.xMigration takes four steps:Update to the latest version of jawanndenn 1.x, e.g. by running:pip2 install--upgrade'jawanndenn<2';
the JSON data export was first introduced with release 1.6.3.Export existing polls:If you’re using the commend line app:python2-mjawanndenn--dumpdata> dump.jsonIf you’re using docker-compose:docker-composerun-Tjawanndenn--database-pickle/data/polls.pickle--dumpdata> dump.jsonDeploy latest jawanndenn 2.x somewhere (as described above) or justpip3 install'jawanndenn>=2'it somewhereImport the JSON dump created in step (2):If you’re using the commend line app:python3-mjawanndenn--loaddatadump.jsonIf you’re using docker-compose:docker-composerun-Tjawanndenn sh-c'cat > /tmp/dump.json && DJANGO_SETTINGS_MODULE=jawanndenn.settings python3-mdjango loaddata /tmp/dump.json' < dump.jsonGoalsLibre software to host yourself, unlike DoodleMore simplistic, sexy and/or fun thanlibre alternatives, in alphabetic order:Bitpoll(ex.Dudel)CroodleDudle(Drupal Date picker formatter)(Foodle(discontinued;on GitHub, ex.DFN scheduler, ex.DFN Terminplaner+))Framadata(Sources, ex.OpenSondage, ex.STUdS)Nextcloud PollsNoodleNuagesPleftRalllyRDVzsowhenthenKeep things simple, usable, maintainableSupport invocation from the command line, e.g. for spontaneous polls in a LANHave security in mindPlease check out thelist of upcoming features.Non-goalsUse of heavy frontend frameworks: building blocks onlyRead availability from calendarsThanksSpecial thanks to Arne Maier (@KordonDev) for reporting
an XSS vulnerability, responsibly.