How to use reversion for logging admin and user actions?

130 views
Skip to first unread message

vishy

unread,
Aug 2, 2010, 1:06:43 PM8/2/10
to Django Reversion Discussion
Hi,

I want to log all actions(admin as well as users).Now, how to go about
this? I have read the documentation.I have added the middleware,added
reversion in installed_apps.For the model,created the adminmodel class
-

class Order(models.Model):

class OrderAdmin(VersionAdmin):
model = Order

But,I don't see any entries in logentries nor in reversion tables.What
am I missing?

thanks

David Hall

unread,
Aug 3, 2010, 6:30:54 AM8/3/10
to django-r...@googlegroups.com
Hi,

That really should work. Just running syncdb with that setup should create a few base revisions for the model.

I suppose you've put the model in models.py, and the admin in admin.py?

If you send me a minimal project that doesn't work, I can take a look.

Dave.


--
You received this message because you are subscribed to the Google Groups "Django Reversion Discussion" group.
To post to this group, send an email to django-r...@googlegroups.com.
To unsubscribe from this group, send email to django-reversi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-reversion?hl=en-GB.




--
Dave Hall
Etianen.com

Telephone: 07525 452381
Web: http://www.etianen.com

vishy

unread,
Aug 4, 2010, 12:59:36 PM8/4/10
to Django Reversion Discussion

Hi

I got it working.I needed to to change in admin.py.




On Aug 3, 3:30 pm, David Hall <da...@etianen.com> wrote:
> Hi,
>
> That really should work. Just running syncdb with that setup should create a
> few base revisions for the model.
>
> I suppose you've put the model in models.py, and the admin in admin.py?
>
> If you send me a minimal project that doesn't work, I can take a look.
>
> Dave.
>
> On 2 August 2010 18:06, vishy <vishalsod...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I want to log all actions(admin as well as users).Now, how to go about
> > this? I have read the documentation.I have added the middleware,added
> > reversion in installed_apps.For the model,created the adminmodel class
> > -
>
> > class Order(models.Model):
>
> > class OrderAdmin(VersionAdmin):
> >    model = Order
>
> > But,I don't see any entries in logentries nor in reversion tables.What
> > am I missing?
>
> > thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django Reversion Discussion" group.
> > To post to this group, send an email to django-r...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-reversi...@googlegroups.com<django-reversion%2Bunsu...@googlegroups.com>
> > .

vishy

unread,
Sep 3, 2010, 5:17:36 AM9/3/10
to Django Reversion Discussion
Can I show all revisions in one place in admin section? If yes,how?

On Aug 3, 3:30 pm, David Hall <da...@etianen.com> wrote:
> Hi,
>
> That really should work. Just running syncdb with that setup should create a
> few base revisions for the model.
>
> I suppose you've put the model in models.py, and the admin in admin.py?
>
> If you send me a minimal project that doesn't work, I can take a look.
>
> Dave.
>
> On 2 August 2010 18:06, vishy <vishalsod...@gmail.com> wrote:
>
>
>
>
>
> > Hi,
>
> > I want to log all actions(admin as well as users).Now, how to go about
> > this? I have read the documentation.I have added the middleware,added
> > reversion in installed_apps.For the model,created the adminmodel class
> > -
>
> > class Order(models.Model):
>
> > class OrderAdmin(VersionAdmin):
> >    model = Order
>
> > But,I don't see any entries in logentries nor in reversion tables.What
> > am I missing?
>
> > thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django Reversion Discussion" group.
> > To post to this group, send an email to django-r...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-reversi...@googlegroups.com<django-reversion%2Bunsubscrib e...@googlegroups.com>
> > .

David Hall

unread,
Sep 3, 2010, 8:28:23 AM9/3/10
to django-r...@googlegroups.com
All revisions for all models in one place? Nope, not without creating a custom admin view.

django-reversion tries to slot nicely into the Django admin way of doing things, which means a separate history view for each model.

Best,

Dave.

To unsubscribe from this group, send email to django-reversi...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/django-reversion?hl=en-GB.

leandri...@gmail.com

unread,
Jun 20, 2016, 11:07:41 AM6/20/16
to django-reversion discussion group
i try to do when the user is changed or is created stored changes into database i got it, but django-revision also register an user which is loggin how to make dango-revisions not store when user loggin to the system django==1.7 django-reversion==1.8.3

Dave Hall

unread,
Jun 22, 2016, 6:17:27 AM6/22/16
to django-reversion discussion group
Any time a registered model is saved inside a revision block, a revision is saved to the database.

If you're using RevisionMiddleware, every request is inside a revision block, so every user login will save a revision.

The solution is to not use RevisionMiddleware, or to decorate your login view with: reversion.create_revision(manage_manually=True).


On Mon, 20 Jun 2016 at 16:07 <leandri...@gmail.com> wrote:
i try to do when the user is changed or is created stored changes into database i got it, but django-revision also register an user which is loggin how to make dango-revisions not store when user loggin to the system django==1.7 django-reversion==1.8.3

--
You received this message because you are subscribed to the Google Groups "django-reversion discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-reversi...@googlegroups.com.
To post to this group, send email to django-r...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-reversion.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages