Update views.py and topics_component.html#13
Open
moradi89 wants to merge 4 commits intoTraversy-Media:masterfrom
Open
Update views.py and topics_component.html#13moradi89 wants to merge 4 commits intoTraversy-Media:masterfrom
moradi89 wants to merge 4 commits intoTraversy-Media:masterfrom
Conversation
I changed this, because we want to show number of All topics completely in BROWSE TOPICS. So, in the topics_component.html file , {% for topic in topics %}, should be changed to {% for topic in topics|slice:":5" %} in order to limit number of all topics to 5.
I changed this, because we want to limit the number of all Topics in BROWSE TOPICS. After this change, in the views.py file , home definition, topics = Topic.objects.all()[0:5] should be changed to topics = Topic.objects.all() in order to show number of All topics completely.
there is no need to this tag, because there is value="{{topic.name}} in option tag.
added description of the room.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I changed this, because we want to show number of All topics completely in BROWSE TOPICS. After this change, in the topics_component.html file ,
{% for topic in topics %}, should be changed to{% for topic in topics|slice:":5" %}in order to limit number of all topics to 5.