1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
winlu 089b46b7eb Consolidate validation of content (#2128)
* Consolidate validation of content

Previously we validated content outside of the content class via
calls to `is_valid_content` and some additional checks in page /
article generators (valid status).
This commit moves those checks all into content.valid() resulting
in a cleaner code structure.
This allows us to restructure how generators interact with content,
removing several old bugs in pelican (#1748, #1356, #2098).

- move verification function into content class
- move generator verifying content to contents class
- remove unused quote class
- remove draft class (no more rereading drafts)
- move auto draft status setter into Article.__init__
- add now parsing draft to basic test output
- remove problematic DEFAULT_STATUS setting
- add setter/getter for content.status
  removes need for lower() calls when verifying status

* expand c4b184fa32

Mostly implement feedback by @iKevinY.

* rename content.valid to content.is_valid
* rename valid_* functions to has_valid_*
* update tests and function calls in code accordingly
2017-07-24 10:01:14 -07:00
..
tests Consolidate validation of content (#2128) 2017-07-24 10:01:14 -07:00
themes Fixup ec5c77b251 2017-05-05 16:02:48 +02:00
tools Correct import of socketserver on Python 3 2017-07-24 12:25:21 +02:00
__init__.py Fix more python 3.6 regex DeprecationWarning's 2017-03-29 10:19:47 +02:00
cache.py fulfil pep8 standard 2015-08-17 13:34:32 +02:00
contents.py Consolidate validation of content (#2128) 2017-07-24 10:01:14 -07:00
generators.py Consolidate validation of content (#2128) 2017-07-24 10:01:14 -07:00
log.py Correct new flake8 warnings 2017-01-24 09:12:16 +01:00
paginator.py fulfil pep8 standard 2015-08-17 13:34:32 +02:00
readers.py Ability to override docutils HTML writer/translator. 2017-06-30 22:59:42 +02:00
rstdirectives.py Fix warnings originating from bad regexes 2017-03-27 16:09:08 +02:00
server.py prevent server from dying when query strings present 2016-12-10 10:05:50 -08:00
settings.py Consolidate validation of content (#2128) 2017-07-24 10:01:14 -07:00
signals.py Add new signal: feed_generated 2017-01-16 11:33:13 +01:00
urlwrappers.py Add AUTHOR_SUBSTITUTIONS 2016-04-01 23:01:57 +03:00
utils.py Fix warnings originating from bad regexes 2017-03-27 16:09:08 +02:00
writers.py Merge pull request #2085 from Scheirle/feed_signal 2017-03-19 15:04:07 -04:00