Open paulcollinsiii opened 10 years ago
You mentioned using a template tag for this.
Also not sure how factory_boy
is applicable here.
Nevermind, the template tag was for the sidebar history.
@ everyone: do you think this is a a worthwhile pursuit?:
settings.py
file (HOMEPAGE_POST_NUMBER
or some better name?)from django.conf import settings
at the top of our myblog/views
file and add the setting to the context so it can be used in the homepage for looppaginate_by
in our HomeView (which is a ListView)/page/(?P<page>[0-9]+)/$
URL that points to HomeView
allowing conditional display of older
and newer
links on homepageI think this demonstrates:
django.conf.settings
)ListView
documentation and the extra features it gives us
This should be some kind of user configurable setting. Probably makes the most sense in settings.py
Later on for testing perhaps we should use factory_boy to assert that the n+1 post does NOT show up on the page?