Skip to content

Commit

Permalink
change video_cast to videocast
Browse files Browse the repository at this point in the history
  • Loading branch information
mavenium committed Jan 5, 2021
1 parent e52a954 commit a4ba6d7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion content/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
def show_system_content(request):
return {
'blog_categories': models.BlogCategory.objects.all(),
'video_cast_categories': models.VideocastCategory.objects.all(),
'videocast_categories': models.VideocastCategory.objects.all(),
'podcast_categories': models.PodcastCategory.objects.all(),
'podcasts': models.Podcast.objects.order_by('-pk').filter(publish=True)[:2],
'config': config
Expand Down
10 changes: 5 additions & 5 deletions content/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
path('create/blog_category/', views.BlogCategoryCreateView.as_view(), name='blog_category_create'),
path('blog/<int:pk>/', views.BlogArchiveByCategoryPK.as_view(), name='blog_archive_by_category_pk'),
path('blog/<str:slug>/', views.BlogSingle.as_view(), name='blog_single'),
path('create/video_cast_category/', views.VideocastCategoryCreateView.as_view(), name='video_cast_category_create'),
path('video_cast/', views.Videocast.as_view(), name='video_cast'),
path('create/video_cast/', views.VideocastCreateView.as_view(), name='video_cast_create'),
path('video_cast/<int:pk>/', views.VideocastArchiveByCategoryPK.as_view(), name='video_cast_archive_by_category_pk'),
path('video_cast/<str:slug>/', views.VideocastSingle.as_view(), name='video_cast_single'),
path('create/videocast_category/', views.VideocastCategoryCreateView.as_view(), name='videocast_category_create'),
path('videocast/', views.Videocast.as_view(), name='videocast'),
path('create/videocast/', views.VideocastCreateView.as_view(), name='videocast_create'),
path('videocast/<int:pk>/', views.VideocastArchiveByCategoryPK.as_view(), name='videocast_archive_by_category_pk'),
path('videocast/<str:slug>/', views.VideocastSingle.as_view(), name='videocast_single'),
path('create/podcast_category/', views.PodcastCategoryCreateView.as_view(), name='podcast_category_create'),
path('podcast/', views.Podcast.as_view(), name='podcast'),
path('create/podcast/', views.PodcastCreateView.as_view(), name='podcast_create'),
Expand Down
10 changes: 5 additions & 5 deletions content/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def get(self, request, *args, **kwargs):
'last_blog': models.Blog.objects.order_by('-pk').filter(publish=True)[:1],
'skills': models.Skill.objects.all(),
'blogs': models.Blog.objects.order_by('-pk').filter(publish=True)[1:5],
'video_casts': models.Videocast.objects.order_by('-pk').filter(publish=True)[:4]
'videocasts': models.Videocast.objects.order_by('-pk').filter(publish=True)[:4]
}
return render(request, self.template_name, context)

