del Decreto Legislativo 14 marzo 2013, n. 33. Riordino della disciplina riguardante gli obblighi di pubblicità, trasparenza e diffusione di informazioni da parte delle pubbliche amministrazioni. (GU n.80 del 5-4-2013)” ≃ 250 obligation to publish into official government web site
! mezzanine.core.models.Slugged - Implements a title and URL (slug). ! mezzanine.core.models.MetaData - Provides SEO meta data, such as title, description and keywords. ! mezzanine.core.models.TimeStamped - Provides created and updated timestamps. ! mezzanine.core.models.Ownable - Contains a related user field, suitable for content owned by specific authors. ! mezzanine.core.models.RichText - Provides a WYSIWYG editable field. ! mezzanine.core.models.Orderable - Used to implement drag/drop ordering of content, whether out of the box as Django admin inlines, or custom such as Mezzanine’s page tree. mezzanine/core/models.py Abstract Models http://mezzanine.jupo.org/docs/content-architecture.html#content- architecture
the models in previous page, then implements publishing features, such as status and dates. ! mezzanine.core.pages.Page - Default Page subclass, providing a WYSIWYG editable field. http://mezzanine.jupo.org/docs/content-architecture.html#content-architecture mezzanine/core/models.py mezzanine/pages/models.py Abstract Model
as they’re not part of the site’s navigation. ! mezzanine.pages.models.RichTextPage - Default Page subclass, providing a WYSIWYG editable field. ! mezzanine.pages.models.Link - Page subclass for links pointing to other URLs. ! mezzanine.forms.models.Form - Page subclass for building forms. ! mezzanine.galleries.models.Gallery - Page subclass for building image gallery pages. http://mezzanine.jupo.org/docs/content-architecture.html#content-architecture mezzanine/pages/models.py
import Page ! # The members of Page will be inherited by the Poll model, # such as title, slug, etc. For polls we can use the title field to # store the poll’s question. For model definition, we just add # any extra fields that aren't part of the Page model, in this # case, date of publication. ! class Poll(Page): # question = models.CharField(max_length=200) pub_date = models.DateTimeField("Date published”) ! class Choice(models.Model): poll = models.ForeignKey(Poll) choice_text = models.CharField(max_length=200) votes = models.IntegerField(default=0) https://docs.djangoproject.com/en/1.6/intro/ tutorial01/#creating-models http://mezzanine.jupo.org/docs/content- architecture.html#creating-custom-content-types (venv)$ python manage.py startapp polls polls/models.py
ADD YOUR OWN URLPATTERNS *ABOVE* THE LINE BELOW. ``mezzanine.urls`` INCLUDES # A *CATCH ALL* PATTERN FOR PAGES, SO URLPATTERNS ADDED BELOW ``mezzanine.urls`` # WILL NEVER BE MATCHED! ! url(r'^dj_polls/', include('dj_polls.urls', namespace='polls')), ! # If you'd like more granular control over the patterns in ``mezzanine.urls``, go right ahead # and take the parts you want from it, and use them directly below instead of using # ``mezzanine.urls``. ("^", include("mezzanine.urls")), ! ! ! ! ! ! Our “regoular third-party” Django app to integrate. Polls apps of official Django tutorial named here “dj_polls”. ! https://docs.djangoproject.com/en/1.6/intro/tutorial01/ Polls “Mezzanine” app developed earlier for custom types.
navigation to point to the urlpatterns for these regular Django apps. Implementing this simply requires creating a page (RichTextPage, Link..) in the admin, with a URL matching a pattern used by the application.