Joseph Nuthalapati 96bd9c8bd4
tiddlywiki: Add new app
TiddlyWiki uses almost the same Apache configuration as Feather Wiki,
with one difference - disabling gzip for the `HEAD` request.

The FreedomBox app for TiddlyWiki is identical to Feather Wiki in
every other aspect.

- Proxy download through freedombox.org. This serves two purposes:

1. Upstream's website cannot track the IP addresses of FreedomBox users.
2. We can update the versions of the empty quine files without making
   code changes in FreedomBox.

[sunil]

- Update description to correct the list of users who can access the app.

- Update logo to adhere to the logo guidelines.

- Minor styling fix.

- Update the copyright on the logo based on information from upstream git
repository.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-08-10 17:57:01 -07:00

38 lines
1.2 KiB
Python

# SPDX-License-Identifier: AGPL-3.0-or-later
"""Django forms for configuring TiddlyWiki."""
from django import forms
from django.core import validators
from django.utils.translation import gettext_lazy as _
class CreateWikiForm(forms.Form):
"""Form to create a new wiki file."""
name = forms.CharField(
label=_('Name of the wiki file, with file extension ".html"'),
strip=True, help_text=_(
'Wiki title and description can be set from within the wiki. '
'This file name is independent of the wiki title.'))
class RenameWikiForm(forms.Form):
"""Form to rename a wiki file."""
new_name = forms.CharField(
label=_('New name for the wiki file, with file extension ".html"'),
strip=True, help_text=_(
'Renaming the file has no effect on the title of the wiki.'))
class UploadWikiForm(forms.Form):
"""Form to upload a wiki file."""
file = forms.FileField(
label=_('A TiddlyWiki file with .html file extension'),
required=True, validators=[
validators.FileExtensionValidator(
['html'], _('TiddlyWiki files must be in HTML format'))
], help_text=_(
'Upload an existing TiddlyWiki file from this computer.'))