Thanks Collin. That's the path I've had to take.
On 03/11/2014 11:55 am, "Collin Anderson" wrote:
> Hi Mario,
>
> If you are able to edit the model replacing the IntegerField with this
> should do what you want:
> user = models.ForeignKey(CRMUser, null=True, blank=True,
> on_delete=DO_NOTHING)
>
Hi Mario,
If you are able to edit the model replacing the IntegerField with this
should do what you want:
user = models.ForeignKey(CRMUser, null=True, blank=True,
on_delete=DO_NOTHING)
Collin
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
Here's the models code, DR:
class CRMUser(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(
verbose_name='Email Address',
max_length=255,
unique=True,
)
first_name = models.CharField("First Name", max_length=50, blank=True)
last_name = models.C
I did not produce the original model so I wouldn't know. My thinking is
that the order model had to be independent of the user model so that the
deletion of the user doesn't cascade down to orders. It's a mezzanine site
and that's how it handles fk from orders to users.
On 29/10/2014 9:27 pm, "Dani
On Wednesday, 29 October 2014 03:57:36 UTC, somecallitblues wrote:
>
> Hi list,
>
> I have a table of orders where one of the columns is a IntegerField
> containing the id of a user who created the order.
>
> Since it's not a FK field django admin can't display these orders inline
> inside the u
Hi list,
I have a table of orders where one of the columns is a IntegerField
containing the id of a user who created the order.
Since it's not a FK field django admin can't display these orders inline
inside the user details page.
I would normally use something like:
class OrderInline(admin.Tab
6 matches
Mail list logo