Coder Social home page Coder Social logo

django-logentry-admin's Introduction

django-logentry-admin

travis-ci coverage requires-io pypi-version

Show all LogEntry objects in the Django admin site.

Originally based on: Django snippet 2484

Supported versions

  • Django 3.2, 3.1, 2.2
  • Python 3.9, 3.8, 3.7, 3.6, 3.5

Installation

Install by using pip or easy_install:

pip install django-logentry-admin

Or install from source:

git clone [email protected]:yprez/django-logentry-admin.git
cd django-logentry-admin
python setup.py install

To add this application into your project, just add it to your INSTALLED_APPS setting:

INSTALLED_APPS = (
    ...
    'logentry_admin',
)

Running tests

Test on all Python / Django versions with tox:

$ pip install tox
$ tox

Or just a specific Django / Python version:

$ tox -e py35-django19

Or run on multiple CPUs in parallel with detox to make it faster:

$ pip install detox
$ detox

django-logentry-admin's People

Contributors

andrewgy8 avatar asfaltboy avatar bashu avatar brad avatar delneg avatar diraol avatar gotlium avatar interdist avatar jaylett avatar jonathanwillitts avatar julienc91 avatar mastizada avatar motiteux avatar mpyrev avatar pacotole avatar pauloxnet avatar sbiyyala avatar thijstriemstra avatar vaal- avatar yprez 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-logentry-admin's Issues

Names of actions conflict with translations elsewhere

I think the names of the actions (addition, deletion, change) should be marked for translation with context (pgettext_lazy), to avoid them being incorrectly translated. Mainly the word “change” is problematic, because it is ambiguous in English (can be either a verb or a noun).

Fix Django 1.8 warning

RemovedInDjango18Warning: `LogEntryAdmin.queryset` method should be renamed `get_queryset`

RemovedInDjango18Warning

I get a warning error:
(django_processman)➜ processman git:(master) ✗ python manage.py runserver
/Users/lwiskie/.virtualenvs/django_processman/lib/python2.7/site-packages/django/forms/widgets.py:143: RemovedInDjango18Warning: LogEntryAdmin.queryset method should be renamed get_queryset.
.new(mcs, name, bases, attrs))

/Users/lwiskie/.virtualenvs/django_processman/lib/python2.7/site-packages/django/forms/widgets.py:143: RemovedInDjango18Warning: LogEntryAdmin.queryset method should be renamed get_queryset.
.new(mcs, name, bases, attrs))

Seems ike a quick fix.

Add test for Django 3.1

Add test for Django 3.1 and update Django 3.1 compatibility list in README.md and setup.py

Admin should probably be completely readonly

Currently the delete object action is still enabled, which strikes me as wrong (unless you have no superusers and dish out all permissions precisely). Something like this has worked for me in the past:

    def get_actions(self, request):
        actions = super(LogEntryAdmin, self).get_actions(request)
        if 'delete_selected' in actions:
            del actions['delete_selected']
        return actions

Tox tests failing for py36-flake8 / Django 3.2

Tox tests for py36-flake8 are currently failing.

There is no Django version specified for py36-flake8, so tox is testing with the latest version of Django, 3.2.

Django 3.2. requires a SECRET_KEY (source: Django 3.2 Settings) to run, so to fix the failing test this SECRET_KEY needs adding to the conftest.py file.

It would make sense at the same time to introduce tests for the latest versions of Python (3.9) and Django (3.2).

Remove unsupported versions of Python and Django

Official support for Python 2.7 ended some months ago, after that no bug fixes or security updates has been released.

Additionally the oldest Django version support is 2.2. LTS that support only Python 3.5+

I think it is time to remove code from Django LogEntry Admin related to Python 2.7-3.4 and Django < 2.2

The following checklist can tracks the progress of this endeavour:

  • remove Python 2-3.4 / Django < 2.2 support in .travis.yml and tox.ini
  • remove Python 2-3.4 / Django < 2.2 classifiers in setup.py
  • remove six from the code
  • remove __future__ statements from the code
  • update README.rst accordingly
  • remove comments related to Python 2-3.4 / Django < 2.2 from the code

prevent escaping urls

For user_link and object_link you must use django.utils.format_html to prevent escaping url on template

Write some tests

A simple django project that runs syncdb/migrations/validate/check and perhaps tests the admin views for a bit would be enough.

Would be nice to autorun tests with travis using different envs (python/django version)

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.