Hi Erik,
Thanks for the explanation. This looks like something I could try.
Another approach that I found recently was to use database routers[1].
This would not cause problems with password upgrades, but we would need to
change some database permissions.
[1] https://docs.djangoproject.com/en/d
What does it do instead?
>
--
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 an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to djan
Hi Cesar,
It's all the documentation:
https://docs.djangoproject.com/en/dev/topics/forms/formsets/#custom-formset-validation
You just have to raise a ValidationError(); Django will then add an error
that spans the entire formset.
If you want to evaluate errors in clean(), but force the actual e
On 2014-05-31, at 4:41 AM, ngangsia akumbo wrote:
> please i need some legit answer please
Please give one or two specific examples of functionality you need. There are
parameters for fields which can help specialize some behaviours without needing
a new model. And there are hooks to allow sp
Hi. I already asked this question in StackOverflow, but I didn't get any
useful answer. Let's try here :-)
I have a BaseInlineFormSet, and I'd like to validate a field in the parent
form based on the values on the fields of the children. As seen in the
docs, the only method to make a custom val
On 06/01/2014 03:00 PM, Pepsodent Cola wrote:
> At first I was trying to use list.append but then Python complained
> that append could only take 1 argument. So I google around and
> list.extend said that it could take more arguments so I just went with it.
>
> What is this right method you are th
You have not given enough details on your reporting setup; so my guess
would be to save the details into a new table. This would include data
such as:
* id (for the record)
* user_id
* report_id
* date_time
* parameters
The "parameters" are a text field; with the criteria/parameters which
cr
.extend() takes as a parameter something that can be iterated over and appends
it to the list. Something that can be iterated over includes other lists, sets,
tuples, dictionaries, see https://docs.python.org/2/tutorial/datastructures.html
François
On Jun 1, 2014, at 9:00 AM, Pepsodent Cola wr
At first I was trying to use list.append but then Python complained that
append could only take 1 argument. So I google around and list.extend said
that it could take more arguments so I just went with it.
What is this right method you are thinking about? My imagination is very
limited I only
On 2014-06-01, at 14:29 , Pepsodent Cola wrote:
> Hi, I want to transform my articles_list5 list comprehension back to a
> traditional looping construct to make things easier to read.
> The articles_list5 returns a list of tuples.
>
> But when I try to do the same using traditional looping in
Hi, I want to transform my *articles_list5* list comprehension back to a
traditional looping construct to make things easier to read.
The articles_list5 returns a list of tuples.
But when I try to do the same using traditional looping in *articles_list6*
then I just get one long list from everyt
Hi
I am having trouble mocking querysets which contains slice. Example
qs =
Thread.objects.filter(some_filter).order_by(some_order')[:app_settings.SEARCH_LIMIT]
And in my test I have:
Thread.objects.assert_has_calls([
mock.call.filter('some_filter'),
mock.call.filter()
Never mind it seems using a tuple instead of a list solved my problem.
subset = df[[0, 1, 2, 'FRACTION']]
tuples = [tuple(x) for x in subset.values]
On Saturday, May 31, 2014 8:15:16 PM UTC+2, Pepsodent Cola wrote:
>
> Exception Type: UnboundLocalError Exception Value:
>
> local va
Hi,
For anyone interested or stuck as i was this is what i did in my view and
it started working,its not working optimamly as i wanted it to but its a
working progress but its atleast saving to the database
import json
@csrf_exempt
def saveFormDesign(request):
data=request.body
t=json.
14 matches
Mail list logo