mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-20 03:18:07 +08:00
@@ -27,7 +27,7 @@ before_script:
|
||||
install:
|
||||
- pip install -q django==$DJANGO
|
||||
- pip install -r requirements.txt
|
||||
- pip install pytest-django coveralls sphinx
|
||||
- pip install pytest-django codecov sphinx
|
||||
- python setup.py install
|
||||
|
||||
script:
|
||||
@@ -35,7 +35,7 @@ script:
|
||||
- sphinx-build -b html -d docs/_build/doctrees -nW docs docs/_build/html
|
||||
|
||||
after_success:
|
||||
- coveralls
|
||||
- codecov
|
||||
|
||||
notifications:
|
||||
webhooks:
|
||||
|
||||
@@ -200,8 +200,8 @@ Acknowledgements
|
||||
|
||||
.. |image0| image:: https://travis-ci.org/Koed00/django-q.svg?branch=master
|
||||
:target: https://travis-ci.org/Koed00/django-q
|
||||
.. |image1| image:: https://coveralls.io/repos/Koed00/django-q/badge.svg?branch=master
|
||||
:target: https://coveralls.io/r/Koed00/django-q?branch=master
|
||||
.. |image1| image:: http://codecov.io/github/Koed00/django-q/coverage.svg?branch=master
|
||||
:target: http://codecov.io/github/Koed00/django-q?branch=master
|
||||
.. |image2| image:: http://badges.gitter.im/Join%20Chat.svg
|
||||
:target: https://gitter.im/Koed00/django-q
|
||||
.. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest
|
||||
|
||||
@@ -104,6 +104,15 @@ class QueueAdmin(admin.ModelAdmin):
|
||||
'lock'
|
||||
)
|
||||
|
||||
def save_model(self, request, obj, form, change):
|
||||
obj.save(using=Conf.ORM)
|
||||
|
||||
def delete_model(self, request, obj):
|
||||
obj.delete(using=Conf.ORM)
|
||||
|
||||
def get_queryset(self, request):
|
||||
return super(QueueAdmin, self).get_queryset(request).using(Conf.ORM)
|
||||
|
||||
def has_add_permission(self, request, obj=None):
|
||||
"""Don't allow adds."""
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user