Disable single instance of a system check warning

2018-02-09 Thread Mattias Linnap
t-wide for other models). For example, Java has the @SupressWarnings() annotation, and C++/Clang has the #pragma clang diagnostic ignored block directive. Is there a way to do this with Python/Django? Best, Mattias -- You received this message because you are subscribed to the Google Groups &

Re: [django-channels] Issues with model post_save and Group.Send()

2017-06-19 Thread Mattias Olsson
t that, I can't help, as it could be anything - your code or > Django's. > > Andrew > > On Mon, Jun 19, 2017 at 7:21 AM, Mattias Olsson > wrote: > >> Hi all, >> >> I'm having some issues with integrating automatic group messaging bas

[django-channels] Issues with model post_save and Group.Send()

2017-06-19 Thread Mattias Olsson
Hi all, I'm having some issues with integrating automatic group messaging based on a post save signal from Django models. I'm currently running a Graphene environment (graphene-python.org) to support a webapp running React/Relay. In this setup we're performing *Mutations* which will manipulate

Queryset .count() breaks when counting distinct values generated by .extra()

2015-01-18 Thread Mattias Linnap
.count() keeps the .distinct() part, but replaces the .extra() and .values() parts with counting primary keys? I tried it with values('tens'), values_list('tens'), and values_list('tens', flat=True), as well no change. So far I've tested Django 1.6 with Python

Why are DateTimeField auto_now and auto_now_add bad?

2014-07-27 Thread Mattias Linnap
to document these downsides or problems in more detail. But until that happens, is there a blog post or mailing list post somewhere that summarises the gotchas to watch out for with auto_now? Thanks, Mattias -- You received this message because you are subscribed to the Google Groups "

Re: Restrict access to user-uploaded files to authorized users

2013-09-25 Thread Mattias Linnap
ble to access the file. However, this approach would still allow the user to share a direct link to the file to other people. Mattias On Tue, Sep 24, 2013 at 9:53 PM, J Y wrote: > I am buliding a tool that needs to have the ability to allow user to > upload a file, and the file shoul

Server-side validation for complex ajax forms

2013-09-25 Thread Mattias Linnap
stions, or links to useful libraries, tutorials and blog posts about how to best approach this? Thanks, Mattias -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send

Re: how to evaluate "cities/countries of the world" static table for an application.

2013-02-26 Thread Mattias Linnap
https://github.com/coderholic/django-cities parses the GeoNames export, and makes it very easy to integrate into Django apps. On Tue, Feb 26, 2013 at 11:32 AM, Daniel Blasco wrote: > This is a useful resource http://download.geonames.org/export/dump/ > > > On Monday, February 25, 2013 7:05:54 AM

Multiple model inheritance

2012-12-31 Thread Mattias Linnap
real model inherit from models.Model (probably required if all the mixins are plain classes), or inherit from the first mixin that is an abstract model? * does the order of the base classes in SomeFullModel matter? Thanks, Mattias -- You received this message because you are subscribed to the Goo

Re: Django admin runs out of memory with ForeignKeys to large tables

2012-09-05 Thread Mattias Linnap
nd make all editable=False fields show up as readonly: after all, their data is still interesting to look at, just should not be editable. Mattias On Wed, Sep 5, 2012 at 1:37 PM, Mattias Linnap wrote: > Hi all, > > I have a model X that references another model Y with a ForeignKey. > There

Django admin runs out of memory with ForeignKeys to large tables

2012-09-05 Thread Mattias Linnap
e admin as more of a data browsing UI rather than a management UI. Thanks, Mattias -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, s

Re: Overriding save to create and save related entity

2012-07-25 Thread Mattias Linnap
It is possible to override the save() method in a model to add functionality: https://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods Another choice would be to register a receiver for the pre_save or post_save signals: https://docs.djangoproject.com/en/dev/ref/models/inst

Various thoughts on authentication, registration and social logins

2012-06-17 Thread Mattias Linnap
ok at first? Thanks, Mattias -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For mor

What is the best way to implement time-based / cronjob actions in a Django app?

2010-10-13 Thread Mattias Linnap
ead of caching it at the object, but this would require looking through all reservations and sales ever made to know the current state of a product. Thanks for any advice, Mattias -- You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Django 1.2 and unittest2 - does this hack work?

2010-09-12 Thread Mattias Linnap
ll be taken from unittest2. 2. Is there a better way to combine django.test.TestCase and unittest2, until Django 1.3 is released? Thanks, Mattias -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Disabling reverse relation

2009-06-04 Thread Mattias Brändström
s created by the foreign keys in Route will have the same same if we don't change the names via related_name. Is there someway to skip the reverse relations entirely? Regards, Mattias --~--~-~--~~~---~--~~ You received this message because you are subscribed t

View design patterns for inherited templates

2009-03-02 Thread Mattias
h the base.html template * have a get_params(request) function there that returns a dict with the base template parameters * every view would use this and add its own values before passing it to render_to_response. But is there something more generic for this problem in D

RE: Help regarding Sqlite3

2008-11-05 Thread Mattias Jämting
I use the sqlite manager extension for firefox. Very good. http://code.google.com/p/sqlite-manager/ /Mattias From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sadeesh Arumugam Sent: den 5 november 2008 11:07 To: django-users@googlegroups.com Subject: Help