summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-06-21 23:23:45 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2010-06-21 23:23:45 -0400
commit7eb5758c72029b6ea7706cdfd247b8c58e5835d5 (patch)
tree6af450c752c9f4db270804246401b50ede920432
parent90eeeede925b82ef2c1ea5a36b36de2ef29d1cca (diff)
downloadaskbot-7eb5758c72029b6ea7706cdfd247b8c58e5835d5.tar.gz
askbot-7eb5758c72029b6ea7706cdfd247b8c58e5835d5.tar.bz2
askbot-7eb5758c72029b6ea7706cdfd247b8c58e5835d5.zip
added robots.txt nbsp chars instead of eatenup spaces by the spaceless middleware and simplified a query in tags manager
-rw-r--r--askbot/doc/source/git.rst151
-rw-r--r--askbot/locale/en/LC_MESSAGES/django.mobin24140 -> 23891 bytes
-rw-r--r--askbot/locale/en/LC_MESSAGES/django.po4
-rw-r--r--askbot/models/tag.py15
-rw-r--r--askbot/setup_templates/settings.py1
-rw-r--r--askbot/setup_templates/urls.py1
-rw-r--r--askbot/skins/default/templates/404.html8
-rw-r--r--askbot/skins/default/templates/answer_edit.html68
-rw-r--r--askbot/skins/default/templates/ask.html8
-rw-r--r--askbot/skins/default/templates/close.html2
-rw-r--r--askbot/skins/default/templates/feedback.html2
-rw-r--r--askbot/skins/default/templates/notarobot.html2
-rw-r--r--askbot/skins/default/templates/question_edit.html19
-rw-r--r--askbot/skins/default/templates/question_retag.html81
-rw-r--r--askbot/skins/default/templates/questions.html23
-rw-r--r--askbot/skins/default/templates/reopen.html2
-rw-r--r--askbot/skins/default/templates/tag_selector.html8
-rw-r--r--askbot/skins/default/templates/user_edit.html74
-rw-r--r--askbot/skins/default/templates/user_email_subscriptions.html2
-rw-r--r--askbot/urls.py4
-rw-r--r--setup.py4
21 files changed, 311 insertions, 168 deletions
diff --git a/askbot/doc/source/git.rst b/askbot/doc/source/git.rst
new file mode 100644
index 00000000..1ef52ed2
--- /dev/null
+++ b/askbot/doc/source/git.rst
@@ -0,0 +1,151 @@
+==================
+Upgrading with git
+==================
+
+Git makes it easy to upgrade software, especially if your version is customized.
+
+Below is a description of a typical upgrade git session. The document assumes
+that your code is already managed with git.
+
+Upgrading with git consists of three steps:
+
+#. preparing your local repository for merge
+#. bringing the latest version of the code onto your system
+#. merging the latest code with your work
+
+Preparing the local repository for merge
+-----------------------------------------
+
+Before you can merge the new code, your local repository must be "clean" - that is any changes in the working copy - most likely the local directory must be committed to your local repository.
+
+First, see which branch is currently in the working copy and what is its state::
+
+ > git status
+
+If the output says that the branch is clean, then skip the section below.
+
+Commit any modified files to the local repository
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If the local branch does have modifed files,
+any of those files (or even entire directories) must be added to the repository index with command `git add`::
+
+ > git add <filename>
+ > git add <dirname>
+
+If there are several modified files in the same directory, then adding directory will be more convinient.
+
+In Git system index_ is only a part of the repository - it's a record of "scheduled" changes that must be applied in a single batch called "commit_"
+
+After all changed files are added to the index, the index must be committed (really added, if you will) to the repository::
+
+ > git commit -m 'some descriptive message'
+
+Jump into the branch that you want to upgrade
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If it is the current branch that you want to upgrade, then you are ready for the next step, otherwise switch the branch in the working copy with `git checkout`_ command.
+
+Before checking out a branch see what branches are locally available and which one is the current::
+
+ > git branch
+
+Current branch will be marked with an asterisk.
+
+(Note that adding extra arguments the `git branch`_ command will significantly modify its meaning, for example it can create or delete branches)
+
+Now check out the branch you want to merge the new code into::
+
+ > git checkout <branchname>
+
+(Example below assumes that branchname is 'master').
+
+Bring the latest code into your repository
+-------------------------------------------
+
+Now to bring in the fresh code from some public repository (for example public "master" branch hosted on github_), run::
+
+ > git fetch origin master:master-github
+
+In the command above (`git fetch`_), `origin` is the name of the repository (also called "remote" repository). By default `origin` repository is the one that you have used to originally clone_ into your system.
+
+The last part of the command `master:master-github` tells that you want to take stuff from branch `master` on the `origin` repository and put it into branch `master-github` on your local repository.
+
+Merge the upgrade into your local repository
+-------------------------------------------------
+
+To merge content of one branch into another, run `git merge`_ command::
+
+ > git merge github-master
+ Auto-merging askbot/models/__init__.py
+ CONFLICT (content): Merge conflict in askbot/models/__init__.py
+ Removing askbot/utils/time.py
+ Auto-merging askbot/views/readers.py
+ Automatic merge failed; fix conflicts and then commit the result.
+
+The command `git merge github-master` means that you indended to merge content
+of your local branch `github-master` into the currently checked out branch.
+
+Often, merge will go smoothly, but if you and someone else have edited the same file approximately on the same place, automatic merge will not work on that file. For example the output above tells that there was a "conflict" in file `askbot/models/__init__.py`.
+
+At any time, e.g. during resolving conflicts you can always check which files still have them with `git status` command::
+
+ > git status
+ askbot/models/__init__.py: needs merge
+ # On branch master
+ # Your branch is ahead of 'origin/master' by 91 commits.
+ #
+ # Changes to be committed:
+ # (use "git reset HEAD <file>..." to unstage)
+ #
+ # new file: askbot/bin/show_profile_stats.py
+ # modified: askbot/doc/source/index.rst
+ # new file: askbot/locale/fi/LC_MESSAGES/django.mo
+ # modified: askbot/locale/fi/LC_MESSAGES/django.po
+ # new file: askbot/migrations/0016_auto__del_validationhash.py
+ # modified: askbot/models/question.py
+ # modified: askbot/models/user.py
+ # modified: askbot/skins/default/media/js/com.cnprog.i18n.js
+ # modified: askbot/skins/default/media/js/org.askbot.output-words.js
+ # modified: askbot/skins/default/templates/email_base.html
+ # modified: askbot/skins/default/templates/question.html
+ # modified: askbot/skins/default/templates/question_list.html
+ # modified: askbot/skins/default/templates/user_edit.html
+ # modified: askbot/utils/decorators.py
+ # deleted: askbot/utils/time.py
+ # modified: askbot/views/readers.py
+ #
+ # Changed but not updated:
+ # (use "git add <file>..." to update what will be committed)
+ # (use "git checkout -- <file>..." to discard changes in working directory)
+ #
+ # unmerged: askbot/models/__init__.py
+
+If you have merge conflicts - resolve them and commit them into the repository.
+
+To resolve conflicts, open the file in question and find lines that start with `<<<`. Conflict areas are demarcated by `<<<`, `====` and `>>>` patterns.
+
+`====` divides the conflicting versions.
+
+When resolving merge conflicts your options are: accept one of the versions or come up with some compromize.
+
+Decide what is the best course of action, fix the code, remove the conflict demarcation lines and add file to the index with `git add`_::
+
+ > git add askbot/models/__init__.py
+
+At this point it is best not to use wholsale add via a directory (like `git add askbot`) - because you don't want to accidentally add other conflicting files into the index.
+
+Once all conflicts are resolved, run the `git commit`_ command::
+
+ > git commit -m 'merged with the public master branch'
+
+.. _index: http://book.git-scm.com/1_the_git_index.html
+.. _`git commit`: http://www.kernel.org/pub/software/scm/git/docs/git-commit.html
+.. _commit: http://www.kernel.org/pub/software/scm/git/docs/git-commit.html
+.. _`git checkout`: http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html
+.. _`git branch`: http://www.kernel.org/pub/software/scm/git/docs/git-branch.html
+.. _`git fetch`: http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html
+.. _`git merge`: http://www.kernel.org/pub/software/scm/git/docs/git-merge.html
+.. _`git add`: http://www.kernel.org/pub/software/scm/git/docs/git-add.html
+.. _clone: http://www.kernel.org/pub/software/scm/git/docs/git-clone.html
+.. _github: http://github.com/ASKBOT/askbot-devel
diff --git a/askbot/locale/en/LC_MESSAGES/django.mo b/askbot/locale/en/LC_MESSAGES/django.mo
index eacc102a..5b3e4ad5 100644
--- a/askbot/locale/en/LC_MESSAGES/django.mo
+++ b/askbot/locale/en/LC_MESSAGES/django.mo
Binary files differ
diff --git a/askbot/locale/en/LC_MESSAGES/django.po b/askbot/locale/en/LC_MESSAGES/django.po
index 3da33966..a3dfdafb 100644
--- a/askbot/locale/en/LC_MESSAGES/django.po
+++ b/askbot/locale/en/LC_MESSAGES/django.po
@@ -3315,11 +3315,7 @@ msgid_plural ""
" %(q_num)s questions found\n"
" "
msgstr[0] ""
-"\n"
-"<div class=\"questions-count\">%(q_num)s</div><p>question</p>"
msgstr[1] ""
-"\n"
-"<div class=\"questions-count\">%(q_num)s</div><p>questions<p>"
#: forum/skins/default/templates/questions.html:147
#, python-format
diff --git a/askbot/models/tag.py b/askbot/models/tag.py
index 5b1613b7..99be2e54 100644
--- a/askbot/models/tag.py
+++ b/askbot/models/tag.py
@@ -51,18 +51,9 @@ class TagManager(models.Manager):
transaction.commit_unless_managed()
def get_tags_by_questions(self, questions):
- question_ids = []
- if len(questions) == 0:
- return []
- for question in questions:
- question_ids.append(question.id)
-
- question_ids_str = ','.join([str(id) for id in question_ids])
- related_tags = self.extra(
- tables=['tag', 'question_tags'],
- where=["tag.id = question_tags.tag_id AND question_tags.question_id IN (" + question_ids_str + ")"]
- ).distinct()
-
+ related_tags = self.filter(
+ questions__in = list(questions)
+ ).distinct()
return related_tags
class Tag(DeletableContent):
diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py
index d3bf3d9e..bef8370e 100644
--- a/askbot/setup_templates/settings.py
+++ b/askbot/setup_templates/settings.py
@@ -149,6 +149,7 @@ INSTALLED_APPS = (
'south',
'askbot.deps.livesettings',
'keyedcache',
+ 'robots',
)
diff --git a/askbot/setup_templates/urls.py b/askbot/setup_templates/urls.py
index b9206308..3868ae74 100644
--- a/askbot/setup_templates/urls.py
+++ b/askbot/setup_templates/urls.py
@@ -12,6 +12,7 @@ urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
#(r'^cache/', include('keyedcache.urls')), - broken views disable for now
(r'^settings/', include('askbot.deps.livesettings.urls')),
+ (r'^robots.txt$', include('robots.urls')),
)
if 'rosetta' in settings.INSTALLED_APPS:
diff --git a/askbot/skins/default/templates/404.html b/askbot/skins/default/templates/404.html
index 227de3ae..8ca393ee 100644
--- a/askbot/skins/default/templates/404.html
+++ b/askbot/skins/default/templates/404.html
@@ -3,9 +3,9 @@
{% load i18n %}
{% block title %}{% spaceless %}404 Error{% endspaceless %}{% endblock %}
{% block forestyle%}
- <style type="text/css">
- form input { margin-right: 5px; }
- </style>
+<style type="text/css">
+ form input { margin-right: 5px; }
+</style>
{% endblock %}
{% block forejs %}
<script type="text/javascript">
@@ -29,7 +29,7 @@
<li>{% trans "url has error - please check it;" %}</li>
<li>{% trans "the page you tried to visit is protected or you don't have sufficient points, see" %} <a href="{% url faq %}"> faq</a>;</li>
<li>{% trans "if you believe this error 404 should not have occured, please" %}
- <a href="{{feedback_site_url}}" target="_blank">{% trans "report this problem" %}</a></li>
+ <a href="{{feedback_site_url}}" target="_blank">{% trans "report this problem" %}</a></li>
</u>
</div>
<script type="text/javascript">
diff --git a/askbot/skins/default/templates/answer_edit.html b/askbot/skins/default/templates/answer_edit.html
index 2d736f30..afcb8efe 100644
--- a/askbot/skins/default/templates/answer_edit.html
+++ b/askbot/skins/default/templates/answer_edit.html
@@ -4,43 +4,43 @@
{% load extra_tags %}
{% block title %}{% spaceless %}{% trans "Edit answer" %}{% endspaceless %}{% endblock %}
{% block forejs %}
- <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>
- <script type='text/javascript' src='{% media "/media/js/com.cnprog.post.js" %}'></script>
- <script type='text/javascript' src='{% media "/media/js/jquery.validate.pack.js" %}'></script>
- <script type='text/javascript' src='{% media "/media/js/wmd/showdown.js" %}'></script>
- <script type='text/javascript' src='{% media "/media/js/wmd/wmd.js" %}'></script>
- <link rel="stylesheet" type="text/css" href="{% media "/media/js/wmd/wmd.css" %}" />
- <script type="text/javascript">
+ <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>
+ <script type='text/javascript' src='{% media "/media/js/com.cnprog.post.js" %}'></script>
+ <script type='text/javascript' src='{% media "/media/js/jquery.validate.pack.js" %}'></script>
+ <script type='text/javascript' src='{% media "/media/js/wmd/showdown.js" %}'></script>
+ <script type='text/javascript' src='{% media "/media/js/wmd/wmd.js" %}'></script>
+ <link rel="stylesheet" type="text/css" href="{% media "/media/js/wmd/wmd.css" %}" />
+ <script type="text/javascript">
+
+ $().ready(function(){
+ $("#nav_questions").attr('className',"on");
+ $('#editor').TextAreaResizer();
- $().ready(function(){
- $("#nav_questions").attr('className',"on");
- $('#editor').TextAreaResizer();
-
- //highlight code synctax when editor has new text
- $("#editor").typeWatch({highlight: false, wait: 3000,
- captureLength: 5, callback: lanai.highlightSyntax});
-
- //toggle preview of editor
- var display = true;
- var txt = "{% trans "hide preview" %}";
+ //highlight code synctax when editor has new text
+ $("#editor").typeWatch({highlight: false, wait: 3000,
+ captureLength: 5, callback: lanai.highlightSyntax});
+
+ //toggle preview of editor
+ var display = true;
+ var txt = "{% trans "hide preview" %}";
+ $('#pre-collapse').text(txt);
+ $('#pre-collapse').bind('click', function(){
+ txt = display ? "{% trans "show preview" %}" : "{% trans "hide preview" %}";
+ display = !display;
+ $('#previewer').toggle();
$('#pre-collapse').text(txt);
- $('#pre-collapse').bind('click', function(){
- txt = display ? "{% trans "show preview" %}" : "{% trans "hide preview" %}";
- display = !display;
- $('#previewer').toggle();
- $('#pre-collapse').text(txt);
- });
+ });
- setupFormValidation("#fmedit", CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages());
-
- $('#id_revision').unbind().change(function(){
- $("#select_revision").click();
- });
-
- lanai.highlightSyntax();
-
+ setupFormValidation("#fmedit", CPValidator.getQuestionFormRules(), CPValidator.getQuestionFormMessages());
+
+ $('#id_revision').unbind().change(function(){
+ $("#select_revision").click();
});
- </script>
+
+ lanai.highlightSyntax();
+
+ });
+ </script>
{% endblock %}
{% block content %}
@@ -69,7 +69,7 @@
<div class="title-desc">
{{ form.summary.help_text }}
</div>
- <input type="submit" value="{% trans "Save edit" %}" class="submit" />
+ <input type="submit" value="{% trans "Save edit" %}" class="submit" />&nbsp;
<input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
</form>
</div>
diff --git a/askbot/skins/default/templates/ask.html b/askbot/skins/default/templates/ask.html
index 82828fe9..4ba11ebf 100644
--- a/askbot/skins/default/templates/ask.html
+++ b/askbot/skins/default/templates/ask.html
@@ -113,12 +113,12 @@
<strong>{{ form.tags.label_tag }}:</strong> {% trans "(required)" %} <span class="form-error"></span><br/>
{{ form.tags }} {{ form.tags.errors }}
</div>
- <p class="title-desc">
- {{ form.tags.help_text }}
- </p>
+ <p class="title-desc">
+ {{ form.tags.help_text }}
+ </p>
{% if not request.user.is_authenticated %}
<input type="submit" value="{% trans "Login/signup to post your question" %}" class="submit" />
- {% else %}
+ {% else %}
<input type="submit" value="{% trans "Ask your question" %}" class="submit" />
{% endif %}
</form>
diff --git a/askbot/skins/default/templates/close.html b/askbot/skins/default/templates/close.html
index d9e73507..caae2014 100644
--- a/askbot/skins/default/templates/close.html
+++ b/askbot/skins/default/templates/close.html
@@ -25,7 +25,7 @@
<strong>{% trans "Reasons" %}:</strong> {{ form.reason }}
</p>
<div id="" style="padding-top:20px">
- <input type="submit" value="{% trans "OK to close" %}" class="submit" />
+ <input type="submit" value="{% trans "OK to close" %}" class="submit" />&nbsp;
<input id="btBack" type="button" class="submit" value="{% trans "Cancel" %}" />
</div>
diff --git a/askbot/skins/default/templates/feedback.html b/askbot/skins/default/templates/feedback.html
index af4f635f..4bf31d2d 100644
--- a/askbot/skins/default/templates/feedback.html
+++ b/askbot/skins/default/templates/feedback.html
@@ -46,7 +46,7 @@
</div>
{{form.next}}
<div class="submit-row">
- <input type="submit" class="submit" value="{% trans "Send Feedback" %}"/>
+ <input type="submit" class="submit" value="{% trans "Send Feedback" %}"/>&nbsp;
<input type="submit" class="submit" name="cancel" value="{% trans "Cancel" %}"/>
</div>
</form>
diff --git a/askbot/skins/default/templates/notarobot.html b/askbot/skins/default/templates/notarobot.html
index 698c5696..17e907ce 100644
--- a/askbot/skins/default/templates/notarobot.html
+++ b/askbot/skins/default/templates/notarobot.html
@@ -7,7 +7,7 @@
<div>
{{form}}
</div>
- <input type="submit" value="{% trans "I am a Human Being" %}" class="submit" style="float:left"/>
+ <input type="submit" value="{% trans "I am a Human Being" %}" class="submit" style="float:left"/>&nbsp;
<input type="hidden" name="{{ step_field }}" value="{{ step0 }}" />
{{ previous_fields|safe }}
</form>
diff --git a/askbot/skins/default/templates/question_edit.html b/askbot/skins/default/templates/question_edit.html
index fe711849..c4cee009 100644
--- a/askbot/skins/default/templates/question_edit.html
+++ b/askbot/skins/default/templates/question_edit.html
@@ -11,7 +11,7 @@
<script type='text/javascript' src='{% media "/media/js/wmd/wmd.js" %}'></script>
<link rel="stylesheet" type="text/css" href="{% media "/media/js/wmd/wmd.css" %}" />
<script type="text/javascript">
- //todo move javascript out
+ //todo move javascript out
$().ready(function(){
$("#nav_questions").attr('className',"on");
$('#editor').TextAreaResizer();
@@ -33,17 +33,17 @@
//Tags autocomplete action
var tags = {{ tags|safe }};
- $("#id_tags").autocomplete(tags, {
- matchContains: true,
+ $("#id_tags").autocomplete(tags, {
+ matchContains: true,
max: 20,
multiple: true,
multipleSeparator: " ",
highlightItem: true,
scroll: true,
scrollHeight: 300,
- formatItem: function(row, i, max) {
- return row.n + " ("+ row.c +")";
- },
+ formatItem: function(row, i, max) {
+ return row.n + " ("+ row.c +")";
+ },
formatResult: function(row, i, max){
return row.n;
}
@@ -71,8 +71,9 @@
<label for="id_revision" ><strong>{% trans "revision" %}:</strong></label> <br/>
{% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul }}{% endif %}
<div style="vertical-align:middle">
- {{ revision_form.revision }} <input type="submit" style="display:none" id="select_revision" name="select_revision"
- value="{% trans "select revision"%}">
+ {{ revision_form.revision }} <input type="submit" style="display:none"
+ id="select_revision" name="select_revision"
+ value="{% trans "select revision"%}">
</div>
<div class="form-item">
<label for="id_title" ><strong>{{ form.title.label_tag }}:</strong></label> <span class="form-error"></span><br/>
@@ -115,7 +116,7 @@
{{ form.summary.help_text }}
</div>
<div class="error" ></div>
- <input type="submit" value="{% trans "Save edit" %}" class="submit" />
+ <input type="submit" value="{% trans "Save edit" %}" class="submit" />&nbsp;
<input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
</form>
</div>
diff --git a/askbot/skins/default/templates/question_retag.html b/askbot/skins/default/templates/question_retag.html
index 03f3da04..19ee704b 100644
--- a/askbot/skins/default/templates/question_retag.html
+++ b/askbot/skins/default/templates/question_retag.html
@@ -3,49 +3,48 @@
{% load extra_tags %}
{% block title %}{% spaceless %}{% trans "Change tags" %}{% endspaceless %}{% endblock %}
{% block forejs %}
- <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>
- <script type='text/javascript' src='{% media "/media/js/com.cnprog.post.js" %}'></script>
- <script type='text/javascript' src='{% media "/media/js/jquery.validate.pack.js" %}'></script>
- <script type="text/javascript">
+ <script type='text/javascript' src='{% media "/media/js/com.cnprog.editor.js" %}'></script>
+ <script type='text/javascript' src='{% media "/media/js/com.cnprog.post.js" %}'></script>
+ <script type='text/javascript' src='{% media "/media/js/jquery.validate.pack.js" %}'></script>
+ <script type="text/javascript">
+
+ $().ready(function(){
+ $("#nav_questions").attr('className',"on");
+ //Tags autocomplete action
+ var tags = {{ tags|safe }};
+ $("#id_tags").autocomplete(tags, {
+ minChars: 1,
+ matchContains: true,
+ max: 20,
+ multiple: true,
+ multipleSeparator: " ",
+ formatItem: function(row, i, max) {
+ return row.n + " ("+ row.c +")";
+ },
+ formatResult: function(row, i, max){
+ return row.n;
+ }
- $().ready(function(){
- $("#nav_questions").attr('className',"on");
- //Tags autocomplete action
- var tags = {{ tags|safe }};
- $("#id_tags").autocomplete(tags, {
- minChars: 1,
- matchContains: true,
- max: 20,
- multiple: true,
- multipleSeparator: " ",
- formatItem: function(row, i, max) {
- return row.n + " ("+ row.c +")";
- },
- formatResult: function(row, i, max){
- return row.n;
- }
-
- });
-
- $("#fmretag").validate({
- rules: {
- tags: {
- required: true,
- maxength: 105
- }
- },
- messages: {
- tags: {
- required: "{% trans "tags are required" %}",
- maxlength: "{% trans "up to 5 tags, less than 20 characters each" %}
- }
+ });
+ $("#fmretag").validate({
+ rules: {
+ tags: {
+ required: true,
+ maxength: 105
+ }
+ },
+ messages: {
+ tags: {
+ required: "{% trans "tags are required" %}",
+ maxlength: "{% trans "up to 5 tags, less than 20 characters each" %}
}
-
- });
- lanai.highlightSyntax();
-
+ }
+
});
- </script>
+ lanai.highlightSyntax();
+
+ });
+ </script>
{% endblock %}
{% block content %}
@@ -71,7 +70,7 @@
</div>
</div>
<div class="error" ></div>
- <input type="submit" value="{% trans "Save edit" %}" class="submit" />
+ <input type="submit" value="{% trans "Save edit" %}" class="submit" />&nbsp;
<input type="button" value="{% trans "Cancel" %}" class="submit" onclick="history.back(-1);" />
</form>
</div>
diff --git a/askbot/skins/default/templates/questions.html b/askbot/skins/default/templates/questions.html
index af3abc4e..6e2ffcb1 100644
--- a/askbot/skins/default/templates/questions.html
+++ b/askbot/skins/default/templates/questions.html
@@ -26,8 +26,7 @@
<script type='text/javascript' src='{% media "/media/js/com.cnprog.tag_selector.js" %}'></script>
{% endblock %}
{% block content %}
-{% get_current_language as LANGUAGE_CODE %}
-{% cache 600 "scope_sort_tabs" search_tags scope sort query LANGUAGE_CODE context.page context.page_size %}
+{% cache 600 "scope_sort_tabs" search_tags scope sort query context.page context.page_size %}
<div class="tabBar">
<div class="tabsC">
<span class="label">{% trans "In:" %}</span>
@@ -119,6 +118,12 @@
{% endcache %}
{% if questions_count > 0 %}
<div style="clear:both">
+ <p style="float:right;margin:3px 3px 0 0;">
+ (<a style=text-decoration:none;"
+ href="{{settings.APP_URL}}/feeds/rss/"
+ title="{% trans "subscribe to the questions feed" %}"
+ ><img style="vertical-align:middle;" src="{% media "/media/images/feed-icon-small.png" %}"/> {% trans "rss feed" %}</a>)
+ </p>
<p class="search-result-summary">
{% if author_name or search_tags or query %}
{% blocktrans count questions_count as cnt with questions_count|intcomma as q_num %}
@@ -164,14 +169,14 @@
{% else %}
<p class="search-tips">{% trans "Search tip:" %} {% trans "add tags and a query to focus your search" %}</p>
{% endif %}
-
- </div>
+ </div>
{% endif %}
<div id="listA">
-{% get_current_language as LANGUAGE_CODE %}
-{% cache 600 questions search_tags scope sort query LANGUAGE_CODE context.page context.page_size %}
{% include "question_list.html" %}
+ {% comment %}
+{% cache 600 questions search_tags scope sort query context.page context.page_size %}
{% endcache %}
+ {% endcomment %}
{% comment %}todo: fix css here{% endcomment %}
{% if questions_count == 0 %}
{% comment %}todo: add tips to widen selection{% endcomment%}
@@ -226,9 +231,8 @@
{% endblock %}
{% block sidebar %}
- {% get_current_language as LANGUAGE_CODE %}
{% if contributors %}
- {% cache 600 contributors search_tags scope sort query LANGUAGE_CODE context.page context.page_size %}
+ {% cache 600 contributors search_tags scope sort query context.page context.page_size %}
<div class="boxC">
<h3 class="subtitle">{% trans "Contributors" %}</h3>
{% for person in contributors %}
@@ -243,7 +247,7 @@
{% endif %}
{% if tags %}
- {% cache 600 tags search_tags scope sort query LANGUAGE_CODE context.page context.page_size %}
+ {% comment%} {% cache 600 tags search_tags scope sort query context.page context.page_size %} {% endcomment %}
<div class="boxC">
<h3 class="subtitle">{% trans "Related tags" %}</h3>
<div class="tags">
@@ -257,7 +261,6 @@
{% endfor %}
</div>
</div>
- {% endcache %}
{% endif %}
{% endblock %}
<!-- end questions.html -->
diff --git a/askbot/skins/default/templates/reopen.html b/askbot/skins/default/templates/reopen.html
index 37fb69c1..f60dd507 100644
--- a/askbot/skins/default/templates/reopen.html
+++ b/askbot/skins/default/templates/reopen.html
@@ -26,7 +26,7 @@
<form id="fmclose" action="{% url reopen question.id %}" method="post" >
<div id="" style="padding:20px 0 20px 0">
- <input type="submit" value="{% trans "Reopen this question" %}" class="submit" />
+ <input type="submit" value="{% trans "Reopen this question" %}" class="submit" />&nbsp;
<input id="btBack" type="button" value="{% trans "Cancel" %}" class="submit" />
</div>
diff --git a/askbot/skins/default/templates/tag_selector.html b/askbot/skins/default/templates/tag_selector.html
index 85b858d2..fe90b03a 100644
--- a/askbot/skins/default/templates/tag_selector.html
+++ b/askbot/skins/default/templates/tag_selector.html
@@ -17,9 +17,9 @@
{% endspaceless %}
{% endfor %}
</div>
- <input id="interestingTagInput" autocomplete="off" type="text"/>
+ <input id="interestingTagInput" autocomplete="off" type="text"/>&nbsp;
<input id="interestingTagAdd" type="submit" value="{% trans "Add" %}"/>
- <h3 class="subtitle">{% trans "Ignored tags" %}</h3>
+ <h3 class="subtitle">{% trans "Ignored tags" %}</h3>
<div class="tags ignored marked-tags">
{% for tag_name in ignored_tag_names %}
{% spaceless %}
@@ -34,10 +34,10 @@
{% endspaceless %}
{% endfor %}
</div>
- <input id="ignoredTagInput" autocomplete="off" type="text"/>
+ <input id="ignoredTagInput" autocomplete="off" type="text"/>&nbsp;
<input id="ignoredTagAdd" type="submit" value="{% trans "Add" %}"/>
<p id="hideIgnoredTagsControl">
- <input id="hideIgnoredTagsCb" type="checkbox" {% if request.user.hide_ignored_questions %}checked="checked"{% endif %} />
+ <input id="hideIgnoredTagsCb" type="checkbox" {% if request.user.hide_ignored_questions %}checked="checked"{% endif %} />&nbsp;
<label id="hideIgnoredTagsLabel" for="hideIgnoredTagsCb">{% trans "keep ignored questions hidden" %}</label>
<p>
</div>
diff --git a/askbot/skins/default/templates/user_edit.html b/askbot/skins/default/templates/user_edit.html
index 71484714..6956c720 100644
--- a/askbot/skins/default/templates/user_edit.html
+++ b/askbot/skins/default/templates/user_edit.html
@@ -37,58 +37,56 @@
<th></th>
</tr>
<tr style="height:35px">
- <td>{% trans "Screen Name" %}:</td>
- <td>
- {% if settings.EDITABLE_SCREEN_NAME %}
- {{ form.username }}
- {% else %}
- {{ request.user.username }}
- {% endif %}
- <span class="form-error"></span> {{ form.username.errors }} </td>
- </tr>
-
- <tr style="height:35px">
- <td>{{ form.email.label_tag }}:</td>
- <td>{{ form.email }} <span class="form-error"></span> {{ form.email.errors }} </td>
- </tr>
+ <td>{% trans "Screen Name" %}:</td>
+ <td>
+ {% if settings.EDITABLE_SCREEN_NAME %}
+ {{ form.username }}
+ {% else %}
+ {{ request.user.username }}
+ {% endif %}
+ <span class="form-error"></span> {{ form.username.errors }} </td>
+ </tr>
+ <tr style="height:35px">
+ <td>{{ form.email.label_tag }}:</td>
+ <td>{{ form.email }} <span class="form-error"></span> {{ form.email.errors }} </td>
+ </tr>
<tr style="height:35px">
- <td></td>
- <td class="title-desc">{{ form.email.help_text }}</td>
- </tr>
+ <td></td>
+ <td class="title-desc">{{ form.email.help_text }}</td>
+ </tr>
<tr style="height:35px">
- <td>{{ form.realname.label_tag }}:</td>
- <td>{{ form.realname }} <span class="form-error"></span> {{ form.realname.errors }} </td>
- </tr>
+ <td>{{ form.realname.label_tag }}:</td>
+ <td>{{ form.realname }} <span class="form-error"></span> {{ form.realname.errors }} </td>
+ </tr>
<tr style="height:35px">
- <td>{{ form.website.label_tag }}:</td>
- <td>{{ form.website }} <span class="form-error"></span> {{ form.website.errors }} </td>
- </tr>
+ <td>{{ form.website.label_tag }}:</td>
+ <td>{{ form.website }} <span class="form-error"></span> {{ form.website.errors }} </td>
+ </tr>
<tr style="height:35px">
- <td>{{ form.city.label_tag }}:</td>
- <td>{{ form.city }} <span class="form-error"></span> {{ form.city.errors }} </td>
- </tr>
+ <td>{{ form.city.label_tag }}:</td>
+ <td>{{ form.city }} <span class="form-error"></span> {{ form.city.errors }} </td>
+ </tr>
<tr style="height:35px">
- <td>{{ form.birthday.label_tag }}:</td>
- <td>{{ form.birthday }} <span class="form-error"></span> {{ form.birthday.errors }} </td>
- </tr>
+ <td>{{ form.birthday.label_tag }}:</td>
+ <td>{{ form.birthday }} <span class="form-error"></span> {{ form.birthday.errors }} </td>
+ </tr>
<tr style="height:35px">
- <td></td>
- <td class="title-desc">{{ form.birthday.help_text }}</td>
- </tr>
+ <td></td>
+ <td class="title-desc">{{ form.birthday.help_text }}</td>
+ </tr>
<tr style="height:10px">
<td colspan="2">
</td>
</tr>
<tr>
- <td style="vertical-align:top">{{ form.about.label_tag }}:</td>
- <td>{{ form.about }} <span class="form-error"></span> {{ form.about.errors }} </td>
- </tr>
-
+ <td style="vertical-align:top">{{ form.about.label_tag }}:</td>
+ <td>{{ form.about }} <span class="form-error"></span> {{ form.about.errors }} </td>
+ </tr>
+
</table>
<div style="margin:30px 0 60px 0">
- <input type="submit" value="{% trans "Update" %}" class="submit" >
+ <input type="submit" value="{% trans "Update" %}" class="submit" >&nbsp;
<input id="cancel" type="button" value="{% trans "Cancel" %}" class="submit" >
-
</div>
</div>
</form>
diff --git a/askbot/skins/default/templates/user_email_subscriptions.html b/askbot/skins/default/templates/user_email_subscriptions.html
index 9578046a..4ee8a1bc 100644
--- a/askbot/skins/default/templates/user_email_subscriptions.html
+++ b/askbot/skins/default/templates/user_email_subscriptions.html
@@ -17,7 +17,7 @@
{{tag_filter_selection_form}}
</table>
<div class="submit-row text-align-right">
- <input type="submit" class="submit" name="save" value="{% trans "Update" %}"/>
+ <input type="submit" class="submit" name="save" value="{% trans "Update" %}"/>&nbsp;
<input type="submit" class="submit" name="stop_email" value="{% trans "Stop sending email" %}"/>
</div>
</form>
diff --git a/askbot/urls.py b/askbot/urls.py
index e108a734..1a3b59cb 100644
--- a/askbot/urls.py
+++ b/askbot/urls.py
@@ -189,7 +189,7 @@ urlpatterns = patterns('',
name='read_message'
),
url(
- r'^feeds/(?P<url>.*)/$',
+ r'^feeds/rss/$',
'django.contrib.syndication.views.feed',
{'feed_dict': feeds},
name='feeds'
@@ -199,7 +199,7 @@ urlpatterns = patterns('',
url(r'^%s$' % _('feedback/'), app.meta.feedback, name='feedback'),
(r'^%s' % _('account/'), include('askbot.deps.django_authopenid.urls')),
(r'^i18n/', include('django.conf.urls.i18n')),
- url(r'^feeds/rss/$', RssLastestQuestionsFeed, name="latest_questions_feed"),
+ #url(r'^feeds/rss/$', RssLastestQuestionsFeed, name="latest_questions_feed"),
url(
r'^doc/(?P<path>.*)$',
'django.views.static.serve',
diff --git a/setup.py b/setup.py
index 1fc5bc02..f2e78939 100644
--- a/setup.py
+++ b/setup.py
@@ -13,6 +13,7 @@ install_requires = [
'python-openid',
'django-keyedcache',
'django-threaded-multihost',
+ 'django-robots',
]
WIN_PLATFORMS = ('win32', 'cygwin',)
if sys.platform not in WIN_PLATFORMS:
@@ -20,7 +21,7 @@ if sys.platform not in WIN_PLATFORMS:
setup(
name = "askbot",
- version = "0.6.3",
+ version = "0.6.4",
description = 'Question and Answer forum, like StackOverflow, written in python and Django',
packages = find_packages(),
author = 'Evgeny.Fadeev',
@@ -42,6 +43,7 @@ setup(
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Natural Language :: English',
+ 'Natural Language :: Finnish',
'Natural Language :: German',
'Natural Language :: Russian',
'Natural Language :: Serbian',