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
+2 -2
View File
@@ -27,7 +27,7 @@ before_script:
install: install:
- pip install -q django==$DJANGO - pip install -q django==$DJANGO
- pip install -r requirements.txt - pip install -r requirements.txt
- pip install pytest-django coveralls sphinx - pip install pytest-django codecov sphinx
- python setup.py install - python setup.py install
script: script:
@@ -35,7 +35,7 @@ script:
- sphinx-build -b html -d docs/_build/doctrees -nW docs docs/_build/html - sphinx-build -b html -d docs/_build/doctrees -nW docs docs/_build/html
after_success: after_success:
- coveralls - codecov
notifications: notifications:
webhooks: webhooks:
+2 -2
View File
@@ -200,8 +200,8 @@ Acknowledgements
.. |image0| image:: https://travis-ci.org/Koed00/django-q.svg?branch=master .. |image0| image:: https://travis-ci.org/Koed00/django-q.svg?branch=master
:target: https://travis-ci.org/Koed00/django-q :target: https://travis-ci.org/Koed00/django-q
.. |image1| image:: https://coveralls.io/repos/Koed00/django-q/badge.svg?branch=master .. |image1| image:: http://codecov.io/github/Koed00/django-q/coverage.svg?branch=master
:target: https://coveralls.io/r/Koed00/django-q?branch=master :target: http://codecov.io/github/Koed00/django-q?branch=master
.. |image2| image:: http://badges.gitter.im/Join%20Chat.svg .. |image2| image:: http://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/Koed00/django-q :target: https://gitter.im/Koed00/django-q
.. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest .. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest
+9
View File
@@ -104,6 +104,15 @@ class QueueAdmin(admin.ModelAdmin):
'lock' '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): def has_add_permission(self, request, obj=None):
"""Don't allow adds.""" """Don't allow adds."""
return False return False