Show wiki checkbox in answer edit form.
Don't answer default to wiki when question is wiki.
Add type to badges without type.
Make first user staff as well.
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@335
0cfe37f9-358a-4d5e-be75-
b63607b5c754
{{ form.text }}
<span class="form-error"></span>
<div class="preview-toggle"><span id="pre-collapse"
- title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span></div>
+ title="{% trans "Toggle the real time Markdown editor preview" %}">{% trans "toggle preview" %}</span>
+ {% if settings.WIKI_ON %}
+ <div style="float:right;">
+ {{ form.wiki }} <span style="color:#000;cursor:help" title="{{form.wiki.help_text}}">{{ form.wiki.label_tag }} </span>
+ </div>
+ {% endif %}
+ </div>
<div id="previewer" class="wmd-preview"></div>
</div>
if User.objects.all().count() == 0:
user_.is_superuser = True
+ user_.is_staff = True
user_.save()
UserJoinsAction(user=user_, ip=request.META['REMOTE_ADDR']).save()
expected_count = settings.FAVORITE_QUESTION_FAVS
class StellarQuestion(FavoriteQuestionBadge):
+ type = Badge.GOLD
name = _("Stellar Question")
expected_count = settings.STELLAR_QUESTION_FAVS
class StrunkAndWhite(AbstractBadge):
+ type = Badge.SILVER
award_once = True
listen_to = (ReviseAction,)
name = _("Strunk & White")
@decorate(QuestionManager.search, needs_origin=False)
def question_search(self, keywords):
- tsquery = " | ".join(keywords.split(' '))
+ tsquery = " | ".join([k for k in keywords.split(' ') if k])
return self.extra(
tables = ['forum_rootnode_doc'],