added MEDIA_URL and POST_PREVIEW_URL for js
This commit is contained in:
parent
13c40f9917
commit
695a80517f
4 changed files with 8 additions and 5 deletions
|
@ -18,8 +18,11 @@
|
|||
<link rel="alternate" type="application/atom+xml" href="{% url forum_feed "posts" %}" title="{% trans "Latest posts on forum" %}" />
|
||||
<link rel="alternate" type="application/atom+xml" href="{% url forum_feed "topics" %}" title="{% trans "Latest topics on forum" %}" />
|
||||
|
||||
<!--<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />-->
|
||||
|
||||
<link rel="shortcut icon" href="{{ MEDIA_URL }}favicon.ico" type="image/x-icon" />
|
||||
<script type="text/javascript">
|
||||
var MEDIA_URL = "{{ MEDIA_URL }}";
|
||||
var POST_PREVIEW_URL = "{% url post_preview %}"
|
||||
</script>
|
||||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="{{ MEDIA_URL }}forum/js/board.js"></script>
|
||||
<script type="text/javascript" src="{{ MEDIA_URL }}forum/js/markitup/jquery.markitup.pack.js"></script>
|
||||
|
|
|
@ -38,7 +38,7 @@ urlpatterns = patterns('',
|
|||
url('^post/(?P<post_id>\d+)/edit/$', forum_views.edit_post, name='edit_post'),
|
||||
url('^post/(?P<post_id>\d+)/delete/$', forum_views.delete_post, name='delete_post'),
|
||||
# Post preview
|
||||
url(r'^preview/$', forum_views.post_preview),
|
||||
url(r'^preview/$', forum_views.post_preview, name='post_preview'),
|
||||
|
||||
# Subscription
|
||||
url('^subscription/topic/(?P<topic_id>\d+)/delete/$', forum_views.delete_subscription, name='forum_delete_subscription'),
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// Feel free to add more tags
|
||||
// ----------------------------------------------------------------------------
|
||||
mySettings = {
|
||||
previewParserPath: '/forum/preview/', // path to your BBCode parser
|
||||
previewParserPath: POST_PREVIEW_URL, // path to your BBCode parser
|
||||
markupSet: [
|
||||
{name:'Bold', key:'B', openWith:'[b]', closeWith:'[/b]'},
|
||||
{name:'Italic', key:'I', openWith:'[i]', closeWith:'[/i]'},
|
||||
|
|
|
@ -85,7 +85,7 @@ var openid = {
|
|||
cookie_name: 'openid_provider',
|
||||
cookie_path: '/',
|
||||
|
||||
img_path: '/static/openid/images/',
|
||||
img_path: MEDIA_URL + 'openid/images/',
|
||||
|
||||
input_id: null,
|
||||
provider_url: null,
|
||||
|
|
Reference in a new issue