Il 06/09/2016 13:41, Patrick Heneghan ha scritto:
> Posted already to the Github issue tracker, but it was suggested I post
> here instead:
> 
> 
> In other CMS's I've used, it's been possible to define Page Types (or
> "post types") programatically. This is desirable, as it allows me to
> commit these to code, and have them ready for use when the site has been
> installed - rather than going through the manual process of creating
> them via the admin area post-installation.
> 
> 
> Is this possible in Django CMS? It doesn't seem to be documented.

Do you mean "Page Type" in the django CMS meaning (ie: special pages
prefilled with content) or just page templates? In the latter django
templates configured in CMS_TEMPLATES are what you are looking for.

In the former case django CMS Page types are just pages saved under a
special parent.
If you want to ship them together with the code you have two options:
- saving a fixture file with the pre-saved pages
- create a datamigration which creates the pages using create_page /
create_title / add_plugin public API
(http://django-cms.readthedocs.io/en/release-3.3.x/reference/api.html)

Hope this helps

> 
> -- 
> Message URL: *MailScanner has detected definite fraud in the website at
> "groups.google.com". Do /not/ trust this website:*
> https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id 
> <https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id>
> Unsubscribe: send a message to
> django-cms-developers+unsubscr...@googlegroups.com
> ---
> You received this message because you are subscribed to the Google
> Groups "django CMS developers" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-cms-developers+unsubscr...@googlegroups.com
> <mailto:django-cms-developers+unsubscr...@googlegroups.com>.
> To view this discussion on the web, visit *MailScanner has detected
> definite fraud in the website at "groups.google.com". Do /not/ trust
> this website:*
> https://groups.google.com/d/msgid/django-cms-developers/04effbc0-fe73-4fc8-a17a-325ab82d701f%40googlegroups.com
> <https://groups.google.com/d/msgid/django-cms-developers/04effbc0-fe73-4fc8-a17a-325ab82d701f%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit *MailScanner has detected definite fraud in the
> website at "groups.google.com". Do /not/ trust this website:*
> https://groups.google.com/d/optout <https://groups.google.com/d/optout>.


-- 
Iacopo Spalletti

Nephila s.a.s. - Firenze
Telefono: +39 055 5357189
Assistenza Tecnica: +39 055 3985730
http://nephi.la

-- 
Message URL: 
https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id
Unsubscribe: send a message to 
django-cms-developers+unsubscr...@googlegroups.com
--- 
You received this message because you are subscribed to the Google Groups 
"django CMS developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-cms-developers+unsubscr...@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/django-cms-developers/f9f253e2-6d6e-7c5c-e8e1-5ecc5dc34294%40nephila.it.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to