Hi,
I want to provide an admin date_hierarchy filter for a model that
actually doesn't have a datetime field itself. The datetime value for
each object is stored in another model. It's possible to define a
date_hierarchy filter in this scenario?
I've tried to use date_hierarchy with a property tha
Hi!,
I have a model class like this one:
class Domain(models.Model):
active = models.BooleanField()
root = models.CharField(max_length=6)
now given a Domain instance I need to know if it meets with an
expresion like this one:
active=True and (root='com' or root='net')
one way to do that
On Tue, Mar 1, 2011 at 11:55 AM, Marc Aymerich wrote:
> Hi!,
> I have a model class like this one:
>
> class Domain(models.Model):
> active = models.BooleanField()
> root = models.CharField(max_length=6)
>
> now given a Domain instance I need to know if it meets
On Tue, Mar 1, 2011 at 12:02 PM, Daniel Hilton wrote:
> On 1 March 2011 10:55, Marc Aymerich wrote:
>> Hi!,
>> I have a model class like this one:
>>
>> class Domain(models.Model):
>> active = models.BooleanField()
>> root = models.CharField(max_leng
On Tue, Mar 1, 2011 at 12:19 PM, Masklinn wrote:
> On 2011-03-01, at 12:11 , Marc Aymerich wrote:
>> On Tue, Mar 1, 2011 at 12:02 PM, Daniel Hilton
>> wrote:
>>> On 1 March 2011 10:55, Marc Aymerich wrote:
>>>> Hi!,
>>>> I have a model class li
On Tue, Mar 1, 2011 at 1:46 PM, Masklinn wrote:
> On 2011-03-01, at 13:18 , Marc Aymerich wrote:
>>
>> Hi Masklinn, I never use jquey's :(
> Not a problem. The .is method simply takes a CSS selector and returns a
> boolean flag indicating whether the selected ob
On Tue, Mar 1, 2011 at 2:07 PM, Marc Aymerich wrote:
> On Tue, Mar 1, 2011 at 1:46 PM, Masklinn wrote:
>> On 2011-03-01, at 13:18 , Marc Aymerich wrote:
>>>
>>> Hi Masklinn, I never use jquey's :(
>> Not a problem. The .is method simply takes a CSS s
Hi,
I have an admin class with some arbitrary number of inline forms. I
want to make some stuff when all the inlines are successfully saved.
How can I do that? admin executes something else after save_model ??
Thanks!!
--
Marc
--
You received this message because you are subscribed to the Goog
On Fri, Mar 4, 2011 at 3:09 PM, Marc Aymerich wrote:
> Hi,
> I have an admin class with some arbitrary number of inline forms. I
> want to make some stuff when all the inlines are successfully saved.
> How can I do that? admin executes something else after save_model ??
>
A
On Sat, Mar 5, 2011 at 12:55 PM, Sithembewena Lloyd Dube
wrote:
> I tink you could also go as follows:
>
> my_object = form.save()
> if my_object:
> do_something()
Yep, but I'm using django admin so I can't do that without refactor
admin add_view, change_view and change_list_view ModelAdmin
HI,
I want to use a custom form for one of my admin inlines, but
unfortunatly I'm not able to exclude some fields. Seems that
GenericStackedInline ignores whatever I put on ModelForm.Meta.exclude.
Is this a normal behaviour? or it's a bug?
My test classes:
class Mon(ModelForm):
class Meta:
Hi,
I spend all day trying to figure out how to insert an "editable" extra
field (not a model field) in admin change list. Is there an easy way
to do that?
Thanks!
--
Marc
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
On Fri, Apr 1, 2011 at 8:39 PM, Marwan Al-Sabbagh <
marwan.alsabb...@gmail.com> wrote:
> Hi,
> just wanted to confirm that this is a bug before posting it on
> tracker. Any comments are welcome it will be my first bug report on
> django :)
>
> Problem
>
> If you have a model with a pri
Hi,
I have a middleware that performs some operations at the end of each
request.
What I have found is that middlewares do not run inside the ATOMIC_REQUESTS
transaction. But I want the ATOMIC_REQUESTS transaction to rollback if an
exception is being raised on my middleware.
Any idea on how to so
On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich wrote:
> Hi,
> I have a middleware that performs some operations at the end of each
> request.
>
> What I have found is that middlewares do not run inside the
> ATOMIC_REQUESTS transaction. But I want the ATOMIC_REQUESTS transactio
On Tue, Mar 10, 2015 at 5:15 PM, Marc Aymerich wrote:
>
>
> On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich
> wrote:
>
>> Hi,
>> I have a middleware that performs some operations at the end of each
>> request.
>>
>> What I have found is that middlew
On Tue, Mar 10, 2015 at 5:38 PM, Marc Aymerich wrote:
>
>
> On Tue, Mar 10, 2015 at 5:15 PM, Marc Aymerich
> wrote:
>
>>
>>
>> On Tue, Mar 10, 2015 at 5:12 PM, Marc Aymerich
>> wrote:
>>
>>> Hi,
>>> I have a middleware that perfor
On Wed, Apr 1, 2015 at 10:46 PM, Tim Graham wrote:
> Django 1.8, the next long-term support release, is now available:
>
> https://www.djangoproject.com/weblog/2015/apr/01/release-18-final/
>
> With the release of Django 1.8, Django 1.6 has reached end-of-life. As
> such, Django 1.6.11 is the fin
HI,
I'm using atomic requests, but one of my views needs to save a model
regardless of wheter the current transaction rolls back or not.
I'm confused about how to proceed with the current autocommit behaviour. Do
I need to use a different db connection? or perhaps there is some way of
telling dja
On Fri, May 8, 2015 at 5:50 PM, Carl Meyer wrote:
> Hi Marc,
>
> On 05/08/2015 07:15 AM, Marc Aymerich wrote:
> > I'm using atomic requests, but one of my views needs to save a model
> > regardless of wheter the current transaction rolls back or not.
> >
>
On Fri, May 8, 2015 at 6:43 PM, Marc Aymerich wrote:
>
>
> On Fri, May 8, 2015 at 5:50 PM, Carl Meyer wrote:
>
>> Hi Marc,
>>
>> On 05/08/2015 07:15 AM, Marc Aymerich wrote:
>> > I'm using atomic requests, but one of my views needs to save a
On Thu, May 14, 2015 at 11:26 AM, Tom Evans wrote:
>
> On Thu, May 14, 2015 at 4:36 AM, reduxionist
> wrote:
> > The question you asked Tom was "Doesn't Apache create new process for each
> > request [thus eating memory when serving large amounts of static files
> > during traffic peaks]?", and
On Fri, May 15, 2015 at 10:33 AM, Tom Evans wrote:
> On Thu, May 14, 2015 at 4:18 PM, Marc Aymerich wrote:
>> On Thu, May 14, 2015 at 11:26 AM, Tom Evans wrote:
>>> On our app servers we typically use Apache with worker MPM and
>>> mod_wsgi, although we have a few ngi
Hi,
I need to do some annotations that require a nested sumation,
I have Bills that have Lines that in turn have Sublines: Bill -> Line -> SubLine
In order to calculate the total bill price I need to add all sublines
of every line, and then all lines of a bill.
queryset.annotate(
total=Sum(F('
Hi,
Wanted to try 1.7 and I'm hit by an exception that don't know how to solve
:)
running current 1.7.x branch, here full runserver output:
orchestra@orchestra:~/panel$ python manage.py runserver 0.0.0.0:
/usr/local/lib/python2.7/dist-packages/djcelery/managers.py:77:
RemovedInDjango18Warning
On Tue, Jul 8, 2014 at 12:54 PM, Frank Bieniek <
frank.bien...@produktlaunch.de> wrote:
> Hi Marc,
>
> this should fix it:
>
> File "/home/orchestra/django-orchestra/orchestra/apps/accounts/models.py",
>> line 9, in Account
>> user = models.OneToOneField(get_user_model(),
>> related_name='acc
Hi,
I have been bitten by unexpected behaviors when running tests because on
AppConfig.ready() I was initializing some stuff that depends on DB stored
data. Reading the django docs I've found a warning that specifically
suggests not to do this [1]. But then I wonder where this kind of
initializatio
On Sun, Nov 30, 2014 at 12:30 PM, ThomasTheDjangoFan
wrote:
> Hi guys,
>
> coming from php I am wondering if there is a way to do something like this
> in Python/Django:
>
> if variable = get_a_value_from_function():
> new_stuff = variable
>
> Of course I can use
>
> variable = get_a_value_from_
On Tue, Dec 24, 2013 at 4:15 PM, Rakan Alhneiti
wrote:
> Hello all,
>
> I was discussing the topic with a couple of my friends that Django's ORM is
> / is not tightly coupled with databases in general. My point of view was
> that django is not tightly coupled because you can write custom DB backen
On Tue, Dec 24, 2013 at 4:15 PM, Rakan Alhneiti
wrote:
> Hello all,
>
> I was discussing the topic with a couple of my friends that Django's ORM is
> / is not tightly coupled with databases in general. My point of view was
> that django is not tightly coupled because you can write custom DB backen
I'm running my Django app tests and I'm getting a random and very
annoying assertion error
==
FAIL: test_rest_dns_delete
(orchestra.apps.dns.zones.tests.functional_tests.tests.RESTBind9MasterBackendTest)
--
On Wed, Feb 12, 2014 at 8:01 PM, Larry Martell wrote:
> On Wed, Feb 12, 2014 at 1:56 PM, Marc Aymerich wrote:
>> I'm running my Django app tests and I'm getting a random and very
>> annoying assertion error
>>
>> =
Hi, I want to annotate the concatenation of two string fields, something like
Domain.objects.annotate(annotation=F('field1')+F('field2'))
however it is not possible to use F expressions on annotate().
I'm trying to accomplish the same thing using extra() however I don't
know how to do it right,
On Mon, Apr 7, 2014 at 3:04 PM, Emanuel wrote:
> Hi all!
>
> I'm have the following models:
>
> Class A(models.Model):
> pass
>
>
> Class Z(models.Model):
> pass
>
>
> Class B(models.Model):
> a = models.ForeignKey(a)
> z = models.ForeignKey(Z)
>
>def __unicode__(self)
On Thu, Jul 30, 2015 at 3:38 PM, Markus Amalthea Magnuson
wrote:
> Hey,
>
> I stumbled upon a piece of code and a comment that says this:
>
> Deleting a model object that has related objects will only cascade delete
> those objects if their models have been imported.
>
> Is this true? I have not f
201 - 235 of 235 matches
Mail list logo