In the admin panel I set a (descending) ordering on a model's date
field. That's fine of course. Now, the "problem" is, that this field
may be NULL in some cases and I want these items to appear at the
beginning of the list. They appear at the very end. If I set the
ordering to ASCENDING, then they
Hi, I have got a similar or maybe the same problem.
I have customized my admin form for a specific model. My model has got
Inline elements that are shown on the admin form, but the template for
this is completely customized. This is how I print the (product)
model:
{{ fieldset.form.product.erro
Just to close this:
the problem were the fixtures. The contract fixtures are defining the
generic relations by the actual IDs of the ContentType, so they had to
adopted after adding new models.
On 16 Sep., 17:00, Dennis Schmidt wrote:
> Hi there,
>
> I've got a very strange prob
;, line 171, in testMailBoxUsageGetCosts
print c, "|", c.account, "|", c.account.contract.all()
AttributeError: 'NoneType' object has no attribute 'contract'
I have absolutely no clue what causes this strange behaviour. Hope
anybody got at least a hint where
object = eval(request.POST['type']).objects.get(pk=int(request.POST
['id']))
should work. But you have to be very careful with what's inside of
your 'type' param, since it will get executed as Python code. So
always make sure nobody can inject malicious code there.
On 18 Jun., 18:40, Bastien wr
a really great tool for test driven develpoment.
On 18 Jun., 18:11, Alex Gaynor wrote:
> On Thu, Jun 18, 2009 at 11:09 AM, Dennis Schmidt
> > wrote:
>
> > Hi there,
>
> > I guess the Rails programmers here all know Cucumber. I wonder if
> > someone knows anyth
Hi there,
I guess the Rails programmers here all know Cucumber. I wonder if
someone knows anything comparable for Python / django?
greets, Dennis Schmidt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
thanks, that was just what I was looking for :-)
never used this**thing before
On 29 Apr., 14:02, Daniel Roseman
wrote:
> On Apr 29, 12:09 pm, Dennis Schmidt
> wrote:
>
>
>
>
>
> > Hi Mike,
>
> > thanks a lot but that was unfortunately not what I men
pr., 13:00, Mike Ramirez wrote:
> On Wednesday 29 April 2009 03:24:48 am Dennis Schmidt wrote:
>
>
>
>
>
> > Hi there,
>
> > this might be a trivial question but my search within the django
> > documentation and google didn't give me any helpful resul
Hi there,
this might be a trivial question but my search within the django
documentation and google didn't give me any helpful results.
In Ruby on Rails you can simply do this
x = Model.new({:param_x => 'x', :param_y => 'y'})
where the params are some model fields. The hash you can provide ther
Hi there,
I need to dynamically create complex forms in my application. Since
version 1.0 django has these form wizards, which can manage complex
forms quite well.
Now my only problem is, that they apparently have to be statically
mapped by the urls.py. But what I need is a different set of forms
OK, I just found it myself. The dictionary I was looking for is just
called data.
On 19 Jan., 16:45, Dennis Schmidt wrote:
> Hello,
>
> After calling the clean() method of a form the whole cleaned_data
> ditionary is returned. But when the clean() method raises an error,
> th
Hello,
After calling the clean() method of a form the whole cleaned_data
ditionary is returned. But when the clean() method raises an error,
the dictionary is emptied it seems since raising an error can't as
well return any values of course.
My problem now is, that I do need to access these valu
Hello,
normally you could render a simple formset like this:
{% for form in formset.forms %}
{% for field in form %}
{{ field }}
{% endfor %}
{% endfor %}
Now my problem is, that I can't use the second for loop since I need
direct access to every single formfield. This is because my for
t;
> Hope that helps
>
> Matias.
>
> On Fri, Dec 12, 2008 at 10:22 AM, Dennis Schmidt
>
>
> > wrote:
>
> > Hello,
>
> > I have a problem with ModelForms in the django admin site. I want to
> > exclude some fields so they won't be di
Hello,
I have a problem with ModelForms in the django admin site. I want to
exclude some fields so they won't be displayed when I edit the model
in the admin site. This is my code:
class CommonInvoiceForm(forms.ModelForm):
price_factor = forms.ChoiceField(choices=COST_FACTOR_CHOICES)
thanks a lot :-)
just created a ticket for this: #9476
On 30 Okt., 13:48, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 30, 2008 at 7:31 AM, Dennis Schmidt
>
> <[EMAIL PROTECTED]> wrote:
> > Well that does work, though in the Manager documentatio
it curious about changing the default
manager. How shall I know this won't raise Exceptions anywhere in the
django code if my Manager behaves differently from "objects"?
On 30 Okt., 12:59, Adi Jörg Sieker <[EMAIL PROTECTED]> wrote:
> On 30.10.2008 12:07 Uhr, Dennis Schmidt
Hello there,
I want the admin-site (and only the admin-site) to use ony of my own
custom Managers. Is there a way to do this except by changing the
default Manager "objects"?
greetings, Dennis
--~--~-~--~~~---~--~~
You received this message because you are subscri
Hi there,
I need to get every variable that will be printed out in my templates
to be passed through a special function.
Since I need this function globally and my variables are coming from
various places I thought the best way to do this would be right before
actually printing them to the templa
OK, I found the mistake myself.
The save() function has to return the new object. So this works:
def save(self, commit=True):
return super(CustomerForm, self).save(commit)
On 24 Sep., 13:58, Dennis Schmidt <[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I have a model (C
Hello everyone,
I have a model (Customer) with a ManyToMany field referencing django's
User class.
Now in my admin panel I've created a custom Form (ModelForm subclass)
for my Customer class. The only difference to the default form is that
I added 3 new (ModelChoiceField) fields. The intention be
Hello again,
now I'm just wondering how I can add some custom js files to a model's
"list overview page" in the admin site. When I add this inner Media
class to the model's admin class in the admin.py the js files will
only be included on the editing page. But I need some js files in the
overview
Hello everybody,
when you do something like saving an object in the admin site this
small yellow bar on top will show up, telling you something like
"correctly saved". I'd like to display my own custom messages there.
But I couldn't find out yet how to achieve this. Can someone help me
please?
r
Hello,
I've got an importing problem with my django projects. I'm trying to
build some kind of a framework which basically consists of 4 bigger
modules. So I thought this django modularity perfectly fits my needs.
I created 4 projects with different apps in them. Now some of the
models from one p
25 matches
Mail list logo