Ask Your Question

zaf's profile - activity

2018-06-08 10:51:31 -0500 received badge  Popular Question (source)
2018-06-08 10:51:31 -0500 received badge  Notable Question (source)
2018-03-16 12:14:20 -0500 received badge  Popular Question (source)
2017-01-09 11:13:17 -0500 received badge  Notable Question (source)
2017-01-09 11:13:17 -0500 received badge  Popular Question (source)
2016-04-11 11:54:37 -0500 received badge  Taxonomist
2015-10-05 10:58:36 -0500 marked best answer How to prevent cursor's default position being on Search box?

Kind of stupid question, but it's something really annoying sometimes: Can anyone tell me how can I prevent cursor being on Search Box all the time? In all pages, even in login page where user is going to type his credentials, the cursor is at search box, so in any page, users have to waste a click somewhere in the page, to take focus from search box and then be able to navigate...

I think they are more probable to want to scroll down in a page than type a search.

2015-10-05 10:58:36 -0500 marked best answer deployment: multiple environments - development, test, production

I have deployed (in Webfaction) a development environment for askbot in which I commit everyday's updates from both askbot's repo and few local environments. I want now to create two more environments, a testing one and of course the production one. The three environments will have different source code and different databases, running in the same server in domains like dev.server.com, test.server.com and www.server.com.

I would do this easily for the other 2 environments by following the same instructions but I see that in lib/python2.6 there is a askbot-0.7.40-py2.6.egg folder, so I was wondering that if I install another 2 instances they will override the same folder.

Is this true? How can I prevent this, in order to install three separate environments.

Thanks a lot

2015-05-24 13:25:41 -0500 received badge  Notable Question (source)
2014-11-27 06:45:46 -0500 received badge  Notable Question (source)
2014-04-24 09:06:20 -0500 received badge  Popular Question (source)
2014-04-17 15:18:21 -0500 received badge  Popular Question (source)
2013-08-29 12:43:23 -0500 received badge  Famous Question (source)
2013-05-28 17:20:59 -0500 received badge  Notable Question (source)
2013-05-16 07:04:55 -0500 received badge  Famous Question (source)
2013-03-15 17:21:04 -0500 received badge  Famous Question (source)
2013-03-09 14:40:48 -0500 received badge  Famous Question (source)
2013-03-04 04:49:41 -0500 received badge  Famous Question (source)
2012-12-04 18:03:43 -0500 received badge  Famous Question (source)
2012-10-31 10:29:54 -0500 received badge  Popular Question (source)
2012-08-31 16:29:48 -0500 received badge  Nice Answer (source)
2012-08-01 10:44:40 -0500 received badge  Famous Question (source)
2012-07-25 07:57:26 -0500 received badge  Good Answer (source)
2012-07-24 23:08:13 -0500 received badge  Famous Question (source)
2012-07-12 04:56:01 -0500 marked best answer Configuring memcached in Webfaction

I try to install memcached coz I've realized it solves many things. I have actually 3 askbot sites, one is the production environment and the other two are for development/testing purposes.

I'm hosted on Webfaction, in a plan with 256MB allowed memory. I read their instructions about memcached here and here which explain a lot but I still have questions coz I m new in python and django:

  1. At command memcached -d -m memory -s ~/memcached.sock how much memory should I set?
  2. Do I have to download anything from the refered link, or I just run PYTHONPATH=$HOME/webapps/django_app/lib/python2.7/ easy_install-2.7 --install-dir=$HOME/webapps/django_app/lib/python2.7/ --script-dir=$HOME/webapps/django_app/bin/ python-memcached ?
  3. How can I be sure that memcached is set up and works properly?
  4. Is it better to configure memcached for all my 3 sites?.
2012-07-12 04:54:10 -0500 received badge  Nice Question (source)
2012-07-03 17:28:27 -0500 received badge  Famous Question (source)
2012-06-23 13:59:56 -0500 answered a question Suggestions for antispam measures?

One suggestion would be to allow only openID services for login and not local ones, as discussed here. This way you can eliminate spammers, because users will have to give a valid account.

Now, for those who do give valid accounts but are still spammers and post questions with offensive content, there is always the community to flag and vote them down (I think afrer few flags, post is automatically removed from homepage, right?).

Last, for those who add a spam URL in their profile, I think you should just require some 50 points of karma to allow adding personal website or profile description.

2012-06-15 03:28:36 -0500 received badge  Nice Answer (source)
2012-06-14 05:14:05 -0500 answered a question about sending private messages in users

Judging from this old post and this newer one, seems people always wanted such functionality, and from what is discussed there, @Evgeny might have done some progress to this. Yes, it sounds normal to me also, that this feature is implemented the way you describe it @alexandros.z

Hope we soon hear good news from development team.

2012-06-10 10:06:41 -0500 received badge  Good Answer (source)
2012-06-09 20:55:41 -0500 received badge  Nice Answer (source)
2012-06-09 19:48:18 -0500 answered a question delete user from askbot?

If we want to keep all the content of a user but not the user himself (which is a very good choice since his content might be valueable), I think an easy way is to just go to admin panel and change/delete few things about him, but not the actual user:

  1. Change his personal stuff, mainly username and email, so that he is not recognisable and does not receive any notifications. This can be done in yoursite.com/admin/auth/user/.
  2. Delete his login methons, so that he cannot login with this account anymore. This can be done in yoursite.com/admin/django_authopenid/userassociation/ - delete everything that refers to this user.
  3. If your site supports uploaded avatars, delete also his avatar (if his has any). You can do this from here yoursite.com/admin/avatar/avatar/
  4. Go to his profile and change his subscriptions to no mail, so that askbot will never again try to send an email to him.
  5. (if there is anything I forget, please add here).

