Vincent Lefoulon

Results 23 comments of Vincent Lefoulon

Thanks for the quick answer! I could do that indeed, but it would make the index page super loaded.

I would show it on the **index page only**, just below the TOC: ![image](https://user-images.githubusercontent.com/6124369/66735512-db031d00-ee66-11e9-85e2-58258f3cae01.png) Ideally, we should be able to customize the order in which the additional pages appear. For...

Here is a workaround: https://github.com/SOTEREL/permapp/blob/master/designs/static/designs/admin/map_element.js#L25 The corresponding `ModelAdmin` is here: https://github.com/SOTEREL/permapp/blob/master/designs/admin/element.py#L77

Defining the `related_name` seems to fix the error: ```python class Publication(models.Model): title = models.CharField(max_length=30) class Article(models.Model): headline = models.CharField(max_length=100) publications = models.ManyToManyField(Publication, related_name="articles") # Filter publications by articles they belong...

@BurkovBA no problem, thanks for your response. This simple solution appear to work: ```python class Tag(Document): slug = fields.StringField(primary_key=True,) class TagSerializer(mongoserializers.DocumentSerializer): slug = serializers.CharField( required=True, validators=[ UniqueValidator(queryset=models.Tag.objects), utils.validate_slug, # Use...

Hi @hontrang! Sorry, I don't understand your question. Do you want to do [such a thing](https://github.com/encode/django-rest-framework/issues/5206#issuecomment-307047199)?

This is the solution recommended by DRF: http://www.django-rest-framework.org/api-guide/serializers/#specifying-read-only-fields > Note: There is a special-case where a read-only field is part of a unique_together constraint at the model level. In this...

@BurkovBA do you think we should add this default value in DRF-ME or is it up to the user?

@BurkovBA Yes, I do. It is a minimal example. What I really want to do is: ```python class EmbeddedSerializer(mongoserializers.EmbeddedDocumentSerializer): date = serializers.DateTimeField(format="%Y-%m-%d", input_formats=["%Y-%m-%d"]) # Bypass the absence of mongoengine.DateField class...

@BurkovBA I would like to use the `DateTimeField` as a `DateField` (for a document publication date, I do not care about hours and minutes), that is to be able to...