Placeholder outside of CMS Permissions issue
See original GitHub issueI am building an application that uses the PlaceholderField in a model, but cannot seem to get the permissions working correctly. According to the documentation:
Permissions To be able to edit a placeholder user must be a staff member and needs either edit permissions on the model that contains the PlaceholderField, or permissions for that specific instance of that model. Required permissions for edit actions are:
- to add: require add or change permission on related Model or instance.
- to change: require add or change permission on related Model or instance.
- to delete: require add or change or delete permission on related Model or instance.
So I built my model:
class UserProfile(models.Model):
user = models.OneToOneField(User, related_name='user_profile')
address = models.CharField(max_length=55, blank=True, null=True,
help_text="Home Address, ex: 111 Street Addr")
address2 = models.CharField(max_length=55, blank=True, null=True,
help_text="City, State Zip Code")
phone = models.CharField(max_length=12, blank=True, null=True)
facebook = models.URLField(blank=True, null=True)
twitter = models.URLField(blank=True, null=True)
google_plus = models.URLField(blank=True, null=True)
user_info_placeholder = PlaceholderField('UserInfoPlaceholder',
related_name='userinfoplaceholder')
timeline = PlaceholderField('TimelinePlaceholder', related_name='timeline')
Added a view:
class UserProfileDetailView(DetailView):
context_object_name = 'user_information'
model = User
slug_field = 'username'
template_name = 'home_page.html'
And logged in as the user, however no ‘Structure/Content’ button appeared on the toolbar. To check I logged in as a superuser and the button showed. So I changed the users “User Permissions” and added everything just to be sure, but still not ‘Structure/Content’ button.
Any suggestions?
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Placeholder outside of CMS Permissions issue #5178 - GitHub
I am building an application that uses the PlaceholderField in a model, but cannot seem to get the permissions working correctly.
Read more >How to use placeholders outside the CMS
Placeholders can be viewed as containers for CMSPlugin instances, and can be used outside the CMS in custom applications using the PlaceholderField ....
Read more >5. Placeholders outside the CMS - Read the Docs
Placeholders can be viewed as containers for CMSPlugin instances, and can be used outside the CMS in custom applications using the PlaceholderField.
Read more >django-cms "You do not have permission to add a plugin" as ...
I installed django-cms 3.0.6 (the latest version as of today) on top of an existing Django 1.7 / Python 2.7 project with sqlite3...
Read more >Medicare Claims Processing Manual - Chapter 27 - CMS
60.3 - Contractor Monthly Reports of Claims Paid Outside of CWF ... Montana (HUEP), Prior Authorization (HUPA),and IVIG error codes are also ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@czpython I just checked this solution in my code and that was the problem. Once I added PlaceholderAdminMixin everything started working! Thanks for the fix!
I believe this is both a validation and documentation problem. I can reproduce the issue only if the admin class for the object that has the
PlaceholderField
does not subclass fromPlaceholderAdminMixin
.Will open a new ticket for the documentation issue and close this one for https://github.com/divio/django-cms/issues/3734