when i get persons/add in djangos admin interface i get:
There's been an error:
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/django-1.0.0-py2.3.egg/django/core/handlers/base.py",
line 64, in get_response
response = callback(request, **param_dict)
File
"/usr
Ok,
I've updated to the new Model syntax as shown below and I'm still
getting "No sites matched your search criteria" in the admin page when
I put a foreign key in the list_display definition. Everything works
great as soon as I take "thing" out of the list_display.
I've also tried adding db_col
On Fri, 2005-08-26 at 13:33 -0500, Adrian Holovaty wrote:
> On 8/26/05, Jason F. McBrayer <[EMAIL PROTECTED]> wrote:
> > > In [1]: from django.models.engulf import feeds, users, articles, categorys
> > > In [2]: c = categorys.get_list(user_id__exact=1)
>
> You want categorys.get_list(user__id__ex
On 8/26/05, paolo <[EMAIL PROTECTED]> wrote:
> Hi, I'd like to know if it is possible to have different fieldsets for
> the same fields, subdivided by some criterion.
>
> admin = meta.Admin(
> fields = (
> ('category1', {
> 'classes': 'collapse',
> 'fields': ('name', '
On 8/26/05, Jason F. McBrayer <[EMAIL PROTECTED]> wrote:
> > In [1]: from django.models.engulf import feeds, users, articles, categorys
> > In [2]: c = categorys.get_list(user_id__exact=1)
You want categorys.get_list(user__id__exact=1) -- a subtle change.
With the new syntax, calling code never r
On 8/26/05, Maniac <[EMAIL PROTECTED]> wrote:
> What should I consider when choosing between them? I suppose choices
> tuple is easier to work with when making views since Django
> automatically generates for it (or am I wrong here?). On the
> other hand lookup table is more flexible since I can
The new syntax breaks get_list() for me. Here's an excerpt from my
model:
class Category(meta.Model):
name = meta.CharField("Name of Category", maxlength=255)
user = meta.ForeignKey(User)
feed = meta.ManyToManyField(Feed, filter_interface=meta.VERTICAL)
class META:
admin
Hi, I'd like to know if it is possible to have different fieldsets for
the same fields, subdivided by some criterion.
For example, the screen for adding a recipe referring to the following
model results in 5 "generic" (not grouped by any particular criterion)
fields. I'd like that for each categor
Hi!
I'm creating a model 'Print' with a field 'paper_type' that would
contain a value from a paper types list. As I understand I can make it
two different ways:
1. Create a PaperType table and refer to it from Print with a foreign key:
class PaperType:
name=meta.CharField(maxlength=20)
Thanks, that seemed to do the trick. I definitely prefer the new
syntax.
Tom
I realized that it was enough to have a string containing both the
component name and the price. In this way in the admin page for adding
a new configuration (that shows the components list too, due to
edit_inline=True) will be shown a combobox with, as said, the string
'comp name -- price' obtain
On 8/26/05, paolo <[EMAIL PROTECTED]> wrote:
> I'd like that once a user select or change a component from the
> component's listbox, its price appears somewhere. I'd like to avoid the
> javascript solution, as probably it wouldn't be trivial and I don't
> know javascript well.. So I thought to ch
On 8/26/05, xtian <[EMAIL PROTECTED]> wrote:
> I think that line should be
> job = meta.ForeignKey(Job, null=True)
>
> The _id is implied - it's part of the machinery that links your Log to
> your Job. Semantically, your log is linked to a job, not a jobid.
Yeah, xtian is right -- it should be
On 8/26/05, paolo <[EMAIL PROTECTED]> wrote:
> ... So I thought to change __repr__ to return a
> tuple containing self.code and self.price, but some problems arise.
> ...
Hi paolo -
__repr__ has to return a string - if that was what you wanted, you
could use string formatting to include the pric
Using the following model it is possible to add an arbitrary number of
components (with a quantity) to configurations.
class Configuration(meta.Model):
pass fields definition.
class META:
pass meta definition
class Component(meta.Model):
code = meta.CharField('Code'
I think that line should be
job = metaForeignKey(Job, null=True)
The _id is implied - it's part of the machinery that links your Log to
your Job. Semantically, your log is linked to a job, not a jobid.
On 8/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Seems like my ForeignKeys are
Seems like my ForeignKeys aren't working any more. This is my model
(abbreviated):
---
class Log(meta.Model):
id = meta.AutoField(primary_key=True)
jobid = meta.ForeignKey(Job, null=True)
status = meta.CharField(maxlength=1, default='U')
timestamp
17 matches
Mail list logo