Merge pull request #65 from Koed00/dev

Adds remote orm admin view
This commit is contained in:
Ilan Steemers
2015-09-17 16:13:33 +02:00
3 changed files with 13 additions and 4 deletions

View File

@@ -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:

View File

@@ -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

View File

@@ -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