Giter Club home page Giter Club logo

django-papertrail's People

Contributors

chazeah avatar emorozov avatar eranrund avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

django-papertrail's Issues

Pagination on the object entries page

When an object changes many times the list of changes grow. At the moment is not possible to have pagination on this. I created a pull request with an implementation of the pagination for this particular case. #12

Happy to discuss alternatives and put the time to fix this.

django-papertrail requires "target" objects to be registered with Django's ModelAdmin

Undocumented in django-papertrail is that all objects in "target" must be registered with Django's ModelAdmin, or otherwise loading the log message's page in the Django admin panel will fail ungracefully. I see a couple of ways forward here:

  1. This could simply be a documentation fix.
  2. We could check targets at the time they're added to django-papertrail to see whether these targets are part of ModelAdmin, and raise an error if they are not. This has the weakness that if at some point in the future a model was removed from the ModelAdmin, this error would occur and be difficult to understand or debug.
  3. We could check in the admin_reverse_for_model function whether said model is in ModelAdmin (or catch the error here when the reverse isn't found), and if it's not then simply print a warning in place of the ModelAdmin link that a developer needs to add said model to ModelAdmin in order for it to be visible in django-papertrail.

I love django-papertrail, and if you advise on your favorite approach to resolving this issue, I'd be happy to submit a PR.

Monitor object changes without registering a ModelAdmin

Is it possible for papertrail to hook into all models and log their changes. I want to have a list of:
user, model class, attrbiute, old_value, new_value, timestamp.

From what I can tell in the docs such integration isn't possible. From what I can figure out of Django's model signals we don't have information about which is the current user who performs the action but we do have info if an object was created/deleted and what fields were up for an update.

Arbitrary instance in `targets`

Hi your package is useful. I appreciate your reusable app very much.
After I read your document I tough targets is able to do generic relation and reverse query back to the original record. Therefore I put my Company and Branch instance to it and it raises the error

TypeError: int() argument must be a string, a bytes-like object or a number, not 'Company'

targets = {
            'company': company,
            'branch': branch,
        }

Do you have plan to expand the feature to cover arbitrary instance?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.