What are the best ways to accomplish a few items.

429 views
Skip to first unread message

Tony Anytime

unread,
Jun 1, 2016, 7:13:29 AM6/1/16
to Wagtail support
Good day all,

After spending 6 months evaluating platforms we have decide on Wagtail. We have looked and worked on everything from WP, Drupal, Joomla, to Leonardo, DjangoCMS,, even writing my own from scratch. We have extensive experience with WordPress having built literally thousands of sites in Multisites. We had decide to look for an alternative platforms for a big project we have. We built it on WP already, and it handled the 100ks of post with no problem, but the complexity of WP is always causing issues. We want a leaner backend where we can control the code. Anyway, we decided on Wagtail because it gives a flexible enough platform, it is working multisite today, and is in Python. 

We are looking to make a site like this http://www.ft.com/home/us, or our present WP site themiamimetropolis.com/ . Indeed in a couple of days we have this http://themetropolis.news/  Biggest problem was getting all the pieces working and then working on mysql. Had to reinstall 10 times till we got it right.


Everyone asks why are trying to rewrite something that WP does. Well we are looking for something that is more efficient and scales faster, AND not written in PHP. Unfortunately, we need some of the features of WP.

I am asking for direction on certain ideas that we need to implement. These are already incorporated in WP already but 
it seems we are going to have to program them in Wagtail unless someone has done so already. And any development we will be happy to donate back.
  1. Multiple columns for content
  2. Tag system, including tag cloud
  3. Post vs Pages, Categories ... I think we have this but may be someone has a better system.
  4. Modifying the Admin Menu
  5. Post rating system
  6. Post comment system, perhaps something like discus
  7. Vertical menu system for side bar
  8. Ecommerce 
Anyway, any help you can give us by pointing us in a direction is appreciate, and we hope to have a very long relationship with you Wagtailers...

tony

envisio...@gmail.com

