Ask Your Question

piskvorky's profile - activity

2018-04-27 07:57:21 -0500 received badge  Notable Question (source)
2017-08-28 14:22:23 -0500 received badge  Notable Question (source)
2016-07-29 03:30:43 -0500 received badge  Famous Question (source)
2016-02-02 17:12:33 -0500 received badge  Notable Question (source)
2015-10-05 10:58:35 -0500 marked best answer `'settings' is undefined` in custom template?

I see the askbot templates use constructs like {% if settings.BLABLA %}.

From what I understand, the settings var should always be present, from askbot.context.application_settings, right?

But when I try to use {% if settings.XYZ %} in my own skin widgets, I get

Exception Type: UndefinedError
Exception Value:   'settings' is undefined

How can that be? I would post more info but don't know what could be relevant to this.

2015-10-05 10:58:35 -0500 marked best answer Title gets erased when less than 10 chars entered

.. on the "Ask question" page.

This is inconsistent with the text and tags fields, which retain their value in case of errors, and show the error dynamically via javascript.

Error in title resets the field to empty, which can be annoying for users.

2015-10-05 10:58:35 -0500 marked best answer What is the inbox logic?

By inbox I mean the little mailbox icon, sometimes white, sometimes red, in the user_navigation widget.

I saw it consults the ActivityAuditStatus model for display decisions. Can you explain the design logic of for whom and when it is displayed? Is it just moderators? Is it documented somewhere?

I find that button useful and potentially addictive for users (a bit like facebook), so I'd also like to know more about your plans with it.

2015-10-05 10:58:35 -0500 marked best answer injection <script>alert("xss");</script>

just testing script injection :-)

<script>alert("xss");</script>
2015-10-05 10:58:35 -0500 marked best answer Some strings don't appear in rosetta

The jinja2_makemessages command isn't picking up some strings -- they don't even appear in the .po file.

For example "Sort by »" on the main /questions/ page is picked up correctly, but all the "by activity", "by date" texts next to it are not.

I looked in the source at skins/default/templates/main_page/tab_bar.html:

    {{macros.reversible_sort_button(
            button_sort_criterium = 'activity',
            label = gettext('by activity'),
            asc_tooltip = gettext('click to see the least recently updated questions'),
            desc_tooltip = gettext('click to see the most recently updated questions'),
            current_sort_method = sort
        )
    }}

Why is the gettext directive ignored? And how to fix this?

2015-10-05 10:58:35 -0500 marked best answer How to create localization language-specific css?

The navigation icons (tags, people, badges) combine sprites + text.

When the text gets sufficiently long, the sprite regions overlap, and the last one continues on to show white space. I think this is a bug. It happens with german words, which can get very long.

My fix was to set a fixed width, in skins/default/media/style/style.less:

#navTags{
    .sprites(-50px,-5px);
    width: 50px;
}

#navUsers{
    .sprites(-125px,-5px);
    width: 59px;
}

#navBadges{
    .sprites(-210px,-5px);
    width: 47px;
}

But I don't know much CSS... I guess there must be a better way to clip the visible sprite region, and fall back to the background color outside of it. Ideas?

2015-10-05 10:58:35 -0500 marked best answer askbot & staticfiles

First, congrats on the forum upgrade and the new looks :) Parts of the forum appeared in russian to me today, so I assumed something was happening :)

Now, I was integrating askbot into an existing application, merging the settings manually. There were several small issues (askbot uses older django, so some things moved between django.contrib and django.core, some were deprecated etc), but overall no problem. The automated settings.py checks were pretty helpful.

My question is about using askbot together with django.contrib.staticfiles. If I understand correctly, askbot doesn't use staticfiles. Static URLs and directories are hard-coded, and are automatically served by django (btw can this be turned off? i'd prefer to see an error), unless explicitly intercepted by the web server earlier (needs manual configuration with some obscure locations).

Is there any planned support for STATIC_URL, the SERVE_MEDIA flag and the "python manage.py collectstatic" utility? Pretty useful from deployment point of view, IMO.

2015-10-05 10:58:35 -0500 marked best answer incorrect number of user questions displayed

In the default view of a user's profile, the amount of displayed questions is limited to 100. So the number 100 is always displayed, even if the user asked more than 100 questions.

I checked the source code and the number 100 is hard-coded in the function user_stats() in users.py. It's probably not very common, but we need to get rid of this limitation :)