This way you have pseudo-deleted him but the record in database is still there, all his content is there and he is not related to all these any more.

2012-06-05 12:21:15 -0500 commented answer Add a more friendly name on your sender email!

I just tested it. Bad news is that it ignores what is inside parentheses and with [ it doesn't work at all. Good news is that I tried with { and * and it works fine!

2012-06-05 08:02:33 -0500 commented answer Add a more friendly name on your sender email!

I haven't tried parentheses, hope they work, otherwise try other characters like [ or { or just omit them..

2012-06-05 07:55:08 -0500 commented answer Add a more friendly name on your sender email!

Well, still it's not nice to see mails from just 'do-not-reply'. There should be an indication about site's name, coz I receive mails from many sites that don't want to get reply.. You could have something like Askbot (do-not-reply) <sender@yourdomain.com>

2012-06-05 07:04:56 -0500 asked a question Add a more friendly name on your sender email!

I found something nice and I want to share coz maybe you find it usefull too (most of you may already know).

On settings.py file you probably have a line where you set the email which all the outgoing emails will appear to have been sent from:

DEFAULT_FROM_EMAIL = 'do-not-reply@yourdomain.com'

Unfortunately, this do-not-reply appears also as the name of the sender, which, as you may agree, is not so nice.

The revolutionary code that will change your life is:

DEFAULT_FROM_EMAIL = 'Name Surname <do-not-reply@yourdomain.com>'

So at Name Surname you can put anything more friendly you want, like askbot team or askbot admin (of course not askbot but your site's name) and there you are, enjoy your new look :)

2012-05-25 09:39:20 -0500 received badge  Nice Answer (source)
2012-05-24 15:54:25 -0500 answered a question Settings module is missing, how do I add it?

Hi. I would advise not to have your virtual environment in the same level as your sources. At least to me, it make things seem more complicated. It would be better if you have your virtualenv e.g. in /srv/answers/askbot and your project root in /srv/answers/askbot/myProject. This way, folder bin of your virtual env (with python etc.) will be outside your source files and it will be easier to realize which files are askbot's and which ones are of the virtual env.

Now to your problem. Are you sure you have run setup.py install and askbot-setup using the same python, like ./bin/python setup.py install and ./bin/askbot-setup? Also, in /srv/answers/askbot/ is there file settings.py? If not, try to do your installation this way to see if there is any progress.

Cheers

2012-05-23 02:36:10 -0500 commented answer No module named psycopg2

+1 for not giving up so easy :)

2012-05-22 06:23:14 -0500 commented question Python-daemon not found

I don't know a lot about Python, I'm pretty new. I just followed the sources I provided you in first comment (its Python for Windows) and didn't meet such daemon problem. Maybe you could follow this too?

2012-05-22 04:35:39 -0500 commented question Python-daemon not found

@Pepe-Pérez-Oso (btw how can I refer to a user if his username is more than one word?) I have installed Askbot on Windows, it works ok, mails work also. I have aksbot 0.7.42, I don't know if plays any role. Sometimes when I run setup.py install I get this error too, but I continue with the rest steps and it seems to work fine. Of course, my deployed version which will be used as production environment runs on Linux and there I didn't meet any problem.

2012-05-21 15:47:56 -0500 commented question Python-daemon not found

Well, I don't know, maybe someone else could help you. I use Python 2.6 and I didn't meet this problem. Maybe this is related to this problem.

2012-05-21 15:45:27 -0500 commented question Installing on windows, dependency on python-daemon

Have you done any progress on this? I don't know if it is recommended, but I think, if you try to move on with the rest steps of the installation, you will not have any problem.

2012-05-21 14:27:48 -0500 commented question Python-daemon not found

What version of Python do you use? Are you installing on Windows? Have you used these and these sources?

2012-05-21 09:31:41 -0500 commented question Unable to find manage.py

Have you reached the step about askbot-setup? I would expect file manage.py to be inside setup_templates/, and after you run python askbot-setup as described in documentation, then manage.py will appear on your project root directory (the one you run your commands and where setup.py lives).

2012-05-20 21:30:07 -0500 received badge  Nice Question (source)
2012-05-20 21:29:53 -0500 marked best answer live settings about downvoting karma loss

On live settings there are two values that affect downvoting:

image description

From what I see there, I would expect that when I downvote a user, this user loses -1 and I lose -2. However this is not true (hopefully - it's not reasonable to lose more than the bad post). In fact, when I downvote a user, he loses -2 and I lose -1 (which now make more sense).

So at the beggining I though the bug was that the captions in live settings have been put the other way round. They are not. I noticed in FAQ page, there is a reference on {{REP_LOSS_FOR_RECEIVING_DOWNVOTE}} that returns -1, like the setting Loss for owner of post that was downvoted.

So, in my opinion there are 2 bugs (maybe minor):

  1. The default values are not reasonable. User that downvotes shouldn't lose more that user that has a bad post. The default values should be the other way round.
  2. The functionality of downvoting uses the two settings the opposite way.

To see what I mean, check this: In file /auth.py, lines 341,354-356:

author.receive_reputation(askbot_settings.REP_LOSS_FOR_DOWNVOTING)
user.receive_reputation(askbot_settings.REP_LOSS_FOR_RECEIVING_DOWNVOTE)

It is clear that author (of the bad post) loses REP_LOSS_FOR_DOWNVOTING and user (the one that noticed the bad post) loses REP_LOSS_FOR_RECEIVING_DOWNVOTE. It should be the other way round, isn't it?