We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey Adam,
I've been using Django Unicorn a lot (great stuff) and currently trying to implement a dynamic search with dynamic filters.
I have encountered the following problem -->
Let's user your Search Example:
class RecommendationsView(UnicornView): template_name = 'unicorn/browser/recommendations.html' some_value = '' state = "" ALL_STATES = ( "Alabama", "Alaska", "Arizona", "Arkansas", "California", ) def clear_states(self): self.state = "" def states(self): if not self.state: return [] self.some_value = 'foobar' return [s for s in self.ALL_STATES if s.lower().startswith(self.state.lower())] class Meta: exclude = ("ALL_STATES",)
My template looks like this:
<div> <label>State typeahead</label><br /> <input type="text" unicorn:model="state" placeholder="State name" id="state-name"></input> <p> {{some_value}} </p> <p> Matching states: {% if states %} <ul> {% for s in states %} <li>{{ s }}</li> {% endfor %} </ul> <button unicorn:click="clear_states">Clear result</button> {% else %} n/a {% endif %} </p> </div>
When i start a search, i get the following in the console: Error: Checksum does not match
Is this intended behaviour?
I need to be able to store some of the values from the search function for the user. Best, J.
The text was updated successfully, but these errors were encountered:
Hmm, no that shouldn't happen. Do you have a CACHE specified in your settings?
CACHE
Sorry, something went wrong.
No branches or pull requests
Hey Adam,
I've been using Django Unicorn a lot (great stuff) and currently trying to implement a dynamic search with dynamic filters.
I have encountered the following problem -->
Let's user your Search Example:
My template looks like this:
When i start a search, i get the following in the console: Error: Checksum does not match
Is this intended behaviour?
I need to be able to store some of the values from the search function for the user.
Best,
J.
The text was updated successfully, but these errors were encountered: