First time here? Check out the FAQ!

geekofalltrades's profile - activity

2016-01-27 13:38:43 -0600 received badge Famous Question (source)
2016-01-27 13:38:43 -0600 received badge Notable Question (source)
2016-01-27 13:38:43 -0600 received badge Popular Question (source)
2016-01-27 13:38:20 -0600 received badge Famous Question (source)
2016-01-27 13:37:29 -0600 received badge Famous Question (source)
2016-01-27 13:37:29 -0600 received badge Notable Question (source)
2016-01-27 13:37:29 -0600 received badge Popular Question (source)
2014-11-10 13:28:41 -0600 commented answer How can I get Askbot emails to print to the console?

Probably something in the project setup, then - I'll look into it.

2014-11-06 16:53:05 -0600 asked a question How can I get Askbot emails to print to the console?

I'm running Askbot as an app on a larger project in a development environment. The EMAIL_BACKEND setting in this environment is the console backend. However, none of Askbot's email notifications get printed to the console; instead, they seem to disappear into the ether. Is there any way I can get these messages to print?

2014-09-26 11:34:37 -0600 received badge Editor (source)
2014-09-26 11:29:07 -0600 asked a question Decoupling 'login/signup to post' from django-authopenid

I've ripped out django-authopenid for the project I'm working with, as it already has an auth system. I discovered pretty recently that the 'login/signup to post' option was coupled to Askbot's forked django-authopenid. As a result, I had to re-implement that functionality separately.

My implementation works by redirecting to a view after login that looks up the logged-out content by a uuid and posts it, then redirects to it. I can contribute my implementation back, but there are notes in the code that suggest that the problem is being worked on already. My implementation doesn't clean the old code out of django-authopenid, opting instead to circumvent it. Also, I wrote a class-based view for the implementation, which clashes with the rest of Askbot's function-based views.

For the benefit of future readers, the functionality being discussed is the ability to write a question or an answer while logged out, then log in to have it posted. That functionality currently doesn't work unless you use the django-authopenid package that ships with Askbot.

2014-09-26 11:21:34 -0600 answered a question Adding askbot to existing app, column auth_user.status does not exist

What do the contents of your settings.py file look like? Specifically, the INSTALLED_APPS setting?

Askbot monkey-patches the hell out of User. As a result, it needs to come pretty high up in the INSTALLED_APPS list, so that its changes to User are propagated along to all of your other apps. Essentially, you should copy-paste the INSTALLED_APPS setting from the setup templates that come with Askbot, then re-add all of your project's apps below that.

It's also interesting that you have askbot included in your project directory structure. Typically, you install Askbot with pip or with its setup.py, and it ends up installed alongside your other Python packages, where you can then import it from. I don't know off the top of my head whether that's a problem.

I've been working full time for the last three months on getting Askbot plugged into an existing project. In my case, the existing project behaved so poorly with the monkey-patch that I had to fork the Askbot source and undo it. Integrating Askbot is not easy; before you get in too deep, you might want to consider whether it would be possible for you to have Askbot run as a separate project. Good luck.

2014-09-03 15:02:44 -0600 asked a question "undefined must have > 10 characters"

On my Askbot site, entering fewer than ten characters in the "Please enter your question" form field results in an error message reading, "undefined must have > 10 characters."

This problem exists in the master branch, not in the latest tagged release (0.7.49). In the latest tagged release, the string "question must have > %s characters" is hardcoded. In the master branch, however, the string reads "%(question)s must have > %(length)s characters". The code attempts to draw the value of "question" from from askbot['messages']['questionSingular'], which is injected into the context via the WORDS_QUESTION_SINGULAR livesetting. The problem is, askbot['messages']['questionSingular'] is defined in the "endjs" block of the "main_page.html" template, and the "ask.html" template neither extends nor includes "main_page.html," so it doesn't have access to this value - hence, "undefined must have > 10 characters."

2014-08-26 11:00:38 -0600 received badge Organizer (source)
2014-08-26 10:45:52 -0600 received badge Enthusiast
2014-08-25 18:46:09 -0600 asked a question CachedStaticFilesStorage and /media/style/tinymce

I'm integrating Askbot into an existing project that uses the CachedStaticFilesStorage backend for the staticfiles app.

Whenever I try to run manage.py collectstatic, I get the error:

ValueError: The file 'default/media/style/tinymce/img/items.gif' could not be found with <django.contrib.staticfiles.storage.CachedStaticFilesStorage object at 0x6a2b750>.

This error occurs because the CachedStaticFilesStorage backend attempts to replace file paths in CSS url functions with their cached counterparts. When collectstatic reaches media/style/tinymce/content.css, it tries to process line 12, which contains:

url(img/items.gif)

...and promptly fails, because img/items.gif does not exist relative to this file! This file also contains a bunch of other urls which point to file paths that don't exist, relatively.

Tinymce's styles are also found in /media/style/js/tinymce/themes/advanced/skins in several subdirectories. Removing the /media/style/tinymce directory allowed collecstatic to run, and also didn't seem to affect the styling of Tinymce at all.

Why is it that Tinymce's styles have been copied to /media/style?

2014-08-20 17:48:51 -0600 received badge Scholar ( source )
2014-08-15 18:14:47 -0600 received badge Supporter ( source )
2014-08-15 02:20:52 -0600 received badge Student (source)
2014-08-14 11:35:13 -0600 asked a question For Discussion: Updating Askbot for USE_TZ=True in Django>=1.4

I've been working on integrating Askbot with a commercial product developed in Django 1.5.8. A major sticking point I ran into was the use of timezone-aware datetime objects in the existing product, which cause the "Can't subtract offset-naive and offset-aware datetimes" exception. (I can't post links, but search for it on this forum, and you'll find at least one thread.)

I've created a fix. It was a basically a find-and-replace operation, replacing all instances of datetime.datetime.now() in the code with timezone.now(), and adding an import: from django.utils import timezone. timezone.now() is a Django utility function that returns a timezone-aware or timezone-naive datetime object according to the USE_TZ setting. I also had to update some datetime.datetime instances with a tzinfo attribute, and I had to replace import datetime in all migration scripts with from south.utils import datetime_utils as datetime, which is a South compatibility layer for USE_TZ.

I could contribute this fix back, but it would force dependency updates. Django's timezone module was introduced in Django 1.4, so versions of Django<1.4 would no longer be compatible with Askbot. Versions of South before datetime_utils was introduced would also no longer be compatible. It would be possible to write compatibility patches, eg:

try:
    from django.utils import timezone
except ImportError:
    from askbot.utils import timezone

...but I'm hesitant to do so, because a lot of the work I've had to do in getting Askbot to work in Django 1.5.8 has been undoing or working around prior patches. I would rather contribute work that moves Askbot forward.