Thanks for the reply. I had a (perhaps unreasonable) malaise that
validation should be limited to the fields on a single model.
On Sunday, March 23, 2014 4:19:29 PM UTC-4, Simon Charette wrote:
>
> I'd say that's exactly what you should use `Model.clean()` for. In this
> case you're *doing valid
On 03/24/2014 03:24 PM, Tyler Wymer wrote:
> We have finished translating our application into a second language, but
> are having trouble finding a good solution for keeping this up to date
> going forward. Currently we have just been sending the .po file to the
> translator, but as we hope to
I have a search form that lets a user pick the field to be searched from a
pop-up. They could enter a date, a string or a number. Sometimes they enter
all of the above and I'm only expecting one of the above.
GET:,
I'm not catching type errors very gracefully and I'm wondering if there's a
genera
We have finished translating our application into a second language, but
are having trouble finding a good solution for keeping this up to date
going forward. Currently we have just been sending the .po file to the
translator, but as we hope to have the dual language support not be a
"beta" thi
Hello All,
I want the following registration workflow in my app.
1. User enters his email and is automatically logged-in to the app. The
user can play with the app, and it would logout the user after 30 minutes.
2. Meanwhile an activation email goes out to user's email that would
Alrught .. thanks a lot .. :)
On Mon, Mar 24, 2014 at 4:17 PM, Lachlan Musicman wrote:
> There's no such thing as a proper Git repository for Django, or even a
> proper layout for django.
>
> But you really can't go wrong following the advise offered in Two
> Scoops of Django by Daniel Greenfel
Ok, problem resolved.
I must have done something else wrong the last time I did loaddata, because
I tried the whole sequence again with the natural_keys as tuples, and it
all worked.
Sorry to bother the list so much.
But to summarize, natural_keys must be tuples, not single unicode values.
--
Not a tuple, it's now a json array. (Still not seeing things accurately...)
So I would think it would deserialize with __iter__, but I still get the
same deserialization error message.
On Monday, March 24, 2014 8:38:52 AM UTC-5, bobhaugen wrote:
>
> Got a clue. I re-read the doc and it says the
Got a clue. I re-read the doc and it says the natural key value must be a
tuple. Missed that before.
So I changed it like this:
def natural_key(self):
return (self.name,)
In the shell, that properly returns a tuple:
(u'Cash Contribution',)
But in the dumpdata results, it is not
There's no such thing as a proper Git repository for Django, or even a
proper layout for django.
But you really can't go wrong following the advise offered in Two
Scoops of Django by Daniel Greenfeld and Audrey Roy. First up, they
say exactly that - there is no "right" way. Then they follow with "
10 matches
Mail list logo