Are trying to save data for Customer that does not exist in your
CustomerData table yet. Because I think the error is tries to inform you
that Billing data can only be created for a customer that already exists on
you CustomerData
On Sunday, August 25, 2019 at 5:17:24 PM UTC+3, Asaduzzaman Sohe
I've two model. I would like to save data from ForeignKey model. I'm
created a modelform and save with my main foreignkey model. But I got this
error ValueError at /c/customer/1/ Cannot assign "'1'":
"BillingData.customer" must be a "CustomerData" instance.
I created Django model form and ho
I believe the warning is incorrect. See
https://code.djangoproject.com/ticket/23615 for the disucssion.
On Wednesday, February 20, 2019 at 12:25:46 PM UTC-5, Eric Palmitesta wrote:
>
> The Django docs (
> https://docs.djangoproject.com/en/1.11/topics/db/models/#field-name-restrictions)
>
> stat
The Django docs
(https://docs.djangoproject.com/en/1.11/topics/db/models/#field-name-restrictions)
state there are only two restrictions on model field names:
1. A field name cannot be a Python reserved word
2. A field name cannot contain more than one underscore in a row
However, give
On Wednesday, February 6, 2013 1:39:30 AM UTC-5, vijay shanker wrote:
> I have two models, a Customer model and a WishListItem model (which stores
> products). I have option of either having a ManyToManyField in Customer to
> WishListItem, or I can have a customer ForeignKey to customer for each
On Wed, Feb 6, 2013 at 8:48 AM, Daniel Roseman wrote:
> On Tuesday, 5 February 2013 22:39:30 UTC-8, vijay shanker wrote:
>
>> Hi
>> I have two models, a Customer model and a WishListItem model (which
>> stores products). I have option of either having a ManyToManyField in
>> Customer to WishListIt
On Tuesday, 5 February 2013 22:39:30 UTC-8, vijay shanker wrote:
> Hi
> I have two models, a Customer model and a WishListItem model (which stores
> products). I have option of either having a ManyToManyField in Customer to
> WishListItem, or I can have a customer ForeignKey to customer for each
Hi
I have two models, a Customer model and a WishListItem model (which stores
products). I have option of either having a ManyToManyField in Customer to
WishListItem, or I can have a customer ForeignKey to customer for each
WishListItem.
Which one will be more efficient ?
Thanks
--
You recei
For the record, I've looked deep into django's code to find what needs to be
done, but I think that simply subclassing ForeignKey will not be enough.
NB: I use South for managing my database schema, so I figure I'll need to do
something about that too. But it may be out of the subject here :)
-
Bump ;-)
I know my question is a bit technical but could someone help ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/WuyUm2Xs5jYJ.
To post to this grou
Here is a related question
http://stackoverflow.com/questions/3558907/django-foreignkey-which-does-not-require-referential-integrity
Could you give me some orientation on how to create a custom ForeignKey
field that does not create database constraints with syncdb and south
migrations?
Thanks
On Sep 14, 7:19 pm, Artur Ergashev wrote:
> I'm working on some models for a legacy database structure, and am
> having a road_block with Foreign Keys and non-conventional names.
>
> As I understand it, if in my model I have something like:
>
> something = ForeignKey(something)
>
> then django wi
I'm working on some models for a legacy database structure, and am
having a road_block with Foreign Keys and non-conventional names.
As I understand it, if in my model I have something like:
something = ForeignKey(something)
then django will look for the something_id field in my table when
look
hi,
it seems that there is a small bug for not creating the foreign key on
the database. Please see this ticket.
http://code.djangoproject.com/ticket/4930#preview
Thanks
james
On Jul 20, 9:05 am, james_027 <[EMAIL PROTECTED]> wrote:
> anyone to help me on this?
>
> thanks
> james
>
> On Jul 19
anyone to help me on this?
thanks
james
On Jul 19, 3:20 pm, james_027 <[EMAIL PROTECTED]> wrote:
> Hi Nathan,
>
> I did manage.py syncdb with the table still not existing. I did
> manage.py sqlall myapps when saw that the foreign key was not created.
>
> here is my actual source code.
>
> from d
Hi Nathan,
I did manage.py syncdb with the table still not existing. I did
manage.py sqlall myapps when saw that the foreign key was not created.
here is my actual source code.
from django.db import models
from django.contrib.auth.models import User as AdminUser
# Create your models here.
DEPA
manage.py syncdb won't add new fields to the database if the table
already exists. You'll have to do this yourself. See manage.py sqlall
for some help.
Otherwise, if you have: user = models.ForeignKey(User), then look for
a field named user_id in your table.
Nathan Ostgard
On Jul 18, 9
hi,
I have a model with a field models.ForeignKey(), with manage.py
validate I check if my code are right, then run manage.py syncdb. When
I was checking the tables generated I don't see any foreign key
created? Is there something wrong? where should I check?
I am using django 0.96, mysql 5 on w
18 matches
Mail list logo