Comments (3)
I just ran into this as well, it was the comments that did it for me (I have a pages & blog mix deployed right now).
If anybody is curious I used the "is_private" attribute on the request to make it usable for now.
if hasattr(request, 'is_preview') and request.is_preview:
alternate-expression
else:
double-underscore-expression
from django-modelcluster.
Implemented in #102 for expressions such as __lt
. Following relations (e.g. page.photos.filter(author__name='Matthew')
) and chaining (e.g. publish_date__year__gt=2017
are still outstanding, so leaving this issue open to cover those.
from django-modelcluster.
I think this is probably related to this issue...
We've run into AttributeError
s with ordering on fields in related models (being thrown here in utils.sort_by_fields
: https://github.com/wagtail/django-modelcluster/blob/master/modelcluster/utils.py#L19)
Example code that produces this:
class ItemValue(models.Model):
item = models.ForeignKey(...)
class Meta:
ordering = ("item__title")
The error thrown is AttributeError: 'ItemValue' object has no attribute 'item__title'
.
This is happening when the ItemValue
is being saved from an inline formset on a parent model.
from django-modelcluster.
Related Issues (20)
- Copy fails for a Wagtail page with no tags HOT 7
- Multi table inheritance - ptr_id fields not being restored
- Using TaggedItem in ClusterTaggableManager causing AttributeError HOT 1
- Unable to `prefetch_related` on `ClusterTaggableManager` HOT 1
- When I Modify Elements via Admin Panel , Its not getting Saved HOT 1
- Add support for Django 3.2 HOT 3
- ClusterForm.as_p should return a safe string
- test suite fails with django-taggit >= 2.0.0 HOT 1
- Nested ClusterableModel relations are not copied HOT 1
- AttributeError when a ParentalKey related manager is used as the queryset for a ModelChoiceField HOT 3
- Wagtail 3.0 support planned? HOT 2
- GenericForeignKey
- Django 5.0 support HOT 1
- Filtering on related manager when using `prefetch_related` with explicit `queryset` on a ClusterableModel returns wrong results HOT 1
- Field with the same name as a lookup in `FILTER_EXPRESSION_TOKENS` causes crash when filtering with implicit `exact`
- test_formfield_callback failing with Django 4.2 HOT 1
- Docs: please provide an example of a through model with a ParentalManyToManyField
- Unhelpful messaging when model attribute name shadows child relation
- Preview breaks on latest 6.2 version HOT 3
- BaseChildFormSet doesn't caught IntegrityError for unique together using UniqueConstraint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-modelcluster.