python $manage collectstatic --noinput
python $manage create-admin-user
-# static files auto update
-watchmedo shell-command --patterns="*.js;*.css" --recursive \
- --command='python '$manage' collectstatic --noinput' $src &
-
# app start
if [ $1 = "--runserver" ]
then
python $manage runserver 0.0.0.0:9000
else
+ # static files auto update
+ watchmedo shell-command --patterns="*.js;*.css" --recursive \
+ --command='python '$manage' collectstatic --noinput' $src &
+
uwsgi --socket :$port --wsgi-file $wsgi --chdir $app --master \
--processes $processes --threads $threads \
--uid $uid --gid $gid \
def __unicode__(self):
return
+ @property
+ def html(self):
+ pass
class EventCategory(BaseNameModel):
"""Event Category"""
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block main %}
+
+<div class="video-title">
+ <h1>{{ video.title }}</h1>
+</div>
+
+<div class="video-description">
+ {{ video.description }}
+</div>
+
+<div class="video-html">
+ {{ video.html|safe }}
+</div>
+
+<div class="video-event">
+ <h2>{% trans 'Related event' %}</h2>
+ {{ video.event.title }}
+</div>
+
+{% endblock %}
--- /dev/null
+{% extends "base.html" %}
+{% load i18n %}
+{% load mezzanine_tags keyword_tags %}
+
+{% block main %}
+
+<div class="video-list">
+ <ul>
+ {% for video in object_list %}
+ <li><a href="{% url 'festival-video-detail' video.id %}">{{ video.title }}</a></li>
+ {% endfor %}
+ </ul>
+</div>
+
+{% endblock %}
from festival.views import *
urlpatterns = patterns('',
- url(r'^artists/$', ArtistListView.as_view(), name="festival-artists"),
+ url(r'^artists/$', ArtistListView.as_view(), name="festival-artist-list"),
url(r'^artists/(?P<pk>.*)/$', ArtistDetailView.as_view(), name="festival-artist-detail"),
+ url(r'^videos/$', ArtistListView.as_view(), name="festival-video-list"),
+ url(r'^videos/(?P<pk>.*)/$', ArtistDetailView.as_view(), name="festival-video-detail"),
)
model = Video
template_name='festival/video_detail.html'
- context_object_name = 'artist'
+ context_object_name = 'video'
def get_context_data(self, **kwargs):
context = super(VideoDetailView, self).get_context_data(**kwargs)