Content management system: Pages is a list of (ordered) block and relevant content. Though to allow inline i18n content management, with high performance usage.
Project description
============================= django-stack-it
.. image:: https://api.codacy.com/project/badge/Grade/4c1f910320434a5fb2fb828ebfcbaf95 :alt: Codacy Badge :target: https://app.codacy.com/app/Jufik/django_stack_it?utm_source=github.com&utm_medium=referral&utm_content=VingtCinq/django_stack_it&utm_campaign=Badge_Grade_Dashboard
.. image:: https://badge.fury.io/py/django-stack-it.svg :target: https://badge.fury.io/py/django-stack-it
.. image:: https://api.codacy.com/project/badge/Coverage/a842b7f950cd465d91d6b06c7d56ce16
:target: https://www.codacy.com/app/Jufik/django_stack_it?utm_source=github.com&utm_medium=referral&utm_content=VingtCinq/django_stack_it&utm_campaign=Badge_Coverage
.. image:: https://travis-ci.org/VingtCinq/django_stack_it.svg?branch=master :target: https://travis-ci.org/VingtCinq/django_stack_it
Content management system under development
Quickstart
Install django-stack-it::
pip install django-stack-it
Django Stack It relies on several dependencies, you need to add to your INSTALLED_APPS
.. code-block:: python
INSTALLED_APPS = (
...
'polymorphic_tree',
'polymorphic',
'mptt',
'imagekit',
'stack_it'
...
)
Add django-stack-it's URL patterns:
.. code-block:: python urlpatterns = [ ... path(r'^', include('stack_it.urls')), ... ]
To avoid migration messup, we strongly recomend you to deport Stack It
migrations to your project.
This will avoid any unexpected conflict between environements, due to language addition/deletion.
In your settings:
.. code-block:: python MIGRATION_MODULES = { "stack_it":"tests.migrations" }
Basic Usage
As soon as you a model is linked to a URL, it should inherit from the Page
model.
.. code-block:: python from stack_it.models import Page
class Article(Page):
"""
Your model here
"""
....
Article is now considered to be a Page.
It comes with several usefull fields like title
, slug
dans template_path
.
Register your model to the admin the way you want, and you can see all your website organization within one unified admin doing:
.. code-block:: python from stack_it.admin import PageAdmin as BasePageAdmin from stack_it.models import Page from blog.models import Article
class PageAdmin(BasePageAdmin):
base_model = Page
child_models = (
...Your inherited model here,
Article,
...
)
admin.site.register(Page, PageAdmin)
Article
or any other model won't show up in the admin anymore.
Each model and model instances will be managed from the "Page" admin,
where all your pages are organized in a Drag n Drop interface to build up your site structure.
If you want your model's to be registered as usual, add show_in_index = True
in your admin class to allow
Features
- TODO
Running Tests
Does the code actually work?
::
source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox
Credits
Tools used in rendering this package:
- Cookiecutter_
cookiecutter-djangopackage
_
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _cookiecutter-djangopackage
: https://github.com/pydanny/cookiecutter-djangopackage
History
0.1.0 (2019-01-14) ++++++++++++++++++
- First release on PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for django_stack_it_bak-0.1.13.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 649ffc228b14dda7b6b640bde27f068b529e38a956ed377e4c603f8d7d563361 |
|
MD5 | 688ec359eab4d91c0d244229833c8a74 |
|
BLAKE2b-256 | ea3341f9242c9323e845343a2afe14e5fc8a4902d10c9fdc75597af50732ff19 |
Hashes for django_stack_it_bak-0.1.13.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c034af351c5b97e928ba0b992e160fa3e8fcb09fe8e36040a15371ff6c63f518 |
|
MD5 | 42550f5cf42876dc5265176fe9393168 |
|
BLAKE2b-256 | 76c192037917cf1a75ac424443d17200006130b2cf579d2ece9cc17d4b9b096c |
Hashes for django_stack_it_bak-0.1.13-1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab75997f140db1cd8c11bd9b5bb4a46803cf80b972c0195f4c25c9768bfc3a8b |
|
MD5 | 8b99abc0d09f5d76f0150245d8e9d5aa |
|
BLAKE2b-256 | 530cf1e8bcb774f3ddeaa53b42b86bbe1edfb76d82c52b1ebe8c33ccc5afb0ba |