Using Wagtail on cookiecutter-django

419 views
Skip to first unread message

Rasmus Kierudsen

unread,
Jul 5, 2016, 8:43:47 AM7/5/16
to Wagtail support
I'm having a hard time figuring out, how to implement Wagtail CMS into pydanny's cookiecutter-django template. In which folder(s) do I add "installed apps" etc? Cookiecutter-django contains no such file as a "settings.py", but contains several settings-files?
My cookiecutter-django is up and running just fine, but I would really like using Wagtail on top of it.
- yes I'm quite new 

Matthew Westcott

unread,
Jul 5, 2016, 9:38:44 AM7/5/16
to wag...@googlegroups.com
Hi Rasmus,
The equivalent of the settings.py file in cookiecutter-django is config/settings/common.py.

However, it seems that they've reorganised things quite considerably from the default Django setup, and you'll probably have a hard time adapting the Wagtail instructions for it unless you have a full understanding of what else they've changed (which probably means reading the Two Scoops Of Django book)...

Cheers,
- Matt

Tim Allen

unread,
Jul 6, 2016, 8:55:03 AM7/6/16
to Wagtail support
Hi Rasmus, as Matthew pointed out, the settings are in config/settings/common.py. Here's an example of how I set up my settings to bring Wagtail into an existing Django Project:

PREREQ_APPS = [
   
'django.contrib.admin',
   
'django.contrib.auth',
   
'django.contrib.contenttypes',
   
'django.contrib.sessions',
   
'django.contrib.messages',
   
'django.contrib.staticfiles',

   
'bootstrap3',
]


WAGTAIL_APPS
= [
   
'compressor',
   
'taggit',
   
'modelcluster',

   
'wagtail.wagtailcore',
   
'wagtail.wagtailadmin',
   
'wagtail.wagtaildocs',
   
'wagtail.wagtailsnippets',
   
'wagtail.wagtailusers',
   
'wagtail.wagtailimages',
   
'wagtail.wagtailembeds',
   
'wagtail.wagtailsearch',
   
'wagtail.wagtailsites',
   
'wagtail.wagtailredirects',
   
'wagtail.wagtailforms'
]


WAGTAIL_CONTRIB_APPS
= [
   
'wagtailbettereditor',
   
'wagtailemoji',
   
'wagtailfontawesome',
   
"wagtail.contrib.table_block",
   
'wagtail.contrib.modeladmin'
]


PROJECT_APPS
= [
   
'users',
   
'base_views',
   
'registration',
   
'formeditor',
]


INSTALLED_APPS
= PREREQ_APPS + WAGTAIL_APPS + WAGTAIL_CONTRIB_APPS + PROJECT_APPS


This keeps the different parts of your requirements in separate Python lists, and then combines them. Hopefully this helps clarify how it can be done in common.py.

Regards,

Tim

Rasmus Kierudsen

unread,
Jul 7, 2016, 11:40:24 AM7/7/16
to Wagtail support
Hi Matthew and Tim
Thanks for your replies.
I've startet reading Two Scoopes of Django - that's gonna take a while:-) But it seems like a really good introduction to the Django framework.
Beside reading, I will give Tim's setup a try. Combining pydanny's "ready to go"-setup with the amazing Wagtail CMS, seems like a winner:-)

Best regards
Rasmus

Michael Harrison

unread,
Jul 19, 2016, 5:00:56 PM7/19/16
to Wagtail support
I just ran into this package, which looks promising. 

Lauren Wood

unread,
Jul 20, 2016, 5:16:40 PM7/20/16
to Wagtail support


On Tuesday, 19 July 2016 14:00:56 UTC-7, Michael Harrison wrote:
I just ran into this package, which looks promising. 


I've used this cookiecutter and it works well. There's a lot in it, so be prepared to delete a lot of files, but I find that better than not enough.
Reply all
Reply to author
Forward
0 new messages