Hello,
today, I wanted to use FileField directly in Python CSV module, but problem
was, that CSV module requires the file to be opened in text mode, not
binary. So I though that this will be sufficient:
obj.my_file_field.file.close()
obj.my_file_field.file.open(mode='r')
csvreader =
Hello,
is any reason why this does not work or is it just a bug?
# models.py
class ContainerProfile(models.Model):
name = models.CharField()
# ...
def __unicode__(self):
return self.name
__unicode__.admin_order_field = 'name'
# admin.py
@admin.register(ContainerProfile
Hello,
I just installed 1.7 (pip install
git+https://github.com/django/django@stable/1.7.x) and the django-jsonfield
app. As you can see here, JSONField.get_default() returns a dict instance,
not a string:
https://bitbucket.org/schinckel/django-jsonfield/src/28c51eb06a65c1e7b5d8022031aebb034e0
Hi all,
some days ago I began to store user agent strings but found, that there is
at least one client with some weird characters causing the SQL query to
fail. In the txt logs I have:
`Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; IS<8a> Sokolnice;
IS<8a> Sokolnice)`
this is my code in
ation until after the urlconf has been initialised.
I don't think there's a real benefit to having a third approach.
Regards,
Andrew Ingram
On 8 Apr 2012, at 22:12, Martin Tiršel wrote:
Hello,
I just started to use class based views and I came to the CreateView
and success_url
Hello,
I just started to use class based views and I came to the CreateView and
success_url argument. This argument has to be string what leads to typing
URLs in views instead of using reverse() function (you have no access to
urls through reverese() in view initialization). I think (if the