This release fine-tunes the translations and offers a ready-to-use,
spam resistant contact form. Submitting the form will open the user's
mail app with an email addressed to the `href` field of the section.
This method, although unconventional, has been tested by my mother on
several of her devices, which proofs anyone can use it. It couldn't be
easier and, best of all, no more spam! \o/
Submitting the form now returns a 302 mailto: redirect, which should
open the user's email client with a pre-composed email. In case it
doesn't work, the example form view now renders text content where
{{ section.href }} should be mentioned as an alternative.
Of course, publishing an email address on the internet will still lead
to spam, but at least Django won't be the one sending it.
What this means is that the source code of SimpleCMS now passes all the the
pre-commit hooks, and that the code generated by `simplecms` _also_ passes
all the pre-commit hooks.
The hard problem of detecting whether a user is logged in is simply
sidestepped by assuming that any user that sends the `sessionid` cookie
is logged in. This is true as long as you don't save session variables
on anonymous users (i.e. if you don't spy on them ;)
"registry". Client projects register their models and views during import
time with a decorator. The cms views use the registered classes to generate
pages and forms.
Furthermore, the example application now combines the app and the project in
one, inspired by this line in the Django documentation:
There’s no restriction that a project package can’t also be considered
an application and have models, etc.
you to define everything related to it in the file 'cms.py'. No more
inherited proxy models and no more migrations every time you add/remove a
section type! In fact, the dependency on django-polymorphic has completely
been removed!
The example project has been updated and should get you started.
Documentation will be coming soon!
arrive at a simple, senseful and elegant solution that costs only 3 lines to
implement.
I know I should be happy about that, but it really makes me feel like a
total dumbass.