Commit Graph

38 Commits (main)

Author SHA1 Message Date
Jaap Joris Vens c52be27802 Make email subject user-configurable 2024-12-10 23:08:03 +01:00
Jaap Joris Vens 6781532448 Add missing docstrings 2024-12-10 23:05:36 +01:00
Jaap Joris Vens 5a4bbca1ab Clean up example project 2024-12-10 01:03:13 +01:00
Jaap Joris Vens 94af72cca8 Merry 1.1.1
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/
2022-12-25 22:02:50 +01:00
Jaap Joris Vens 1fda2f40c1 Spam-resistant contact form
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.
2022-12-25 01:10:41 +01:00
Jaap Joris Vens ac49478bbb Re-introduce section IDs
We may have had these before, and they may have been removed because
of concerns that IDs must be unique that non-unique IDs would be
caught by Django-Tidy. Or maybe not, I can't remember.
2022-12-25 00:25:13 +01:00
Jaap Joris Vens 80133f8aa1 Add missing translations 2022-01-29 13:36:59 +01:00
Jaap Joris Vens 74c896b86e Properly sort out pre-commit hook handling
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.
2022-01-29 12:56:45 +01:00
Jaap Joris Vens 924031f3ac Reverse tidy and cache middleware
I don't fully understand why this is needed, but one project (invoices) for
some reason won't work without it...
2021-07-05 01:41:18 +02:00
Jaap Joris Vens 98de86f49d Blackify everything 2021-07-04 01:59:48 +02:00
Jaap Joris Vens eb969cfb8e Add useful pre-commit hooks 2021-06-30 00:03:51 +02:00
Jaap Joris Vens c4300bafa1 Django 3.2 compatibility 2021-06-29 23:01:02 +02:00
Jaap Joris Vens 44941ec239 Add django-tidy 2021-01-23 11:38:10 +01:00
Jaap Joris Vens 8dcf61c766 Let's rock! 2021-01-23 10:29:24 +01:00
Jaap Joris Vens 07d5aaea9c Update example middleware 2020-11-09 22:16:34 +01:00
Jaap Joris Vens c2e0bed323 Improve image section by fixing aspect ratio to 16:9 2020-11-09 21:23:52 +01:00
Jaap Joris Vens 11fa5ba39b Changed has_perms() to has_perm(), because the former always returns False... 2020-05-20 18:03:53 +02:00
Jaap Joris Vens 257a51cb57 Allow multiple email recipients 2020-04-29 23:32:13 +02:00
Jaap Joris Vens 4a8c804452 Better form handling 2020-03-29 01:54:56 +01:00
Jaap Joris Vens be39b3fcaa Update example project 2020-03-24 22:14:33 +01:00
Jaap Joris Vens c552f52e46 Various small improvements 2020-03-24 15:32:12 +01:00
Jaap Joris Vens b092c12c99 [ no commit message supplied ] 2020-03-24 01:55:49 +01:00
Jaap Joris Vens ab9dc1621f Updated example project with cache settings. Also, deleted frontend
templates from cms app.
2020-03-24 01:15:17 +01:00
Jaap Joris Vens 1e503349d6 Minor tweaks 2020-03-22 21:19:12 +01:00
Jaap Joris Vens 2382fd47f0 Tidying up! 2020-03-22 19:57:48 +01:00
Jaap Joris Vens 0e221ccf33 The dependency on swapper has been replaced with an incredibly simply
"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.
2020-03-22 12:46:10 +01:00
Jaap Joris Vens 98b1a61af1 New template tag: {% edit %} which generates a simple edit link for the
current section
2020-03-21 20:24:07 +01:00
Jaap Joris Vens 3cc1f9ec08 New version! Modelled after Django's admin application, simplecms now allows
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!
2020-03-21 18:49:41 +01:00
Jaap Joris Vens 2b9c9d9a14 email 2020-03-19 21:48:03 +01:00
Jaap Joris Vens 764f135785 More sensible default email addresses 2020-03-18 23:57:37 +01:00
Jaap Joris Vens d5f5bb4296 Change default fields. This breaks existing migrations. Deal with it. 2020-02-19 22:24:01 +01:00
Jaap Joris Vens 25770feb57 I can't believe it actually works! 2020-02-19 20:13:43 +01:00
Jaap Joris Vens c0464a5ab6 Simplify CRUD logic
Whe needs CRUD? If a page exists, you edit it. If it doesn't, the same form
creates it. No more sections on a page? It gets automatically deleted. The
only thing the user has to remember is: nothing. Brilliant, right?
2020-02-19 16:35:23 +01:00
Jaap Joris Vens bd8d82d4e7 Another try at making both the Page and Section models be swappable (damn
migrations!)
2020-02-16 15:32:38 +01:00
Jaap Joris Vens 7c0eb51c75 minor 2020-02-15 07:51:00 +01:00
Jaap Joris Vens 3f900617c8 Re-introduce formsets
No more clicking individual sections to edit them. From now on, there will
only be one edit button! The biggest challenge was getting the javascript
closures to understand.
2020-02-14 17:20:41 +01:00
Jaap Joris Vens fc64b876da Move ContactForm back to cms package. Where should it live? 2020-01-06 12:51:10 +01:00
Jaap Joris Vens 2824d290f8 Cleanup source tree
The separate apps numberedmodel and simplesass have been merged into cms
2020-01-05 13:37:51 +01:00