validation using Form.clean_xxx().
2. Form cross-field validation using Form.clean().
3. Model validation, including validating the FK.
like this:
...
File "/.../django/forms/forms.py", line 197, in is_valid return
self.is_bound and not self.errors File "/.../django/forms/forms.py
e_numbers.exists():
>> raise ValidationError("SMS notifications cannot be enabled
>> because this user has no phone number")
>>
>> I *think* it’s OK, but the documentation for Model.clean() seems
>> somewhat vague about what sorts of checks one
r.phone_numbers.exists():
> raise ValidationError("SMS notifications cannot be enabled
> because this user has no phone number")
>
> I *think* it’s OK, but the documentation for Model.clean() seems somewhat
> vague about what sorts of checks one may implement. S
Error("SMS notifications cannot be enabled
because this user has no phone number")
I *think* it’s OK, but the documentation for Model.clean() seems somewhat
vague about what sorts of checks one may implement. Specifically, it says,
“This method should be used to provide custom model valida
On Friday, September 28, 2012, Babatunde Akinyanmi wrote:
> Let me try to assist. A forms is_valid method causes 3 types of
> cleaning methods to be run. Based on that, I'm sure you really don't
> need to override it.
>
>
Yes, I've just discoverde the ValidationError e part of the docs :|
> I r
Let me try to assist. A forms is_valid method causes 3 types of
cleaning methods to be run. Based on that, I'm sure you really don't
need to override it.
I really don't understand what you mean by "I want the description
field to be not blank/not the empty string" so maybe I could have been
of mor
Hola,
I'm searching without much luck and can't see the answer in the docs.
Am wanting to override the is_valid() method on a model (I think
that's what I want).
Basically, I have a choices field, and if one of those choices is
selected, then I want a description field to be not blank/not the
em
ddress must be
unique. It could either fail because 1. It's not Unique (or) 2. It's an
invalid email address.
What I really want to do is determine the exception/error-type so that I
can handle it appropriately.
On Wed, Sep 12, 2012 at 7:09 PM, Kurtis mailto:kurtis.mull...@gmail.com>>
27;s an
invalid email address.
What I really want to do is determine the exception/error-type so that I
can handle it appropriately.
On Wed, Sep 12, 2012 at 7:09 PM, Kurtis wrote:
> Hey Guys,
>
> Do you have any suggestions on a good way to grab error types during Model
> Validation?
Hey Guys,
Do you have any suggestions on a good way to grab error types during Model
Validation? I'm not using Forms or HTML. First, here's a simplified snippet
showing my current format for Model Data Validation.
my_object = MyModel(**data_dict)
try:
my_object.
Jani, thank you.
2012/4/4 Jani Tiainen :
> Hi,
>
> You'ew hitting limitation of Django ORM which prohibits overriding fields.
>
> https://docs.djangoproject.com/en/1.3/topics/db/models/#field-name-hiding-is-not-permitted
>
>
> 4.4.2012 6:34, shiva kirjoitti:
>
>> Hello!
>>
>> In our apps (that use
Hi,
You'ew hitting limitation of Django ORM which prohibits overriding fields.
https://docs.djangoproject.com/en/1.3/topics/db/models/#field-name-hiding-is-not-permitted
4.4.2012 6:34, shiva kirjoitti:
Hello!
In our apps (that use Django 1.2.7) we use following models:
class BaseRegistratio
Hello!
In our apps (that use Django 1.2.7) we use following models:
class BaseRegistration(models.Model):
exhibition = models.ForeignKey(...)
year = models.IntegerField(...)
user = models.ForeignKey('auth.User')
class BarcodeRegistration(BaseRegistration):
class M
hi there,
has anyone of you an idea in which cycle the field method of
ForeignKey.validate is triggered?
I have a custom ForeignKey Field where i override the validate method.
So i expect that
ModelForm validation triggers
-> Model validation (clean methods) and this trigg
hi all
i have a admin model with tabluarinlines.
i want to do some additinal validations in the clean() function of the
model, but the validations (sum aggregation) depends on the relatated
objects (inlines).
where can i "hook" me in, to perform the validations after the related
objects were sav
Well, with the new knowledge about the debugger I found the place
where BaseModelForm calls all three form-validation methods in forms/
models.py:306:_post_form
Sorry.
On Sep 29, 9:26 pm, momo2k wrote:
> That explains my thoughts that the debugger is "disturbing" the
> correct execution of the c
That explains my thoughts that the debugger is "disturbing" the
correct execution of the code, but this discussion does *not* (!)
answer my question where the *model* of a *ModelForm* gets full_clean-
ed - and why it doesn't do so in my case.
On Sep 29, 8:48 pm, Shawn Milochik wrote:
> This exact
This exact thing was just discussed on this list.
https://groups.google.com/d/topic/django-users/R2HUGqZ1BAQ/discussion
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsub
rrors attribute of a
ModelForm has always triggered form validation, but as of Django 1.2,
it will also trigger model validation. This has the side-effect of
cleaning the model you pass to the ModelForm constructor. For
instance, calling is_valid() on your form will convert any date fields
on your mod
Looks like you want to use this field:
https://docs.djangoproject.com/en/dev/ref/models/fields/#positiveintegerfield
On Sat, Sep 24, 2011 at 11:54 PM, jenia ivlev wrote:
> I have a model M that has a field num=models.IntegerField()
> I have a modelform called 'F' for model 'M'.
> I want to ensur
I have a model M that has a field num=models.IntegerField()
I have a modelform called 'F' for model 'M'.
I want to ensure that num is never negative.
If I do validation in my form class, 'F', then i can do clean_num():
if negative than throw ValidationError('Num can never be negative').
This valid
hi Everyone
I have a model that i exported from a legacy database. when i start
the server it tells me that some of the fields cannot have unique=true
with a string CharField with a length over 255.
Is there a way to override the model validation that runs on server
start?
Thanks,
Allan
--
You
On Thu, Feb 3, 2011 at 12:30 PM, Miguel Araujo wrote:
> Las try or I will report it as a bug as I think it is.
>
Your original post was a bit sparse on code/traceback details for the actual
problem you observed. The only specific code you showed was the lines you
added to work around the problem
everyone,
>>
>> I have a model A that has a overwritten save method that updates a model
>> B's field. Both (A & B) have model validation using full_clean method.
>> Problem is that B model's validation fails when updating the field, because
>> it raises an Integr
Well,
I'm just trying to figure out if this should be reported.
Thanks, regards
Miguel Araujo
@maraujop
2011/1/22 Miguel Araujo
> Hi everyone,
>
> I have a model A that has a overwritten save method that updates a model
> B's field. Both (A & B) have model v
Hi everyone,
I have a model A that has a overwritten save method that updates a model B's
field. Both (A & B) have model validation using full_clean method. Problem
is that B model's validation fails when updating the field, because it
raises an IntegrityError saying the primary key
On 13 ?.?. 2010, at 22:07, Javier Guerra Giraldez wrote:
> 2010/10/13 Jonathan Barratt :
>> not being an SQLite user myself but knowing the database image is a simple
>> single file
>
> you'd be surprised to learn that a good single-file architecture can
> be waaay faster than a more complex sys
2010/10/13 Jonathan Barratt :
> not being an SQLite user myself but knowing the database image is a simple
> single file
you'd be surprised to learn that a good single-file architecture can
be waaay faster than a more complex system. (good examples include
Tokyo Cabinet and Varnish and, yes, SQL
On 13 ?.?. 2010, at 17:43, Russell Keith-Magee wrote:
> 2010/10/13 Jonathan Barratt :
>> On 13 ?.?. 2010, at 2:31, Jorge Vargas wrote:
>
>> A database migration might not be the sort of effort you were looking for,
>> but I can only imagine that moving from SQLite to Postgres or MySQL would
>>
2010/10/13 Jonathan Barratt :
> On 13 ?.?. 2010, at 2:31, Jorge Vargas wrote:
> A database migration might not be the sort of effort you were looking for,
> but I can only imagine that moving from SQLite to Postgres or MySQL would
> offer you the largest possible performance gains...
Unlikely.
On Wed, Oct 13, 2010 at 3:31 AM, Jorge Vargas wrote:
> Hello,
>
> I recently inherited a project that uses a lot of model validations
> and is mainly just a model (we have two django apps that use it as
> their backend).
>
> The test suite currently returns
>
> Ran 460 tests in 980.347s
> That is
On 13 ?.?. 2010, at 2:31, Jorge Vargas wrote:
> Hello,
>
> I recently inherited a project that uses a lot of model validations
> and is mainly just a model (we have two django apps that use it as
> their backend).
>
> The test suite currently returns
>
> Ran 460 tests in 980.347s
> That is runn
Hello,
I recently inherited a project that uses a lot of model validations
and is mainly just a model (we have two django apps that use it as
their backend).
The test suite currently returns
Ran 460 tests in 980.347s
That is running on a SQLite db.
Is this normal/expected behavior ? is there a
On Mon, Aug 30, 2010 at 10:34 PM, Victor Hooi wrote:
> Just playing around - I noticed that setting "unique=True" on a
> DateTimeField() doesn't seem to work? As in, I was able to do
> something like:
>
> b1 =
>
> BandwidthUsageEntry(start_of_usage_block=datetime.datetime(2007,05,05,12,05),
>
> e
heya,
I have a model that contains a whole bunch of bytes in/out for
datetime ranges. I.e.:
class BandwidthUsageEntry(models.Model):
start_of_usage_block = models.DateTimeField()
end_of_usage_block = models.DateTimeField()
bytes_in = models.IntegerField()
bytes_out = models.Intege
Sounds good. Thanks for the advice!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
Fo
On 30/08/10 15:12, Owen Nelson wrote:
> I just started to wonder if the ORM would, I don't
> know... "freak out" on the off-chance I run a query that returns a set of
> objects with duplicate values on what is supposed to be the pk.
Nah, you just get multiple objects back with the same "pk", map
ing save() to make it raise
NotImplementedError (it's a read-only database after all).
> I'm not sure about django 1.2+ model validation with the hack, though,
> or even just django 1.2. We use the hack - but presently with 1.1.
>
Good deal. I'd be targeting 1.2+ so I'll just hav
odels.CompositeField(['foo', 'bar'], primary_key=True)
work, but right now it doesn't.
> loads/validates I'm happy.
I'm not sure about django 1.2+ model validation with the hack, though,
or even just django 1.2. We use the hack - but presently with
I've got an external (read-only) database that I'd like to hook into
an app I'm working on -- it violates django's pk assumption by using
composite keys.
I'm hoping that, given a couple of assumptions of my own, I can hook
these tables up to the ORM without having the universe implode.
Since the d
Take a look into pool app from django tutorial. How can i make validation
of Question model to have at least two Answer entered, if
admin.TabularInline is used?
http://docs.djangoproject.com/en/1.2/intro/tutorial02/#adding-related-objects
--
Linux user
--
You received this message because
Thanks very much for your reply!
I got it working now. At first I couldn't get my head around how it
would work using the clean of the intermediary model. But after a
night's sleep it made sense to me.
In the Admin my Permission model (the users field) is an inline of
Application and when I put the
Hi Heleen,
I think this is because your running the users through an intermediate
model. That changes the way you need to work with the M2M data. You
should be working on the Permission model/objects instead. If you
check out the M2M docs for models via an intermediate:
http://docs.djangoproject.
On Wed, Jul 14, 2010 at 3:50 PM, Nuno Maltez wrote:
> Sorry, I can't reproduce your error with django 1.2.
>
> I copied your models (just removed the intermediaty "Permission"
> because I don't know your User model) into a new app and I have 2
Oops, forgot to add i made the ManyToMany a relation
Sorry, I can't reproduce your error with django 1.2.
I copied your models (just removed the intermediaty "Permission"
because I don't know your User model) into a new app and I have 2
scenarios Adding an Application in the admin:
a) if I select a User and Folder, the validation runs just fine
b)
Thank you for your reply.
Yes I have selected a user and folder.
I believe ManyToMany fields are always optional (hence many to many).
So my users and company fields are optional, but my folder field
isn't.
When I add a new Application in the Admin I do specify a folder and
users (if I don't I wou
Hi,
Just a guess: have you actually selected a user and a folder when
submitting the form? I think only valid field are present on the
cleaned_data dict, and your users and folder fields are not optional
(blank=True, null=True).
hth,
nuno
On Tue, Jul 13, 2010 at 1:45 PM, Heleen wrote:
> Hello,
Hello,
I have the following classes:
class Application(models.Model):
users = models.ManyToManyField(User, through='Permission')
folder = models.ForeignKey(Folder)
class Folder(models.Model):
company = models.ManyToManyField(Compnay)
class UserProfile(models.Model):
user = models.OneToOneFie
On Jun 16, 8:20 am, MH wrote:
> Hi,
> I'm making a model, that has a bit complex dependencies between the fields,
> such as date progression (start_date must not be later than finish_date).
> I'm looking for a way to validate these dependencies while creating (or
> saving) the model, but I am not
Hi,
I'm making a model, that has a bit complex dependencies between the fields,
such as date progression (start_date must not be later than finish_date).
I'm looking for a way to validate these dependencies while creating (or
saving) the model, but I am not sure which approach should I use.
The be
hi,
I have a modelForm for a model where one field is excluded. One of the lines in
my model validation needs that field - so model validation fails with a
'DoesNotExist' error. How does one get round this? The relevant parts of the
model and the traceback are appended. The field e
Ramiro, great work on this! With your second patch I'm back in
business - with optgroups!
On a related matter, I don't often want a "blank" option when I use
choices/selects. I've been setting default selections and eliminating
the "blank" line as described on 11/07/07 by semenov in #4653 using a
Ramiro, great work on this! With your second patch I'm back in
business - with optgroups!
On a related matter, I don't often want a "blank" option when I use
choices/selects. I've been setting default selections and eliminating
the "blank" line as described on 11/07/07 by semenov in #4653 using a
On Thu, Jan 28, 2010 at 2:46 PM, Thomas B. Higgins
wrote:
> I've done some further checking, and see that this issue has two
> parts. The first part is certainly a bug. Basically, selects with
> optgroups are broken. Here's the ticket:
> http://code.djangoproject.com/ticket/12722.
Sorry I didn't
not be
> necessary to fill the field, even if blank=False.
>
> FloatFields with choices and IntegerFields with choices continue to
> behave as expected.
>
> It seems clear that when the is_valid() method is run on the form,
> something bad is happening to CharFields with choices,
reported as invalid, probably by automatic model
> validation.
>
> My code works fine under version 1.1.1 and I see nothing in the
> development documentation to explain this odd new behavior.
>
> Any thoughts?
>
What you are describing is not ringing any bells and I cannot r
ems clear that when the is_valid() method is run on the form,
something bad is happening to CharFields with choices, and this type
of field only, and perfectly valid string selections or string
defaults are being reported as invalid, probably by automatic model
validation.
My code works fine under version
2009/11/12 Dirk Uys :
> On Thu, Nov 12, 2009 at 2:23 PM, rebus_ wrote:
>
>>
>> You can add custom clean methods in your form:
>>
>> class Event (models.Model):
>> start_date = models.DateField()
>> end_date = models.DateField()
>>
>> def clean(self):
>> start = self.cleaned_data.get(
On Thu, Nov 12, 2009 at 2:23 PM, rebus_ wrote:
> You can add custom clean methods in your form:
>
> class Event (models.Model):
>start_date = models.DateField()
>end_date = models.DateField()
>
>def clean(self):
> start = self.cleaned_data.get('start_date', False)
> end =
2009/11/12 Dirk Uys :
> I have a model with a from and to date:
>
> class Event (models.Model):
> start_date = models.DateField()
> end_date = models.DateField()
>
> In order to ensure start_date is always before end_date i can think of 3
> options:
>
> 1. Use form validation iow in the cle
I have a model with a from and to date:
class Event (models.Model):
start_date = models.DateField()
end_date = models.DateField()
In order to ensure start_date is always before end_date i can think of 3
options:
1. Use form validation iow in the clean method of an inherited form
2. Use t
On Nov 2, 10:27 pm, Karen Tracey wrote:
> On Mon, Nov 2, 2009 at 1:41 PM, Mark L. wrote:
>
> > As the subject states, I am using the model-validation branch at the
> > moment, which allows me to do, well, validation in the models.
>
> > I've however, noticed
On Mon, Nov 2, 2009 at 1:41 PM, Mark L. wrote:
>
> As the subject states, I am using the model-validation branch at the
> moment, which allows me to do, well, validation in the models.
>
> I've however, noticed a very strange behaviour of the validation
> logic, - any time
As the subject states, I am using the model-validation branch at the
moment, which allows me to do, well, validation in the models.
I've however, noticed a very strange behaviour of the validation
logic, - any time the clean() method is fired on the
"materialized" (saved or ret
On Sep 15, 11:19 pm, Sonal Breed wrote:
> Thanks a lot Cliff, I implemented it in a similar manner, just wanted
> to know if we
> have anything like validation rules a la Access.
>
> Thanks again,
> Sincerely,
> Sonal.
Not yet. Honza Kral's Google Summer of Code proje
Thanks a lot Cliff, I implemented it in a similar manner, just wanted
to know if we
have anything like validation rules a la Access.
Thanks again,
Sincerely,
Sonal.
On Sep 15, 3:08 pm, "J. Cliff Dyer" wrote:
> Override the save method on your model, something like:
>
> class MyModel(models.Mode
Override the save method on your model, something like:
class MyModel(models.Model):
field1 = models.TextField(blank=True)
field2 = models.TextField(blank=True)
def save(self):
if (self.field1 and self.field2):
raise ModelValidationError, "only one can live"
Hi all,
I have a model wherein I want to put a validation as
You must enter Field1 or Field2, but not both.
This model is at the back end and not visible through forms.
How do I accomplish it?
Thanks,
Sincerely,
Sonal
--~--~-~--~~~---~--~~
You received this mess
docs on those topics. If
anyone could point a link ...
Thanks, Alain.
On 1 sep, 14:32, Thomas Guettler wrote:
> Hi,
>
> Up to now Model Validation is not possible with django. You need to use
> a ModelForm. The documentation contains examples how to do custom validation.
>
>
Hi,
Up to now Model Validation is not possible with django. You need to use
a ModelForm. The documentation contains examples how to do custom validation.
alain31 schrieb:
> Hello, I wrote a model to manage small TeX fragments:
>
> class LaTeX(models.Model):
> latex = mode
d model.id ...
- I found http://code.djangoproject.com/ticket/6845 with a patch to do
model validation (1 year ago) that looks
like what I need, but is it stable?
Any hint ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
&q
I just found the error.
This is the correct code
class AbstractContent(models.Model):
viewed = models.PositiveIntegerField(max_length=7, blank=True,
null=True)
#rating =
#ranking =
created_by = models.ForeignKey(User,
related_name="%(class)s_create
Hi,
I did by mistake copy and paste the coding from my editor.
But in my coding it is "User". Still I have the same error.
Steve
On Sun, Jul 19, 2009 at 12:36 AM, Joshua Russo wrote:
> On Sat, Jul 18, 2009 at 9:03 PM, sjtirtha wrote:
>
>> class AbstractContent(models.Model):
>> viewed
On Sat, Jul 18, 2009 at 9:03 PM, sjtirtha wrote:
> class AbstractContent(models.Model):
> viewed = models.PositiveIntegerField(max_length=7,
> blank=True, null=True)
> #rating =
> #ranking =
> created_by = models.ForeignKey(User)
> changedBy
Hi,
I try to call manage.py syncdb for my models, but I always get error
Lasttime, I solve the problem, by defining related_name for changedBy
attribute.
But now, I got the same problem after I define the model as abstract.
Error: One or more models did not validate:
person.person: Accessor for f
On Jan 12, 6:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> Did you miss the "This is an experimental feature!" note at the top of:
>
> http://www.djangoproject.com/documentation/models/validation/
>
> ?
>
> Last I recall seeing it ment
te
>return self.cursor.execute(sql, params)
> ProgrammingError: value too long for type character varying(15)
>
> BANG!
>
> I'd be expecting for Django to tell me before postgres does, that the
> field does not validate. Am I misunderstanding something?
>
Did you miss the &quo
I've actually written a couple of basic apps in Django but today I
thought I'd play around with doc tests and realised I didn't know as
much as I thought I did. This is all done with latest trunk.
Let's take a model definition that has just the following:
class PartType(models.Model):
code
Does anyone know if the Model class validate() method will be ready
any time soon? I am trying to learn Django but don't want to spend a
lot of time hacking save() work-arounds if new core features will
resolve the issue of business logic validation within models.
-- Eric --
On Oct 24, 12:11 am
ld love to help move this work along or contribute in any way
> > possible to completing model validation. In my project it is the #1
> > missing feature, requiring quite a few violations of DRY. I have a
> > large backend set of functionality where I want to use my models and
>
le to call
> > my_model.validate() and have things work similarly to how they do with
> > newforms.
>
> are their open bugs or a branch where this work is being done? I
> would love to help move this work along or contribute in any way
> possible to completing model v
ith
> newforms.
are their open bugs or a branch where this work is being done? I
would love to help move this work along or contribute in any way
possible to completing model validation. In my project it is the #1
missing feature, requiring quite a few violations of DRY. I have a
large backe
On Wed, 2007-10-31 at 18:05 -0700, Ken wrote:
>
>
> On Oct 31, 6:07 pm, Ken <[EMAIL PROTECTED]> wrote:
>
> >
> > I have a similar thing I wish to accomplish. It's not quite model
> > validation, rather model completion. The form provides a field tha
On Oct 31, 6:07 pm, Ken <[EMAIL PROTECTED]> wrote:
>
> I have a similar thing I wish to accomplish. It's not quite model
> validation, rather model completion. The form provides a field that
> fills one model field but has to be munged to fill a second model
back to, say, the
> admin interface or places like that. But it's the workaround you need to
> do at the moment.
>
> Regards,
> Malcolm
>
> --
I have a similar thing I wish to accomplish. It's not quite model
validation, rather model completion. The form provides a
On Wed, 2007-10-24 at 04:40 +, Camo wrote:
> Hi Guys,
>
> I just been working my way through Django, top framework by the way.
>
> Anyways I just wondering if any one can shed some light model
> validation,
>
> It seems the only validations are either through
On 24-Oct-07, at 10:10 AM, Camo wrote:
> So I was just wondering how people go about validating models.
overide the save() method and add your own business rules in the model
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~--
Hi Guys,
I just been working my way through Django, top framework by the way.
Anyways I just wondering if any one can shed some light model
validation,
It seems the only validations are either through the newforms or
simple validation through the fields. But there doesn't seem to b
On 3/10/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> Validation happens on the strings submitted from a form, *before* they
> are converted to Python objects (since there's no guarantee we can
> convert them without error). We do not have model-aware validation at
> the moment, but it is co
On Sat, 2007-03-10 at 16:59 -0600, Greg Donald wrote:
> On 3/10/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> > I assume you mean via some way other than a form or the admin interface,
>
> Model validation doesn't occur in the model itself?
Validation happens on
On 3/10/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> I assume you mean via some way other than a form or the admin interface,
Model validation doesn't occur in the model itself?
> because in those two cases, field validation should catch it.
What is "field validat
On Sat, 2007-03-10 at 11:53 -0600, Greg Donald wrote:
> Why doesn't this prevent me from entering an empty string into the database?
>
> name = models.CharField(maxlength=32, blank=False, null=False)
I assume you mean via some way other than a form or the admin interface,
because in those two ca
Why doesn't this prevent me from entering an empty string into the database?
name = models.CharField(maxlength=32, blank=False, null=False)
Thanks,
--
Greg Donald
http://destiney.com/
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Ah ... of course.
Thanks James!
Keep up the great work!
-Sandy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscr
On 11/9/06, ZebZiggle <[EMAIL PROTECTED]> wrote:
> My question is ... why is Accusation any different tan Message,
> ReadMessage or any of the other tables that relate back to Player?
The problem was that Accusation has *two* fields which relate to
Player. When 'related_name' isn't set, that mean
More on this:
If I change Accusation to:
class Accusation(models.Model):
game = models.ForeignKey(Game)
player = models.ForeignKey(Player, related_name='related_player')
accusedPlayer = models.ForeignKey(Player,
related_name='related_accusedPlayer')
isCommitted = models.BooleanFi
Hi there,
I've decided to drop my old 0.91 database and rebuild, rather than try
to upgrade it. So, in my dev environment I've dropped the database, but
now when I try to 'syncdb' I get the following validation error.
Error: Couldn't install apps, because there were errors in one or more
models:
You can disregard this thread.
This was a problem of circular references that i fixed over the weekend
(before the message was moderated) by passing the ForeignKey the string
of the Model name instead of the object (as per Django documentation!)
Also please disregard other messages like these (s
Hi all,
I have a problem with the app below (SVN repo with read access) and i
tried everything to fix it. Probably u guys can help. It seems to me
some problem with namespace import, particularly the *order* in which
the names are imported.
The code in the repo is already broken but u can "fix i
On 6/29/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
Hey russellm,thanks a lot for the extended model validation--it rocks! Youprobably saved me endless hours of debugging twisted things!No problems Michael - glad I could help you out.
Yours,Russ
1 - 100 of 101 matches
Mail list logo