Questions tagged [wagtail-snippet]
72 questions
0
votes
1 answer
How to order django model by foreign key image title alphabetically
I have model that I need to be able to order in the admin panel alphabetically by the title of the image foreign key. Currently with the code below the models get ordered by when the associated 'logo' images were added to the database, as opposed to…

NVN
- 147
- 2
- 7
0
votes
0 answers
Using SnippetChooser in wagtail when the foreign key uses to_field
I have a couple of models, Company and Sale. For a number of reasons that are not relevant to this discussion, I link the models together on a CharField. I would like to use a SnippetChooser on to select the company for the Sale model:
class…

Sævar
- 1,602
- 11
- 18
0
votes
1 answer
Generating WagtailCMS Document Previews
Is there a way to extend Wagtail's documents to show file previews? There's a service ( I have not tested ), which looks cool, but the free plan to Pro plan is a huge leap in cost. I am hoping someone has figured this out already and can point me…

Charles Smith
- 3,201
- 4
- 36
- 80
0
votes
1 answer
wagtail / django understanding pages, link and appropriate data structures
I am having some trouble trying to understand what data structure to adopt for various data items and how to access them.
Below is my menu structure and page items.
Home page
/ | …

sqwale
- 554
- 3
- 24
0
votes
1 answer
Query Django Wagtail Document Model
I have a client that has hundreds of documents that are tagged that we need to query and list on a page. I want to write a TemplateTag so its more reusable, but I have no idea how to query the builtin Wagtail image and document models. The below…

Charles Smith
- 3,201
- 4
- 36
- 80
0
votes
1 answer
file field doesn't gets saved with wagtail inline field
I'm trying to user inline panels but for plain Django model in wagtail like it's described here. I got it working with a plain char field.
When I try to use a models.FileField I get an error message after the save action. "No file chosen". It seem…

yvess
- 1,992
- 19
- 17
0
votes
1 answer
Display based on Django WagtailCMS SITE_ID
How can I create an if block to display one of my sidemenu's based on the WagtailCMS SITE_ID?
Tried this, but it doesn't work
{% if settings.SITE_ID == 1 %}
{% include 'includes/_home-sidebar-left.html' %}
{% else %}
{% include…

Charles Smith
- 3,201
- 4
- 36
- 80
0
votes
1 answer
Wagtail feed_image not Displaying on Index Page
I cannot seem to figure out why my feed_image works on the page when called as {{ self.feed_image }} but when trying to add to the index page, it will not display - just shows a broken image.
snippet
@register.inclusion_tag(
…

Charles Smith
- 3,201
- 4
- 36
- 80
0
votes
1 answer
Using Wagtail CMS Collections to Manage Permissions to Custom Settings
I am building an app for an Association with many Chapters. I setup the default site (localhost) for the Association corporate office, and a Chapter Site (denver.localhost) with a default landing page - they have dozens of other chapters that will…

Charles Smith
- 3,201
- 4
- 36
- 80
0
votes
1 answer
Adding new Wagtail CMS Snippets
I would like to add new Wagtail Snippet models but cannot find any documentation regarding proper file naming to begin building them; do I place them in my apps model.py file or does it have a specific method similar to wagtailadmin? Thank you.

Charles Smith
- 3,201
- 4
- 36
- 80
0
votes
1 answer
How to pass an argument from SnippetChooserPanel to a django-template
in my-django-project, I've successfully implemented a wagtail-driven app that allows to reference the model Map() of my-django-projectas a snippet in wagtail/admin(as described here).
My problem now is that when I choose (in the SnippetChooserPanel)…

user123892
- 1,243
- 3
- 21
- 38
-1
votes
1 answer
Django/Wagtail SnippetChooser template
1.How i can change/override SnippetChooser template ?
2.How i can add custom filters,queryset manipulations when choosing snippet ?
I can't find any info about this in documentation of wagtail

Kiyoshi
- 56
- 6