unread,
Jun 1, 2016, 12:03:37 PM6/1/16
to Wagtail support
It looks like you've explored the wagtaildemo site so you're closer than further from your end goal. To achieve some of your aims it may be instructive to examine some of existing apps in the django ecosystem (there's a good list here). 

W/ regards to:

1. you'd ideally find a designer or stock news site html template that you could deconstruct into blocks dynamically populated using the django templating system

2. wagtail already comes w/ a good tag system that's not too difficult to use; you could probably make decent tag clouds using a project like pytagcloud

3. ...uh, considering the standard blog example - Blog(Page) might be your (wagtail, Page-based) model. you can set the page slug in the admin, retrieve "posts" w/ a query like - Blog.objects.all(), and your "categories" could perhaps be set using tags (...or a many-to-many relation...)

4. wagtailmodeladmin will be your friend here (an official contrib app as of 1.5)

5. maybe tricky-ish depending on what checks you want in place

6. just use disqus..probably

7. same as 1 + carefully examine how menus are constructed in the wagtaildemo site

8. ...

Hope that's at least a little helpful.

envisio...@gmail.com

unread,
Jun 1, 2016, 1:10:39 PM6/1/16
to Wagtail support

Brett Grace

unread,
Jun 1, 2016, 2:39:07 PM6/1/16
to Wagtail support
Multiple columns for content

Wagtail doesn't support shortcodes, if this is what you are thinking (although I did write a shortcode parser for a WP import project I did). Instead you define Blocks to represent different types of content. You can easily create multi-column blocks, pull quotes, etc.

Here are some examples from a live site, that is fully dynamic (no hard-coded pages, everything editable in the admin area) yet without any shortcodes:

https://www.wsiassn.org/join/
https://www.wsiassn.org/about/staff/
https://www.wsiassn.org/about/awards/

Here are some of the block definitions I created to support it:

class TwoColumnContentBlock(blocks.StructBlock):
    left_column
= blocks.RichTextBlock()
    right_column
= blocks.RichTextBlock()
    style
= blocks.ChoiceBlock(choices=[
       
('one-half', 'Two equal columns'),
       
('one-third-left', 'One third, two thirds'),
       
('one-third-right', 'Two thirds, one third'),
   
])

   
class Meta:
        label
= '2 Column Layout'
        icon = 'doc-full'
        template = 'core/blocks/two_column_content.html'


class ThreeColumnContentBlock(blocks.StructBlock):
    left_column
= blocks.RichTextBlock()
    middle_column
= blocks.RichTextBlock()
    right_column
= blocks.RichTextBlock()

   
class Meta:
        label
= '3 Column Layout'
        icon = 'doc-full'
        template = 'core/blocks/three_column_content.html'


class AsideBlock(blocks.StructBlock):
    aside_content
= blocks.RichTextBlock()

   
class Meta:
        label
= 'Aside Content'
        icon = 'arrow-right'
        template = 'core/blocks/aside.html'



class PullQuoteBlock(blocks.StructBlock):
    content
= blocks.RichTextBlock()

   
def __str__(self):
       
return self.content

   
class Meta:
       
template = 'core/blocks/pull_quote.html'
        icon = 'openquote'

 
Post vs Pages, Categories ... I think we have this but may be someone has a better system.

The idea of Posts and Categories as first class objects of the CMS, along with Pages, is entirely a WordPress-ism. With freedom from WordPress comes great responsibility, in particular you now get to write a lot more code. (The blog on the site I linked to above uses a simple many-to-many Category model that I wrote myself but is close to the wagtaildemo).

For your other concerns, you may not find something that does exactly what you want out of the box. Django (and hence Wagtail) do support re-usable plugins ('apps' in Django parlance), but it's not a tightly coupled system like WordPress so the plugin ecosystem is smaller and packages tend to require code to customize or tailor them. You'll spend time writing code for Wagtail that is just a download-and-install away for WordPress. On the other hand it is significantly more customize-able (and on the other other hand, "Just click to download and install" is the root of many of the problems with WordPress).

Definitely look at https://www.djangopackages.com — keep in mind that Wagtail is Just a Django App, not an application framework itself.

Tony Anytime

unread,
Jun 1, 2016, 9:20:08 PM6/1/16
to Wagtail support
Thanks guys, plenty to review. 

Matthew Westcott

unread,
Jun 2, 2016, 12:23:05 PM6/2/16
to wag...@googlegroups.com
Hi Tony,
Just a couple of thoughts to add to what people have already said...

On 1 Jun 2016, at 12:13, Tony Anytime <tonyany...@gmail.com> wrote:

> • Multiple columns for content

A key principle of Wagtail is that it doesn't dictate anything about the structure or layout of your site's frontend - anything you can write in HTML can go into a Wagtail page template - so, for example, you could drop in a CSS grid framework like Bootstrap. How you define the content to go into those columns is an altogether different and bigger subject - it could be as simple as defining two text fields 'main_content' and 'sidebar_content' on your page model, or something more complex with multiple blocks and dynamic queries in each column. You may well find that StreamField is what you're looking for: http://docs.wagtail.io/en/v1.5/topics/streamfield.html

> • Tag system, including tag cloud

Tagging for pages is detailed in http://docs.wagtail.io/en/v1.5/reference/pages/model_recipes.html#tagging . This is built upon the django-taggit package, and looking around there are a few tag cloud implementations for django-taggit that might fit the bill, such as https://github.com/feuervogel/django-taggit-templatetags

> • Post vs Pages, Categories ... I think we have this but may be someone has a better system.

As Brett mentioned, the Wagtail 'way' is for you to define your page types and relations between them yourself, rather than Wagtail providing its own concept of, say, 'blog post' out of the box. Having said that, there are a few Wagtail add-on packages to provide ready-built blog-like functionality, such as Puput <https://github.com/APSL/puput> and wagtailnews <https://bitbucket.org/takeflight/wagtailnews>.

> • Modifying the Admin Menu

register_admin_menu_item is the main hook for doing this - there are various other hooks detailed at http://docs.wagtail.io/en/v1.5/reference/hooks.html#admin-modules covering everything else you need to set up new admin views, such as registering URL paths. The new ModelAdmin module in Wagtail 1.5 <http://docs.wagtail.io/en/v1.5/reference/contrib/modeladmin.html> provides a higher-level way to do this for the common cases where you've got a Django model such as 'Comment' or 'Advert' that you want to make editable through the admin.

> • Post rating system
> • Post comment system, perhaps something like discus

Wagtail doesn't provide these, but the Django framework will certainly give you everything you need to build them (and there may well be existing packages in the Django ecosystem you can use).

> • Ecommerce

I hear various people have had good results integrating Wagtail with Oscar <http://oscarcommerce.com/>. (If any of those people are reading this, a writeup of how they did it and any advice / pitfalls etc would be really, really appreciated :-) )

Cheers,
- Matt

Tony Anytime

unread,
Jun 2, 2016, 3:40:00 PM6/2/16
to wag...@googlegroups.com

I do appreciate the difference between Django, Wagtails and WordPress. Our decision to go with WT. has to do with this flexibility. Our requirements include, multiple sites in one, indeed many hundreds. Each one with different css, menus, templates, home, domain names etc. All in the one database. Just we do in WP.

The hard part is not programming it but making sure our changes live through future upgrades. Also we are far smarter to use already written e-commerce, and other apps than writing everything from scratch. These are very long term investments in code and in supporting the communitys.

Wordpress is just too bloated, insecure, and inefficient to give us a long term platform. We are doing it now. But we spend more time fixing upgrades and fixing back sites before upgrades than new projects.

In summary, we want do things as close possible the Wagtails and Django way, unless of course we need to change it.
I hope this gives you all a better feel where we are going with this.

--
You received this message because you are subscribed to a topic in the Google Groups "Wagtail support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wagtail/uDgCq-8MnL4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wagtail+u...@googlegroups.com.
To post to this group, send an email to wag...@googlegroups.com.
Visit this group at https://groups.google.com/group/wagtail.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wagtail/3FFEB76B-AAFA-4971-8D9D-EE52AA4DC063%40torchbox.com.
For more options, visit https://groups.google.com/d/optout.

m...@maikhoepfel.de

unread,
May 3, 2017, 9:05:59 AM5/3/17
to Wagtail support
I needed a way to rate images, and discovered this thread. Just wanted to let you know that it took me less than 10 minutes to add a star rating system with https://github.com/wildfish/django-star-ratings - pretty nifty!

Tanveer Ahmed

unread,
Feb 12, 2019, 8:17:41 AM2/12/19
to Wagtail support
Please would you help me to render the choices Here How can I render the Choices in Template
Reply all
Reply to author
Forward
0 new messages