Is it safe to simply remove the slice, or are there other related things that we have to be careful about?

2015-10-05 10:58:34 -0500 marked best answer Password login not working

Hi, after upgrading to the latest code from github, the password login stopped working.

With LANGUAGE_CODE='en' in settings.py, things work as expected.

After changing this to e.g. 'de', the 'einloggen' link leads to de/zugang/einloggen/. Here when username and password is filled in and submitted, nothing happens: the page just reloads, no login happens, no error in the log.

I tried following the javascript code but couldn't make sense of it, there are no comments. Any help of where to look is appreciated.

2015-10-05 10:58:34 -0500 marked best answer askbot & sites

Does Askbot play nice with the django.contrib.sites framework?

Is it possible to serve multiple sites (=share content) by the same application, by setting different site ids?

2015-04-26 13:21:42 -0500 received badge  Famous Question (source)
2015-04-26 13:21:42 -0500 received badge  Popular Question (source)
2014-12-13 19:29:02 -0500 received badge  Notable Question (source)
2014-04-17 12:46:18 -0500 received badge  Popular Question (source)
2013-12-05 11:34:27 -0500 received badge  Famous Question (source)
2013-11-10 12:20:27 -0500 received badge  Popular Question (source)
2013-10-02 00:38:37 -0500 received badge  Popular Question (source)
2013-08-21 12:35:28 -0500 received badge  Famous Question (source)
2013-08-05 14:46:22 -0500 received badge  Popular Question (source)
2013-06-07 02:03:04 -0500 received badge  Popular Question (source)
2013-04-22 16:07:43 -0500 received badge  Famous Question (source)
2013-03-11 18:02:38 -0500 received badge  Famous Question (source)
2013-01-15 05:02:40 -0500 received badge  Popular Question (source)
2012-12-21 19:34:42 -0500 received badge  Famous Question (source)
2012-12-03 07:04:54 -0500 received badge  Famous Question (source)
2012-11-29 02:34:20 -0500 received badge  Famous Question (source)
2012-10-18 10:49:55 -0500 received badge  Famous Question (source)
2012-10-18 03:26:24 -0500 received badge  Famous Question (source)
2012-10-17 07:18:34 -0500 received badge  Taxonomist
2012-10-15 07:56:18 -0500 received badge  Good Question (source)
2012-10-15 00:50:11 -0500 received badge  Nice Question (source)
2012-08-24 12:40:17 -0500 received badge  Famous Question (source)
2012-07-26 09:52:16 -0500 received badge  Famous Question (source)
2012-06-01 12:30:35 -0500 received badge  Nice Answer (source)
2012-04-29 16:54:38 -0500 received badge  Self-Learner (source)
2012-04-29 16:54:38 -0500 marked best answer edit profile view outdated

I found another small bug/inconsistency in askbot:

Inside a user's profile, there is a link "update profile". There "change picture" only leads to gravatar faq, it doesn't change any picture. The whole user_edit template seems outdated, with link to /images/nophoto.png etc.

I modified it to resemble user_info: https://github.com/piskvorky/askbot-devel/commit/f5ddf7f99d6f236f2344c2836cec11587842bcd4 , in case anyone's interested.

2012-04-29 16:54:33 -0500 received badge  Nice Question (source)
2012-04-03 14:06:12 -0500 received badge  Nice Answer (source)
2012-03-25 12:30:48 -0500 asked a question What does "follow question" do?

I thought following a question means I will receive any updates on that question (comments, answers...) into my inbox. But I just tried and this is not the case.

What is the purpose of the "Follow" button?

And how do I subscribe for all updates on a question?

2012-03-22 09:52:01 -0500 commented answer Asking for feedback about new skin.

@Evgeny: what moments? can you give some details?

2012-02-22 04:30:12 -0500 commented answer Why is askbot incompatible with jQuery 1.7?

Ok, thanks. For the moment, I "solved" the problem by using both jquery versions at once, using the $.noConflict(); syntax.

2012-02-21 11:50:56 -0500 asked a question Why is askbot incompatible with jQuery 1.7?

In general, jquery should be backward-compatible, so I tried bumping askbot jquery from 1.4.3 to 1.7.1.

I immediately got a "jQuery.handleError is not a function" error (when uploading an image), maybe there are other errors too. Apparently askbot uses some jquery 1.4.3 features that disappeared in later versions.

Are these features vital? Are there plans to support a newer jquery release?