This is what you are after:
https://docs.djangoproject.com/en/1.6/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model
cheers
L.
On 2 July 2014 21:42, Jonathan Querubina wrote:
> My problem is doing this on django-admin.
>
> Thanks!
>
> On Jul 2, 2014, at 8:31 AM, Lachlan Musicman wro
My problem is doing this on django-admin.
Thanks!
On Jul 2, 2014, at 8:31 AM, Lachlan Musicman wrote:
> There are a couple of ways to do it, filtered queries are the obvious solution
>
> https://docs.djangoproject.com/en/1.6/topics/db/queries/#retrieving-specific-objects-with-filters
>
> But
Is there a way to set the ForeignKey(User) or ForeignKey(PermissionGroup)
automatically by the logged user?
On Jul 2, 2014, at 8:31 AM, Lachlan Musicman wrote:
> There are a couple of ways to do it, filtered queries are the obvious solution
>
> https://docs.djangoproject.com/en/1.6/topics/db/q
There are a couple of ways to do it, filtered queries are the obvious solution
https://docs.djangoproject.com/en/1.6/topics/db/queries/#retrieving-specific-objects-with-filters
But it would require that your model have either a group or owner
permission set.
(eg
class MyModel(models.Model):
p
Hi guys,
I need to customize my admin to show only the data related to the user who
inserted.
Example: When a user log in, the admin shows only the posts inserted by this
user.
AFAIK, django only set permissions my model, not by objects.
Is there a way (or a pip package) to implement this?
5 matches
Mail list logo