Expand Down Expand Up @@ -91,12 +91,12 @@ class VideocastCategoryCreateView(LoginRequiredMixin, SuccessMessageMixin, gener
success_message = 'Video cast category was created successfully'

def get_success_url(self):
return reverse('content:video_cast_category_create')
return reverse('content:videocast_category_create')


class Videocast(generic.ListView):
model = models.Videocast
template_name = 'video_cast_archive.html'
template_name = 'videocast_archive.html'


class VideocastCreateView(LoginRequiredMixin, SuccessMessageMixin, generic.CreateView):
Expand All @@ -105,12 +105,12 @@ class VideocastCreateView(LoginRequiredMixin, SuccessMessageMixin, generic.Creat
success_message = 'Video cast was created successfully'

def get_success_url(self):
return reverse('content:video_cast_create')
return reverse('content:videocast_create')


class VideocastArchiveByCategoryPK(generic.ListView):
model = models.Videocast
template_name = 'video_cast_archive.html'
template_name = 'videocast_archive.html'

def get_queryset(self):
return self.model.objects.filter(category=self.kwargs['pk'])
Expand Down
12 changes: 6 additions & 6 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ <h2>Menu</h2>
{% endfor %}
</ul>
</li>
<li><a href="{% url 'content:video_cast' %}">{% translate 'Video Cast' %}</a></li>
<li><a href="{% url 'content:videocast' %}">{% translate 'Videocast' %}</a></li>
<li>
<span class="opener">{% translate 'Video Cast Categories' %}</span>
<span class="opener">{% translate 'Videocast Categories' %}</span>
<ul>
{% for video_cast_category in video_cast_categories %}
<li><a href="{% url 'content:video_cast_archive_by_category_pk' video_cast_category.pk %}">{{ video_cast_category.title }}</a></li>
{% for videocast_category in videocast_categories %}
<li><a href="{% url 'content:videocast_archive_by_category_pk' videocast_category.pk %}">{{ videocast_category.title }}</a></li>
{% endfor %}
</ul>
</li>
Expand All @@ -122,7 +122,7 @@ <h2>Menu</h2>
<span class="opener">{% translate 'Create New Objects' %}</span>
<ul>
<li><a href="{% url 'content:blog_create' %}">{% translate 'New Blog' %}</a></li>
<li><a href="{% url 'content:video_cast_create' %}">{% translate 'New Video Cast' %}</a></li>
<li><a href="{% url 'content:videocast_create' %}">{% translate 'New Videocast' %}</a></li>
<li><a href="{% url 'content:podcast_create' %}">{% translate 'New Podcast' %}</a></li>
<li><a href="{% url 'content:skill_create' %}">{% translate 'New Skill' %}</a></li>
</ul>
Expand All @@ -131,7 +131,7 @@ <h2>Menu</h2>
<span class="opener">{% translate 'Create Category Object' %}</span>
<ul>
<li><a href="{% url 'content:blog_category_create' %}">{% translate 'New Blog Category' %}</a></li>
<li><a href="{% url 'content:video_cast_category_create' %}">{% translate 'New Video Cast Category' %}</a></li>
<li><a href="{% url 'content:videocast_category_create' %}">{% translate 'New Video Cast Category' %}</a></li>
<li><a href="{% url 'content:podcast_category_create' %}">{% translate 'New Podcast Category' %}</a></li>
</ul>
</li>
Expand Down
12 changes: 6 additions & 6 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,16 @@ <h3>{{ blog_post.title }}</h3>
<h2>{% translate 'The latest Video Casts' %}</h2>
</header>
<div class="posts">
{% for video_cast in video_casts %}
{% for videocast in videocasts %}
<article>
<a href="{% url 'content:video_cast_single' video_cast.slug %}" class="image" title="{{ video_cast.title }}">
<img src="{{ video_cast.thumbnail.url }}" alt="{{ video_cast.title }}"/>
<a href="{% url 'content:videocast_single' videocast.slug %}" class="image" title="{{ videocast.title }}">
<img src="{{ videocast.thumbnail.url }}" alt="{{ videocast.title }}"/>
</a>
<h3>{{ video_cast.title }}</h3>
<p>{{ video_cast.content | safe | truncatewords_html:30 }}</p>
<h3>{{ videocast.title }}</h3>
<p>{{ videocast.content | safe | truncatewords_html:30 }}</p>
<ul class="actions">
<li>
<a href="{% url 'content:video_cast_single' video_cast.slug %}" class="button" title="{{ video_cast.title }}">{% translate 'More' %}</a>
<a href="{% url 'content:videocast_single' videocast.slug %}" class="button" title="{{ videocast.title }}">{% translate 'More' %}</a>
</li>
</ul>
</article>
Expand Down
2 changes: 1 addition & 1 deletion templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h3>{{ blog.title }}</h3>

{% for videocast in videocasts %}
<article>
<a href="{% url 'content:video_cast_single' videocast.slug %}" title="{{ videocast.title }}">
<a href="{% url 'content:videocast_single' videocast.slug %}" title="{{ videocast.title }}">
<h3>{{ videocast.title }}</h3>
</a>
<p>{{ videocast.content | safe | truncatewords_html:10 }}</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
<section id="archive">
<header class="major">
<h2>
{% translate 'Video Cast Archive' %}
{% translate 'Videocast Archive' %}
</h2>
</header>
<div class="posts">
{% for object in object_list %}
<article>
<a href="{% url 'content:video_cast_single' object.slug %}" class="image" title="{{ object.title }}">
<a href="{% url 'content:videocast_single' object.slug %}" class="image" title="{{ object.title }}">
<img src="{{ object.thumbnail.url }}" alt="{{ object.title }}"/>
</a>
<h3>{{ object.title }}</h3>
<p>{{ object.content | safe | truncatewords_html:30 }}</p>
<ul class="actions">
<li>
<a href="{% url 'content:video_cast_single' object.slug %}" class="button" title="{{ object.title }}">
<a href="{% url 'content:videocast_single' object.slug %}" class="button" title="{{ object.title }}">
{% translate 'More' %}
</a>
</li>
Expand Down

0 comments on commit a4ba6d7

Please sign in to comment.