Browse Source

Added full threaded comments (to Problem for now)

remotes/origin/feincms
Tomas Gavenciak 10 years ago
parent
commit
2b38042798
  1. 14
      mamweb/settings_common.py
  2. 10
      mamweb/static/css/mamweb.css
  3. 4
      mamweb/templates/base.html
  4. 11
      mamweb/urls.py
  5. 8
      requirements.txt
  6. 8
      seminar/templates/seminar/problem.html

14
mamweb/settings_common.py

@ -99,6 +99,11 @@ INSTALLED_APPS = (
'taggit',
'autocomplete_light',
'fluent_comments',
'crispy_forms',
'threadedcomments',
'django_comments',
# MaMweb
'mamweb',
'seminar',
@ -159,6 +164,13 @@ CKEDITOR_CONFIGS = {
}
# Comments
COMMENTS_APP = 'fluent_comments'
#COMMENTS_APP = 'threadedcomments'
FLUENT_COMMENTS_EXCLUDE_FIELDS = ('name', 'email', 'url', 'title')
# SECURITY WARNING: keep the secret key used in production secret!
# Create file 'django.secret' in every install (it is not kept in git)
@ -168,6 +180,8 @@ try:
except:
SECRET_KEY = '12345zmr_k53a*@f4q_+ji^o@!pgpef*5&8c7zzdqwkdlkj'
# MaM specific
SEMINAR_RESENI_DIR = os.path.join(BASE_DIR, 'media', 'reseni')

10
mamweb/static/css/mamweb.css

@ -30,3 +30,13 @@ table .border-b {
.vysledkovka {
border: solid 2px;
}
/* Comments */
#id_comment {
width: 100%;
height: 6em;
}

4
mamweb/templates/base.html

@ -12,6 +12,10 @@
<link href="{% static 'css/prettyPhoto.css' %}" rel="stylesheet" type="text/css" media="screen" charset="utf-8" />
<script src="{% static 'js/jquery-1.11.1.js' %}"></script>
{% include 'autocomplete_light/static.html' %}
<link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}fluent_comments/css/ajaxcomments.css" />
<script type="text/javascript" src="{{ STATIC_URL }}fluent_comments/js/ajaxcomments.js"></script>
</head>
<body class='{% if True %}org-logged-in{% endif %}'>
<!-- TODO: only on org login -->

11
mamweb/urls.py

@ -7,12 +7,21 @@ from django.views.generic.base import TemplateView
urlpatterns = i18n_patterns('',
# Admin a nastroje
url(r'^admin/', include(admin.site.urls)), # NOQA
url(r'^admin_tools/', include('admin_tools.urls')),
url(r'^ckeditor/', include('ckeditor.urls')),
url(r'^autocomplete/', include('autocomplete_light.urls')),
# Seminarova aplikace (ma vlastni podadresare)
url(r'^', include('seminar.urls')),
# Comments (interni i verejne)
url(r'^comments_dj/', include('django_comments.urls')),
url(r'^comments_fl/', include('fluent_comments.urls')),
# Obsah
url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
)
# This is only needed when using runserver.

8
requirements.txt

@ -20,7 +20,13 @@ django-ckeditor==4.4.7
django-flat-theme==0.9.3
django-taggit==0.14.0
django-autocomplete-light==2.1.1
# django-admin-tools==0.5.2
django-crispy-forms==1.4.0
# Comments
akismet==0.2.0
django-fluent-comments==1.0.2
django-threadedcomments==1.0b1
django-contrib-comments==1.6.1
# debug tools/extensions

8
seminar/templates/seminar/problem.html

@ -1,5 +1,7 @@
{% extends "base.html" %}
{% load comments %}
{% block content %}
<div>
<h2>Problém {{ problem.kod_v_rocniku }} {{ problem.nazev }}</h2>
@ -13,8 +15,14 @@
{% if True %}
<div class='mam-org-only'>
<h3>Text - org</h3>
{{ problem.text_problemu_org |safe }}
<h3>Diskuse - org</h3>
{% render_comment_list for object %}
{% render_comment_form for object %}
</div>
{% endif %}

Loading…
Cancel
Save