Comments (3)
my solution
def get_tabs(self, request, obj=None):
if obj and request.user != obj.created_by:
return [
(u'Podstawowe dane', self.tab_main),
(u'Pytania', self.tab_questions),
(u'Tokeny', self.tab_tokens)
]
return [
(u'Podstawowe dane', self.tab_main),
(u'Pytania', self.tab_questions),
(u'Tokeny', self.tab_tokens),
(u'Uprawnienia', self.tab_permissions)
]
from django-tabbed-admin.
Hi Kamil,
Thanks a million for your feedback on this issue. I have just added some test against your specific code and it passes successfully (see above & travis).
I understand you mention some caching but then your solution should not pass as well? Maybe its something to do with the self.tabs. The strange thing is that there should be no caching in django admin and there is no cache implemented in this app.
Out of curiosity, what is the django version you are using?
Thanks again!
from django-tabbed-admin.
I'm sorry it wasn't caching it was static -> instance variable transformation in admin, once someone opened admin change view with modified tabs self.tabs was changed for everyone else.
Here's my project and now it works ok https://github.com/kamilgregorczyk/sententia/blob/master/poll/admin.py#L108
Someday I'm gonna make it more pretty, someday.
django 1.9.9
from django-tabbed-admin.
Related Issues (20)
- tabbed-admin not working with django 1.11 HOT 2
- Dajngo admin form error notification message is hidden by div. HOT 1
- Unable to get tabbed-admin working HOT 1
- JS error
- Django 2.0 compatibility HOT 3
- Replace tabs nav with a select in responsive layout
- Tab links are not generated from tab names HOT 1
- Browser&Mouse Back/Forward has impact on url, but not on tabs
- Django 2.0 compatibility issue with RequestContext
- Missing horizontal scrollbar when using TabularInline with many fields HOT 2
- Admin `collapse` does not work like in the fieldsets HOT 2
- still not working in django 2.0 HOT 2
- deleted
- Django Tabbed Admin fail when has_change_permission is false HOT 3
- Uncaught TypeError: $(...).tabs is not a function HOT 1
- Feature Request. Custom html tab templates
- Image links on README.md are broken
- are any forks maintaining this project? HOT 5
- KeyError 'some_field_for_form_a' is not found in FormB during concurrent requests
- ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-tabbed-admin.