I have an application where we've upgraded from Django 1.7 to 1.9 that
makes extensive use of the new Postgres JSONField type. Now that JSONField
is native to Django I'm trying to get it to work with our existing code
base. We have a class that won't automatically serialize to json so I've
This is what we've done successfully for multiple projects. Django makes it
fairly straightforward.
-- Ben
On Fri, Mar 27, 2015 at 4:37 PM, Gabriel - Iulian Dumbrava <
gabriel.dumbr...@gmail.com> wrote:
> If your clients are using different subdomains, like client1.webapp.com,
>
ent me on
>> a wild goose chase trying to understand the 404 response. Would be VERY
>> useful if this 404 at least provided some information as to what it's
>> really all about - preferably with the above link embedded in it.
>>
>> Thanx to Rene Fleschenberg on irc for t
embedded in it.
Thanx to Rene Fleschenberg on irc for the doc link.
On Mon, Mar 23, 2015 at 8:42 PM, Benjamin Scherrey <proteus...@gmail.com>
wrote:
> Can someone explain the test condition on line 31 of
> https://github.com/django/django/blob/master/django/contrib/staticfiles/views
Can someone explain the test condition on line 31 of
https://github.com/django/django/blob/master/django/contrib/staticfiles/views.py
- Just spent a few hours trying to get my unit tests to pass and couldn't
figure out what was going on until I found this weirdness.
I understand serve() isn't
Did you find a solution that worked with ModelAdmin.search_fields &
Postgres? I'm running into the same question.
thanx,
-- Ben
On Sat, Jun 28, 2014 at 11:15 PM, Bastian Kuberek
wrote:
> Hi,
>
> Just saw that django.contrib.admin.ModelAdmin.search_fields
>
Great summary - looking forward to the rest. Especially like some of the
backgrounder insights also explaining "why" certain things were done. I
think this often helps developers understand and use features better than
even the otherwise excellent and detailed online docs. Wonder if the Django
doc
Yikes that's scary. How did you diagnose this? I think I may be hitting a
few examples of this now as well. Silent repression of exceptions is about
as evil a thing as one can do in a framework/library.
On Sat, Sep 20, 2014 at 6:31 AM, Collin Anderson
wrote:
> This
This is the nature of the HTTP protocol and RESTful architectural style.
Understand that a URI is just an address for a resource - it is not an
action or command. The HTTP verbs are the actual commands. So which HTTP
verb you send determines what action you want to occur on that resource.
This
I should assume then that this is something that the existing Django ORM
cannot model?
-- Ben
On Mon, Sep 8, 2014 at 1:06 PM, Benjamin Scherrey <proteus...@gmail.com>
wrote:
> I've got an application that needs to frequently update a boolean value
> (ChannelItem.channel_sto
Yes that all works. My unit tests and when reviewing the resulting objects
via the django shell show everything is absolutely working and the content
of my FilePathField data is correct. It's only the Admin UI that is giving
me fits.
thanx,
-- Ben
On Thu, Sep 11, 2014 at 11:19 PM, Collin
I have a model with a FilePathField declared as follows:
ftp_path = models.FilePathField(path=settings.BASE_SFTP_DIRECTORY,
max_length=250, allow_files=False,
recursive=True, allow_folders=True,
blank=True)
In my save
I've got an application that needs to frequently update a boolean value
(ChannelItem.channel_stocks) against a temporary table that gets created
and lives just long enough for this transaction. The table is simply a list
of alpha-num skus and created like this:
cursor.execute("create temporary
I'm not sure what the specific issue with migrations is but this article
has a nice trick (intended for making temporary models/tables) that would
allow you to bring in a model and get it to sync whenever you like. I'd
suggest putting this in your test setUp() method. It uses 'syncdb' cause
it's
The short answer to your question is no, the Django ORM is not inherently
slower in that regard and it's very likely something you're doing. The
useful answer is probably more complicated. :-) Naive usage of the ORM
without an understanding of how it translates to SQL is likely to result in
some
stle.com> --
> http://bristle.com/~fred/
> Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
> Open Source: Without walls and fences, we need no Windows or Gates.
> --
> On 8/27/14 5:22 PM, Benjamin Scherrey wrote:
>
> Post
istle Software, Inc -- http://bristle.com -- Glad to be of service!
> Open Source: Without walls and fences, we need no Windows or Gates.
> --
> On 8/27/14 4:21 PM, Benjamin Scherrey wrote:
>
> Clearly that depends on what your tests do. One of our proje
s or Gates.
> --
> On 8/27/14 3:57 PM, Benjamin Scherrey wrote:
>
> Something's definitely wrong. Except for the initial setup for the test
> run (in 1.7 migrations run each time for example), the individual tests
> should execute as fast as any normal py
Unfortunately python's csv capabilities have a fundamental problem - they
can't express null/None content. Any empty content will always show up as
an empty string ''. So what's being pass to your date constructor is an
empty string which is not a valid date format. Best work around is to
Something's definitely wrong. Except for the initial setup for the test run
(in 1.7 migrations run each time for example), the individual tests should
execute as fast as any normal python unit test.
On Wed, Aug 27, 2014 at 9:06 PM, Fred Stluka wrote:
> How quickly do Django
t than a piece
> of a python tool should be.
>
>
> On Monday, August 25, 2014, Benjamin Scherrey <proteus...@gmail.com>
> wrote:
>
>> Just want to run an idea by the list for a feature improvement for the
>> oft-used convenience functions get_or_create and update_or_create.
Just want to run an idea by the list for a feature improvement for the
oft-used convenience functions get_or_create and update_or_create. I'll
just talk about get_or_create for now on but everything I saw going forward
applies to both.
It's a common idiom to populate a dictionary and simply pass
22 matches
Mail list logo