Changeset - edb349d12daa
[Not reviewed]
0 1 0
Ben Sturmfels (bsturmfels) - 8 months ago 2023-10-05 09:29:12
ben@sturm.com.au
Fix reference to podjango detail template
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
www/podjango/apps/cast/urls.py
Show inline comments
...
 
@@ -9,48 +9,49 @@
 
#
 
# This program is distributed in the hope that it will be useful, but
 
# WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero
 
# General Public License for more details.
 
#
 
# You should have received a copy of the GNU Affero General Public License
 
# along with this program in a file in the toplevel directory called
 
# "AGPLv3".  If not, see <http://www.gnu.org/licenses/>.
 
#
 
from datetime import datetime
 

	
 
from django.conf.urls import url
 
from django.views.generic.dates import DateDetailView, DayArchiveView, MonthArchiveView, YearArchiveView
 

	
 
from .models import Cast, CastTag
 
from .views import custom_index, query
 

	
 
extra_context = {}
 

	
 
info_dict = {
 
    'queryset': Cast.objects.all(),
 
    'date_field': 'pub_date',
 
    'extra_context': extra_context,
 
    'template_name': 'podjango/cast/cast_detail.html',
 
}
 

	
 
urlpatterns = [
 
    url(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[-\w]+)/$', DateDetailView.as_view(**info_dict), name='detail'),
 
    url(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/$', DayArchiveView.as_view(**info_dict), name='day-archive'),
 
    url(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/$', MonthArchiveView.as_view(**info_dict), name='month-archive'),
 
    url(r'^(?P<year>\d{4})/$', YearArchiveView.as_view(**info_dict), name='year-archive'),
 
# FIXME HOW DO I MAKE THE SLUG WORK WITH NO DATES IN IT.
 
#   (r'^(?P<slug>[-\w]+)/$', 'object_detail', dict(info_dict, slug_field='slug')),
 
]
 

	
 
urlpatterns += [
 
    url(r'^$', custom_index, dict(info_dict, paginate_by=20), name='cast'),
 
    url(r'^query/$', query, name='query'),
 
]
 

	
 
# Code to display authors and tags on each blog page
 

	
 

	
 
def all_tags_by_use_amount():
 
    """Returns all tags with an added 'cnt' attribute (how many times used)
 

	
 
    Also sorts the tags so most-used tags appear first.
 
    """
0 comments (0 inline, 0 general)