SSbits - Home page
Site by Carbon Crayon
Submit a Post >
  • TutorialsDataObject as Pages: The Module

    78

    SSBdataobjectsaspagesmodule

    It's been a while since we published the DataObject as Pages series of tutorials, which have proved to be particularly popular. At Aab Web we use those techniques regularly as a way to allow our clients to mange large amounts of flat content or content that is distributed in multiple places throughout a site. Although the final implementations in each project are often varied and bespoke, they all start with the basics outlined in those tutorials, so it made sense for us to build a starting point to work from (and include some more complex features at the same time). That starting point is this module, catchily entitled: DataObject as Pages.

    Continue reading...
  • TutorialsDataObjects as Pages - Part 2: Using Model Admin and URL Segments to create a product catalogue

    75

    SSBdoaspagesp2

    We now know the basics of using DataObjects as Pages from Part 1 of this tutorial. In part 2, we are now going to look at taking this further and creating a basic product catalogue with products that are DataObjects managed via the ModelAdmin interface. This tutorial will also serve as an introduction to ModelAdmin it self, which is an extremely powerful CRUD (Create, Read, Update, Delete) manager for any type of DataObject, whether used as pages or not.

    Continue reading...
  • TutorialsAdd a duplicate button to Model Admin

    15

    SSBmodeladminduplicate

    Often you will want to add some extra features to your Model Admin interface. Luckily it's pretty straightforward when you know how! In this tutorial we are going to add a simple 'Duplicate' button for our managed Model.

    Continue reading...
  • TutorialsSorting on a related DataObject in ModelAdmin

    1

    Sometimes, in ModelAdmin, we want to be able to have a different default sort.

    Specifically, like in cases where a has_one is the preferred sorting. For example, we have a warehouse. In our DataObjects, we have the object "Lanes", has_many Products. And we have Products, has_one "Lanes". When we're browsing our Products in the admin, we want to have them default sorted by their Lane, not their name.

    Just saying default_sort = 'Lanes'; sadly does not do the job. It'll give you reddish-screens and stuff. Which is not what we like.

    Here's a (quite simple actually) solution.

    Continue reading...

Advertisement

Site of the Month

Find SSbits on

Top Contributers

Rank Avatar Name
1 article image Aram Balakjian
2 article image Daniel Hensby
3 article image Marcus Dalgren
4 article image Hamish Campbell
5 article image Ty Barho
6 article image Martijn van Nieuwenhoven
7 article image Darren-Lee
8 article image Roman Schmid
9 article image Matt Clegg
10 article image dalesaurus

View full leaderboard


Advertisement