Adding views in decorators
See original GitHub issueAdding new views in decorators that depend on the date seems extremely buggy.
Steps to reproduce:
Create a CalendarCellDecorator that adds a TextView to the CellView containing the provided date only if the day of the month is 30.
Expected behavior: The date is the same as the date shown on the original TextView and the new view only appears the 30th of the month.
Actual behavior:
The date always says 30, but the view appears on dates that are not the 30th of the month.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:22
Top Results From Across the Web
View decorators - Django documentation
The decorators in django.views.decorators.http can be used to restrict access to views based on the request method. These decorators will return a django.http....
Read more >Working with Django View Decorators
Both view functions can only be accessed by the entry owner and we don't need to add the if statement inside each of...
Read more >Tidy Views and Beyond with Decorators - Thoughtbot
It is an object that wraps another object adding any required functionality, and proxies the interface you care about to original decorated ...
Read more >How do I set a decorator for every one of my Django views?
You can decorate all your views in urls.py: http://djangosnippets.org/snippets/532/ . Share. Share a link ...
Read more >Creating custom decorators for your views - Packt Subscription
Next, you will create a decorator for checking the HTTP_X_REQUESTED_WITH header in your views. A decorator is a function that takes another function...
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 Free
Top 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

@edenman I’m going to try to isolate it down to the simplest setup that reproduces it in the sample app.
In addition, the fact that decorators operate inside of a layout pass means that merely setting the background drawable of a cell results in dozens of warnings like the following:
I think a fix for this and several other issues would be to move all of the decoration loop out of the layout stage and later in the setup of the views, but I don’t know how that could be accomplished. This seems to relate to #103.