diff options
172 files changed, 14425 insertions, 3241 deletions
@@ -26,16 +26,13 @@ tmp/* load askbot/skins/default/media/js/flot askbot/skins/common/media/js/closure/google-closure +askbot/skins/common/media/js/jquery.fancybox-1.3.4 askbot/fixtures *.egg dist *.egg-info build -askbot/upfiles/*.jpg -askbot/upfiles/*.jpeg -askbot/upfiles/*.gif -askbot/upfiles/*.png -askbot/upfiles/*.ico +askbot/upfiles/ askbot/upfiles/avatars/ askbot/skins/common/media/mathjax/ /jinja2 diff --git a/askbot/__init__.py b/askbot/__init__.py index 12e4f7d7..1c822e05 100644 --- a/askbot/__init__.py +++ b/askbot/__init__.py @@ -9,7 +9,7 @@ import smtplib import sys import logging -VERSION = (0, 7, 26) +VERSION = (0, 7, 29) #necessary for interoperability of django and coffin try: diff --git a/askbot/admin.py b/askbot/admin.py index af62ed84..34722416 100644 --- a/askbot/admin.py +++ b/askbot/admin.py @@ -31,10 +31,7 @@ class VoteAdmin(admin.ModelAdmin): class FavoriteQuestionAdmin(admin.ModelAdmin): """ admin class""" -class QuestionRevisionAdmin(admin.ModelAdmin): - """ admin class""" - -class AnswerRevisionAdmin(admin.ModelAdmin): +class PostRevisionAdmin(admin.ModelAdmin): """ admin class""" class AwardAdmin(admin.ModelAdmin): @@ -52,8 +49,7 @@ admin.site.register(models.Answer, AnswerAdmin) admin.site.register(models.Comment, CommentAdmin) admin.site.register(models.Vote, VoteAdmin) admin.site.register(models.FavoriteQuestion, FavoriteQuestionAdmin) -admin.site.register(models.QuestionRevision, QuestionRevisionAdmin) -admin.site.register(models.AnswerRevision, AnswerRevisionAdmin) +admin.site.register(models.PostRevision, PostRevisionAdmin) admin.site.register(models.Award, AwardAdmin) admin.site.register(models.Repute, ReputeAdmin) admin.site.register(models.Activity, ActivityAdmin) diff --git a/askbot/conf/email.py b/askbot/conf/email.py index 195c14ee..3db80e7a 100644 --- a/askbot/conf/email.py +++ b/askbot/conf/email.py @@ -39,24 +39,6 @@ settings.register( ) ) -#settings.register( -# livesettings.StringValue( -# EMAIL, -# 'DEFAULT_NOTIFICATION_DELIVERY_SCHEDULE', -# default='w', -# choices=const.NOTIFICATION_DELIVERY_SCHEDULE_CHOICES, -# description=_('Default news notification frequency'), -# help_text=_( -# 'This option currently defines default frequency ' -# 'of emailed updates in the following five categories: ' -# 'questions asked by user, answered by user, individually ' -# 'selected, entire forum (per person tag filter applies) ' -# 'and posts mentioning the user and comment responses' -# ) -# ) -#) - - settings.register( livesettings.StringValue( EMAIL, @@ -139,7 +121,6 @@ settings.register( 'NOTE: in order to use this feature, it is necessary to ' 'run the management command "send_unanswered_question_reminders" ' '(for example, via a cron job - with an appropriate frequency) ' - 'and an IMAP server with a dedicated inbox must be configured ' ) ) ) @@ -182,6 +163,55 @@ settings.register( settings.register( livesettings.BooleanValue( EMAIL, + 'ENABLE_ACCEPT_ANSWER_REMINDERS', + default = False, + description = _('Send periodic reminders to accept the best answer'), + help_text = _( + 'NOTE: in order to use this feature, it is necessary to ' + 'run the management command "send_accept_answer_reminders" ' + '(for example, via a cron job - with an appropriate frequency) ' + ) + ) +) + +settings.register( + livesettings.IntegerValue( + EMAIL, + 'DAYS_BEFORE_SENDING_ACCEPT_ANSWER_REMINDER', + default = 3, + description = _( + 'Days before starting to send reminders to accept an answer' + ), + ) +) + +settings.register( + livesettings.IntegerValue( + EMAIL, + 'ACCEPT_ANSWER_REMINDER_FREQUENCY', + default = 3, + description = _( + 'How often to send accept answer reminders ' + '(in days between the reminders sent).' + ) + ) +) + +settings.register( + livesettings.IntegerValue( + EMAIL, + 'MAX_ACCEPT_ANSWER_REMINDERS', + default = 5, + description = _( + 'Max. number of reminders to send ' + 'to accept the best answer' + ) + ) +) + +settings.register( + livesettings.BooleanValue( + EMAIL, 'EMAIL_VALIDATION', default=False, hidden=True, diff --git a/askbot/const/__init__.py b/askbot/const/__init__.py index 73c71800..84b87fb6 100644 --- a/askbot/const/__init__.py +++ b/askbot/const/__init__.py @@ -113,6 +113,7 @@ TYPE_ACTIVITY_USER_FULL_UPDATED = 17 TYPE_ACTIVITY_EMAIL_UPDATE_SENT = 18 TYPE_ACTIVITY_MENTION = 19 TYPE_ACTIVITY_UNANSWERED_REMINDER_SENT = 20 +TYPE_ACTIVITY_ACCEPT_ANSWER_REMINDER_SENT = 21 #TYPE_ACTIVITY_EDIT_QUESTION = 17 #TYPE_ACTIVITY_EDIT_ANSWER = 18 @@ -140,6 +141,10 @@ TYPE_ACTIVITY = ( TYPE_ACTIVITY_UNANSWERED_REMINDER_SENT, _('reminder about unanswered questions sent'), ), + ( + TYPE_ACTIVITY_ACCEPT_ANSWER_REMINDER_SENT, + _('reminder about accepting the best answer sent'), + ), (TYPE_ACTIVITY_MENTION, _('mentioned in the post')), ) diff --git a/askbot/deployment/__init__.py b/askbot/deployment/__init__.py index 3f04e39d..6f7a86f6 100644 --- a/askbot/deployment/__init__.py +++ b/askbot/deployment/__init__.py @@ -2,8 +2,11 @@ module for deploying askbot """ import os.path +import sys +from optparse import OptionParser from askbot.utils import console from askbot.deployment import messages +from askbot.deployment.messages import print_message from askbot.deployment import path_utils def askbot_setup(): @@ -13,91 +16,130 @@ def askbot_setup(): or gives hints on how to add askbot to an existing Django project """ - #ask - print messages.DEPLOY_PREAMBLE - - directory = None #directory where to put stuff - create_new = False #create new django project or not - where_to_deploy_msg = messages.WHERE_TO_DEPLOY - while directory is None: - - directory = raw_input(where_to_deploy_msg + ' ') - - where_to_deploy_msg = messages.WHERE_TO_DEPLOY_QUIT - - directory = os.path.normpath(directory) - directory = os.path.abspath(directory) - - if os.path.isfile(directory): - print messages.CANT_INSTALL_INTO_FILE % {'path':directory} - directory = None - continue - - if path_utils.can_create_path(directory): - if os.path.exists(directory): - if path_utils.path_is_clean_for_django(directory): - if path_utils.has_existing_django_project(directory): - message = messages.SHOULD_ADD_APP_HERE % \ - { - 'path': directory - } - should_add_app = console.choice_dialog( - message, - choices = ['yes','no'], - invalid_phrase = messages.INVALID_INPUT - ) - if should_add_app == 'yes': - assert(create_new == False) - if path_utils.dir_name_acceptable(directory): - break - else: - print messages.format_msg_bad_dir_name(directory) - directory = None - continue - else: - directory = None - continue - else: - assert(directory != None) - if path_utils.dir_name_acceptable(directory): - create_new = True - break - else: - print messages.format_msg_bad_dir_name(directory) - directory = None - continue - else: - print messages.format_msg_dir_unclean_django(directory) - directory = None - continue - else: - message = messages.format_msg_create(directory) - should_create_new = console.choice_dialog( - message, - choices = ['yes','no'], - invalid_phrase = messages.INVALID_INPUT - ) - if should_create_new == 'yes': - if path_utils.dir_name_acceptable(directory): - create_new = True - break - else: - print messages.format_msg_bad_dir_name(directory) - directory = None - continue - else: - directory = None - continue - else: - print messages.format_msg_dir_not_writable(directory) - directory = None - continue + parser = OptionParser(usage = "%prog [options]") + + parser.add_option( + "-v", "--verbose", + dest = "verbosity", + type = "int", + default = 1, + help = "verbosity level available values 0, 1, 2." + ) + + parser.add_option( + "-n", "--dir-name", + dest = "dir_name", + default = None, + help = "Directory where you want to install." + ) + + parser.add_option( + "-d", "--db-name", + dest = "database_name", + default = None, + help = "The database name" + ) + + parser.add_option( + "-u", "--db-user", + dest = "database_user", + default = None, + help = "The database user" + ) + + parser.add_option( + "-p", "--db-password", + dest = "database_password", + default = None, + help = "the database password" + ) + + parser.add_option( + "--domain", + dest = "domain_name", + default = None, + help = "the domain name of the instance" + ) + + parser.add_option( + "--append-settings", + dest = "local_settings", + default = '', + help = "Extra settings file to append custom settings" + ) + + parser.add_option( + "--force", + dest = "force", + action = 'store_true', + help = "Force overwrite settings.py file" + ) + + try: + options = parser.parse_args()[0] + #ask + if options.verbosity >= 1: + print messages.DEPLOY_PREAMBLE + + directory = path_utils.clean_directory(options.dir_name) + while directory is None: + directory = path_utils.get_install_directory(force = options.force) + + deploy_askbot(directory, options) + except KeyboardInterrupt: + print "\n\nAborted." + sys.exit(1) + + +#separated all the directory creation process to make it more useful + +def deploy_askbot(directory, options): + """function that creates django project files, + all the neccessary directories for askbot, + and the log file + """ help_file = path_utils.get_path_to_help_file() - if create_new: - path_utils.create_path(directory) - path_utils.deploy_into(directory, new_project = True) - print messages.HOW_TO_DEPLOY_NEW % {'help_file': help_file} + context = { + 'database_name': options.database_name, + 'database_password': options.database_password, + 'database_user': options.database_user, + 'domain_name': options.domain_name, + 'local_settings': options.local_settings, + } + if not options.force: + for key in context.keys(): + if context[key] == None: + input_message = 'Please enter a value for %s:' \ + % (key.replace('_', ' ')) + new_value = raw_input(input_message) + context[key] = new_value + + create_new_project = False + if os.path.exists(directory): + if path_utils.has_existing_django_project(directory): + create_new_project = bool(options.force) + else: + create_new_project = True + else: + create_new_project = True + + path_utils.create_path(directory) + + path_utils.deploy_into( + directory, + new_project = create_new_project, + verbosity = options.verbosity, + context = context + ) + + if create_new_project: + print_message( + messages.HOW_TO_DEPLOY_NEW % {'help_file': help_file}, + options.verbosity + ) else: - path_utils.deploy_into(directory, new_project = False) - print messages.HOW_TO_ADD_ASKBOT_TO_DJANGO % {'help_file': help_file} + print_message( + messages.HOW_TO_ADD_ASKBOT_TO_DJANGO % {'help_file': help_file}, + options.verbosity + ) diff --git a/askbot/deployment/assertions.py b/askbot/deployment/assertions.py index 0db62b84..d8dee828 100644 --- a/askbot/deployment/assertions.py +++ b/askbot/deployment/assertions.py @@ -12,7 +12,8 @@ def assert_package_compatibility(): """raises an exception if any known incompatibilities are found """ - (django_major, django_minor, django_micro) = package_utils.get_django_version() + (django_major, django_minor, django_micro) = \ + package_utils.get_django_version() if django_major < 1: raise DeploymentError('Django version < 1.0 is not supported by askbot') diff --git a/askbot/deployment/messages.py b/askbot/deployment/messages.py index 1569de6c..44dde979 100644 --- a/askbot/deployment/messages.py +++ b/askbot/deployment/messages.py @@ -9,9 +9,9 @@ Problems installing? -> please email admin@askbot.org To CANCEL - hit Ctr-C at any time""" -WHERE_TO_DEPLOY = 'Where to deploy (in which directory)?' +WHERE_TO_DEPLOY = 'In which directory to deploy the forum?' -WHERE_TO_DEPLOY_QUIT = 'Where deploy forum (directory)? (Ctrl-C to quit)' +WHERE_TO_DEPLOY_QUIT = 'Where deploy the forum (directory)? Ctrl-C to quit.' CANT_INSTALL_INTO_FILE = '%(path)s is a file\ncannot install there' @@ -32,6 +32,10 @@ but %(existing_prefix)s is not writable""" CONFIRM_DIR_CREATION = """Adding new directories:\n%(existing_prefix)s <-/%(non_existing_tail)s Accept?""" +CANNOT_OVERWRITE_DJANGO_PROJECT = """Directory %(directory)s +already has a django project. If you want to overwrite +settings.py and urls.py files, use parameter --force""" + INVALID_INPUT = 'Please type one of: %(opt_string)s ' \ + '(or hit Ctrl-C to quit)' @@ -78,7 +82,7 @@ def format_msg_dir_unclean_django(directory): directories contains a django project so that users don't create nested projects """ - parent_django_dir = path_utils.find_parent_dir_with_django(directory) + return path_utils.find_parent_dir_with_django(directory) def format_msg_bad_dir_name(directory): """directory name must be bad - i.e. taken by other python module @@ -89,3 +93,7 @@ def format_msg_bad_dir_name(directory): return DIR_NAME_TAKEN_BY_ASKBOT else: return DIR_NAME_TAKEN_BY_PYTHON % {'dir': dir_name} + +def print_message(message, verbosity): + if verbosity >= 1: + print message diff --git a/askbot/deployment/path_utils.py b/askbot/deployment/path_utils.py index 6ad9fc99..e0704a96 100644 --- a/askbot/deployment/path_utils.py +++ b/askbot/deployment/path_utils.py @@ -1,5 +1,5 @@ """utilities in addition to os.path -that +that * help to test existing paths on usability for the installation * create necessary directories * install deployment files @@ -11,6 +11,9 @@ import re import glob import shutil import imp +from askbot.utils import console +from askbot.deployment.template_loader import SettingsTemplate + def split_at_break_point(directory): """splits directory path into two pieces @@ -28,6 +31,25 @@ def split_at_break_point(directory): tail_bits.insert(0, tail) return head, os.path.join(*tail_bits) +def clean_directory(directory): + """Returns normalized absolute path to the directory + regardless of whether it exists or not + or ``None`` - if the path is a file or if ``directory`` + parameter is ``None``""" + if directory is None: + return None + + directory = os.path.normpath(directory) + directory = os.path.abspath(directory) + + if os.path.isfile(directory): + if options.verbosity >= 1 and os.path.isfile(directory): + print messages.CANT_INSTALL_INTO_FILE % {'path':directory} + sys.exit(1) + + return None + return directory + def directory_is_writable(directory): """returns True if directory exists @@ -47,7 +69,7 @@ def directory_is_writable(directory): def can_create_path(directory): - """returns True if user can write file into + """returns True if user can write file into directory even if it does not exist yet and False otherwise """ @@ -55,7 +77,7 @@ def can_create_path(directory): if not os.path.isdir(directory): return False else: - directory, junk = split_at_break_point(directory) + directory = split_at_break_point(directory)[0] return directory_is_writable(directory) @@ -65,8 +87,12 @@ def has_existing_django_project(directory): """returns True is any of the .py files in a given directory imports anything from django """ - file_list = glob.glob(directory + '*.py') + directory = os.path.normpath(directory) + file_list = glob.glob(directory + os.path.sep + '*.py') for file_name in file_list: + if file_name.endswith(os.path.sep + 'manage.py'): + #a hack allowing to install into the distro directory + continue py_file = open(file_name) for line in py_file: if IMPORT_RE1.match(line) or IMPORT_RE2.match(line): @@ -123,24 +149,31 @@ def get_path_to_help_file(): """returns path to the main plain text help file""" return os.path.join(SOURCE_DIR, 'doc', 'INSTALL') -def deploy_into(directory, new_project = None): +def deploy_into(directory, new_project = False, verbosity = 1, context = None): """will copy necessary files into the directory """ - assert(new_project is not None) + assert(isinstance(new_project, bool)) if new_project: - copy_files = ('__init__.py', 'settings.py', 'manage.py', 'urls.py') + copy_files = ('__init__.py', 'manage.py', 'urls.py') blank_files = ('__init__.py', 'manage.py') - print 'Copying files: ' + if verbosity >= 1: + print 'Copying files: ' for file_name in copy_files: src = os.path.join(SOURCE_DIR, 'setup_templates', file_name) if os.path.exists(os.path.join(directory, file_name)): if file_name in blank_files: continue else: - print '* %s' % file_name, - print "- you already have one, please add contents of %s" % src + if file_name == 'urls.py' and new_project: + #overwrite urls.py + shutil.copy(src, directory) + else: + if verbosity >= 1: + print '* %s' % file_name, + print "- you already have one, please add contents of %s" % src else: - print '* %s ' % file_name + if verbosity >= 1: + print '* %s ' % file_name shutil.copy(src, directory) #copy log directory src = os.path.join(SOURCE_DIR, 'setup_templates', 'log') @@ -148,7 +181,29 @@ def deploy_into(directory, new_project = None): create_path(log_dir) touch(os.path.join(log_dir, 'askbot.log')) - print '' + #creating settings file from template + if verbosity >= 1: + print "Creating settings file" + settings_contents = SettingsTemplate(context).render() + settings_path = os.path.join(directory, 'settings.py') + if os.path.exists(settings_path) and new_project == False: + if verbosity >= 1: + print "* you already have a settings file please merge the contents" + elif new_project == True: + settings_file = open(settings_path, 'w+') + settings_file.write(settings_contents) + #Grab the file! + if os.path.exists(context['local_settings']): + local_settings = open(context['local_settings'], 'r').read() + settings_file.write('\n') + settings_file.write(local_settings) + + settings_file.close() + if verbosity >= 1: + print "settings file created" + + if verbosity >= 1: + print '' app_dir = os.path.join(directory, 'askbot') copy_dirs = ('doc', 'cron', 'upfiles') @@ -158,17 +213,22 @@ def deploy_into(directory, new_project = None): dst = os.path.join(app_dir, dir_name) if os.path.abspath(src) != os.path.abspath(dst): if dirs_copied == 0: - print 'copying directories: ', - print '* ' + dir_name + if verbosity >= 1: + print 'copying directories: ', + if verbosity >= 1: + print '* ' + dir_name if os.path.exists(dst): if os.path.isdir(dst): - print 'Directory %s not empty - skipped' % dst + if verbosity >= 1: + print 'Directory %s not empty - skipped' % dst else: - print 'File %s already exists - skipped' % dst + if verbosity >= 1: + print 'File %s already exists - skipped' % dst continue shutil.copytree(src, dst) dirs_copied += 1 - print '' + if verbosity >= 1: + print '' def dir_name_acceptable(directory): """True if directory is not taken by another python module""" @@ -178,3 +238,47 @@ def dir_name_acceptable(directory): return False except ImportError: return True + +def get_install_directory(force = False): + """returns a directory where a new django app/project + can be installed. + If ``force`` is ``True`` - will permit + using a directory with an existing django project. + """ + from askbot.deployment import messages + where_to_deploy_msg = messages.WHERE_TO_DEPLOY_QUIT + directory = raw_input(where_to_deploy_msg + ' ') + directory = clean_directory(directory) + + if directory is None: + return None + + if can_create_path(directory) == False: + print messages.format_msg_dir_not_writable(directory) + return None + + if os.path.exists(directory): + if path_is_clean_for_django(directory): + if has_existing_django_project(directory): + if not force: + print messages.CANNOT_OVERWRITE_DJANGO_PROJECT % \ + {'directory': directory} + return None + else: + print messages.format_msg_dir_unclean_django(directory) + return None + elif force == False: + message = messages.format_msg_create(directory) + should_create_new = console.choice_dialog( + message, + choices = ['yes','no'], + invalid_phrase = messages.INVALID_INPUT + ) + if should_create_new == 'no': + return None + + if not dir_name_acceptable(directory): + print messages.format_msg_bad_dir_name(directory) + return None + + return directory diff --git a/askbot/deployment/template_loader.py b/askbot/deployment/template_loader.py new file mode 100644 index 00000000..fe7c11e6 --- /dev/null +++ b/askbot/deployment/template_loader.py @@ -0,0 +1,13 @@ +import os +import pystache + +SOURCE_DIR = os.path.dirname(os.path.dirname(__file__)) + +class SettingsTemplate(pystache.View): + '''Class for settings''' + + template_path = os.path.join(SOURCE_DIR, 'setup_templates') + template_name = "settings.py" + + def __init__(self, context, **kwargs): + super(SettingsTemplate, self).__init__(context=context, **kwargs) diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst index b22839e0..0ada3395 100644 --- a/askbot/doc/source/changelog.rst +++ b/askbot/doc/source/changelog.rst @@ -3,8 +3,19 @@ Changes in Askbot Development version (not yet published) --------------------------------------- +* Context-sensitive RSS url (`Dejan Noveski <http://www.atomidata.com/>`_) +* Implemented new version of skin (Byron Corrales) * Show unused vote count (Tomasz Zielinski) * Categorized live settings (Evgeny) +* Merge users management command (Daniel Mican) +* Added management command ``send_accept_answer_reminders`` (Evgeny) +* Improved the ``askbot-setup`` script (Adolfo, Evgeny) +* Merge users management command (Daniel Mican) +* Anonymous caching of the question page (Vlad Bokov) +* Fixed sharing button bug, css fixes for new template (Alexander Werner) +* Added ASKBOT_TRANSLATE_URL setting for url localization(Alexander Werner) +* Changed javascript translation model, moved from jqueryi18n to django(Rosandra Cuello Suñol) + 0.7.26 (Current Version) ------------------------ diff --git a/askbot/doc/source/contributors.rst b/askbot/doc/source/contributors.rst index ac807193..3d1303c1 100644 --- a/askbot/doc/source/contributors.rst +++ b/askbot/doc/source/contributors.rst @@ -18,7 +18,10 @@ Programming and documentation * `Jishnu <http://thecodecracker.com/>`_ * `Hrishi <https://github.com/stultus>`_ * Andrei Mamoutkine +* `Daniel Mican <http://www.crunchbase.com/person/daniel-mican>`_ +* `Dejan Noveski <http://www.atomidata.com/>`_ * `Ramiro Morales <http://rmorales.com.ar/>`_ (with Machinalis) +* Vladimir Bokov * `NoahY <https://github.com/NoahY>`_ * `Gael Pasgrimaud <http://www.gawel.org/>`_ (bearstech) * `Arun SAG <http://zer0c00l.in/>`_ @@ -27,6 +30,8 @@ Programming and documentation * `Tomasz Zielinski <http://pyconsultant.eu/>`_ * `Tomasz Szynalski <http://antimoon.com>`_ * `Raghu Udiyar <http://raags.tumblr.com/>`_ +* Alexander Werner +* Rosandra Cuello Suñol Translations ------------ diff --git a/askbot/doc/source/initial-configuration.rst b/askbot/doc/source/initial-configuration.rst index 0cd2c033..340324a1 100644 --- a/askbot/doc/source/initial-configuration.rst +++ b/askbot/doc/source/initial-configuration.rst @@ -29,10 +29,38 @@ There may be an error message; ignore it. `askbot-setup` adds those files to the directory you select (and some more things specific to Askbot). +.. versionadded:: 0.7.24 + `askbot-setup` also have command line arguments such as folder name(name), database name, database password and database user also added verbosity support. + You can also specify a local settings file to append it's contents to the deployment settings file. + + +----------------------------------+------------------------------------------------------------+ + | Parameter | Purpose | + +==================================+============================================================+ + | -n <NAME> | Name of the instance, this is the name that the | + | | folder will use. | + +----------------------------------+------------------------------------------------------------+ + | -d <DATABASE_NAME> | The database name that the instance will use. | + +----------------------------------+------------------------------------------------------------+ + | -u <DATABASE_USER> | The database user that the instance will use. | + +----------------------------------+------------------------------------------------------------+ + | -p <DATABASE_PASSWORD> | The database password for the user. | + +----------------------------------+------------------------------------------------------------+ + | --domain=<DOMAIN_NAME> | Domain name for the application. | + +----------------------------------+------------------------------------------------------------+ + | --append-settings=<SETTINGS_FILE>| Allows to append a setting file content to the | + | | settings file, the parameter is the file to use. | + +----------------------------------+------------------------------------------------------------+ + + +.. note:: + + `askbot-setup` command line arguments detail parameter is available when you type: askbot-setup --h. Note that if you already have a Django site you will not want to use `askbot-setup`, because you don't want to just overwrite your existing settings.py. See below for instructions. -Another thing you have to do if you are creating a brand new Django project is edit the file `settings.py`_. At the very minimum, you will need to provide the correct values to:: +Another thing you have to do if you are creating a brand new Django project is edit the file `settings.py`_. At the very minimum, you will need to provide the correct values to some settings. + +All values must be enclosed in single quotes, as shown below:: DATABASE_ENGINE = '' #e.g. 'mysql' DATABASE_NAME = '' #name of the database you created, e.g. 'askbot'. @@ -40,8 +68,6 @@ Another thing you have to do if you are creating a brand new Django project is e DATABASE_PASSWORD = '' #password to the database CSRF_COOKIE_DOMAIN = ''#e.g. 'example.com' or 'askbot.example.com' (localhost/IP address for tests) -All values must be enclosed in single quotes, as shown above. - .. note:: The files settings.py_ and urls.py_ may also need to be touched up diff --git a/askbot/doc/source/management-commands.rst b/askbot/doc/source/management-commands.rst index 1da3fdee..d69c8673 100644 --- a/askbot/doc/source/management-commands.rst +++ b/askbot/doc/source/management-commands.rst @@ -29,10 +29,13 @@ The bulk of the management commands fall into this group and will probably be th | | the `add_admin` command | +---------------------------------+-------------------------------------------------------------+ | `add_askbot_user --user-name | Create a user account. If password is not given, an | -| --email [--password] | unusable password will be set. | +| --email [--password]` | unusable password will be set. | | | The command does not create associations with | | | any of the external login providers. | +---------------------------------+-------------------------------------------------------------+ +| `merge_users <from_id> | Merges user accounts and all related data from one user | +| <to_id>` | to another, the "from user" account is deleted. | ++---------------------------------+-------------------------------------------------------------+ | `dump_forum [--dump-name | Save forum contents into a file. `--dump-name` parameter is | | some_name]` | optional | +---------------------------------+-------------------------------------------------------------+ @@ -111,6 +114,11 @@ Any configurable options, related to these commands are accessible via "Email" s | | of :ref:`live settings <live-settings>`, as well as | | | an initial wait period and the recurrence delay may be set. | +-------------------------------------+-------------------------------------------------------------+ +| `send_accept_answer_reminders` | Sends periodic reminders about accepting best answers. | +| | This command may be disabled from the "email" section | +| | of the live settings, as well as the appropriate delay | +| | parameters may be set. | ++-------------------------------------+-------------------------------------------------------------+ Data repair commands ==================== diff --git a/askbot/feed.py b/askbot/feed.py index e0c69454..20932f1a 100644 --- a/askbot/feed.py +++ b/askbot/feed.py @@ -137,11 +137,27 @@ class RssLastestQuestionsFeed(Feed): def items(self, item): """get questions for the feed """ - return Question.objects.filter( - deleted=False - ).order_by( - '-last_activity_at' - )[:30] + #initial filtering + qs = Question.objects.filter(deleted=False) + + #get search string and tags from GET + query = self.request.GET.get("q", None) + tags = self.request.GET.getlist("tags") + + if query: + #if there's a search string, use the + #question search method + qs = qs.get_by_text_query(query) + + if tags: + #if there are tags in GET, filter the + #questions additionally + for tag in tags: + qs = qs.filter(tags__name = tag) + + return qs.order_by('-last_activity_at') + + def main(): """main function for use as a script diff --git a/askbot/locale/de/LC_MESSAGES/django.mo b/askbot/locale/de/LC_MESSAGES/django.mo Binary files differindex 668a17c4..e54c459f 100644 --- a/askbot/locale/de/LC_MESSAGES/django.mo +++ b/askbot/locale/de/LC_MESSAGES/django.mo diff --git a/askbot/locale/de/LC_MESSAGES/django.po b/askbot/locale/de/LC_MESSAGES/django.po index c072aa70..abeee17f 100644 --- a/askbot/locale/de/LC_MESSAGES/django.po +++ b/askbot/locale/de/LC_MESSAGES/django.po @@ -2344,7 +2344,7 @@ msgstr "registrieren/" #: deps/django_authopenid/urls.py:21 msgid "signup/" -msgstr "registrieren/" +msgstr "" #: deps/django_authopenid/urls.py:25 msgid "logout/" diff --git a/askbot/locale/de/LC_MESSAGES/djangojs.mo b/askbot/locale/de/LC_MESSAGES/djangojs.mo Binary files differindex 7e87fdc8..71a9a6cb 100644 --- a/askbot/locale/de/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/de/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/de/LC_MESSAGES/djangojs.po b/askbot/locale/de/LC_MESSAGES/djangojs.po index 4fdeb3e9..6d48c0bb 100644 --- a/askbot/locale/de/LC_MESSAGES/djangojs.po +++ b/askbot/locale/de/LC_MESSAGES/djangojs.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:24-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-09-28 00:32-0700\n" +"PO-Revision-Date: 2011-09-28 04:28-0800\n" +"Last-Translator: Rosandra Cuello <rosandra.cuello@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" @@ -17,49 +17,344 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "You don't have a method to log in right now, please add one or more by clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "Lade..." + +#: skins/common/media/js/post.js:127 +#: skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "Tags dürfen nicht leer sein" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "Inhalt darf nicht leer sein" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "Bitte mindestens {0} Zeichen eingeben" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "Bitte Titel eingeben" + +#: skins/common/media/js/post.js:138 +#: skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "Bitte mindestens {0} Zeichen eingeben" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "nicht genügend Rechte" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "Eigene Antworten können nicht als die korrekte akzeptiert werden" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "Bitte einloggen" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "Gastbenutzer können nicht abstimmen " + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "Bitte beleidigenden/regelwidrigen Beitrag bestätigen" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "Gastbenutzer können Beiträge nicht melden" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "Löschen bestätigen" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "Gastbenutzer können Beiträge nicht löschen oder wiederherstellen" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "Beitrag wiederhergestellt" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "Beitrag gelöscht" + +#: skins/common/media/js/post.js:536 +#: skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 +#: skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 +#: skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 +#: skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 +#: skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "wiederherstellen" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "löschen" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "OK" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "%s characters left" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "Diesen Kommentar löschen" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "Löschen des Kommentars bestätigen" + +#: skins/common/media/js/post.js:1622 +#: skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 #: skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" +#: skins/common/media/js/user.js:157 #: skins/default/media/js/user.js:161 -#, perl-format +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" +#: skins/common/media/js/user.js:160 #: skins/default/media/js/user.js:164 -#, perl-format +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" +#: skins/common/media/js/user.js:166 #: skins/default/media/js/user.js:170 -#, perl-format +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "Fett" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "Kursiv" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "Link" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "Zitat" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "Vorformatierter Text" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "Bild" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "Nummerierte Liste" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "Liste" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "Titel" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "horizontaler Balken" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "Rückgängig" + +#: skins/common/media/js/wmd/wmd.js:42 +#: skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "Wiederholen" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "Bild-URL eingeben, zum Beispiel <br />http://www.ihredomain.de/bildname.jpg" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "URL eingeben, zum Beispiel <br />http://www.askbot.org/ </p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" + diff --git a/askbot/locale/en/LC_MESSAGES/django.mo b/askbot/locale/en/LC_MESSAGES/django.mo Binary files differindex 1f065123..e1f4a2e9 100644 --- a/askbot/locale/en/LC_MESSAGES/django.mo +++ b/askbot/locale/en/LC_MESSAGES/django.mo diff --git a/askbot/locale/en/LC_MESSAGES/djangojs.mo b/askbot/locale/en/LC_MESSAGES/djangojs.mo Binary files differindex 674f4542..0e0ba6f8 100644 --- a/askbot/locale/en/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/en/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/en/LC_MESSAGES/djangojs.po b/askbot/locale/en/LC_MESSAGES/djangojs.po index 3d39c7d3..692c0368 100644 --- a/askbot/locale/en/LC_MESSAGES/djangojs.po +++ b/askbot/locale/en/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:25-0500\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,332 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: skins/default/media/js/post.js:532 -msgid "Follow" +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "please enter at least one tag" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "please enter more than {0} characters" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "please enter at least {0} characters" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "sorry, you cannot accept your own answer" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "sorry, anonymous users cannot vote " + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "are you sure this post is offensive, contains spam, advertising, malicious remarks, etc.?" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "are you sure you want to delete this?" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "sorry, anonymous users cannot delete or undelete posts" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "your post is now restored!" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "your post has been deleted" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 +msgid "Follow" +msgstr "Follow" + +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" +msgstr "<div>Following</div><div class=\"unfollow\">Unfollow</div>" + +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "save comment" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "please enter at least {0} more characters" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "Are you sure you do not want to post this comment?" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "do you really want to delete this comment?" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "click to edit this comment" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "edit" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "enter URL of the image, e.g. http://www.example.com/image.jpg or upload an image file" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "enter Web address, e.g. http://www.example.com \"page title\"" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "Please choose and upload a file:" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/es/LC_MESSAGES/djangojs.mo b/askbot/locale/es/LC_MESSAGES/djangojs.mo Binary files differindex 462417d2..b6e2eb66 100644 --- a/askbot/locale/es/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/es/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/es/LC_MESSAGES/djangojs.po b/askbot/locale/es/LC_MESSAGES/djangojs.po index 57d10b13..a5dc9d4c 100644 --- a/askbot/locale/es/LC_MESSAGES/djangojs.po +++ b/askbot/locale/es/LC_MESSAGES/djangojs.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:25-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" +"PO-Revision-Date: 2011-09-28 04:20-0800\n" +"Last-Translator: Rosandra Cuello <rosandra.cuello@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" @@ -17,49 +17,344 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "You don't have a method to log in right now, please add one or more by clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "cargando..." + +#: skins/common/media/js/post.js:127 +#: skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "las etiquetas no pueden estar vacías" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "el contenido no puede estar vacío" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "por favor introduzca mas de {0} caracteres" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "por favor ingrese un título" + +#: skins/common/media/js/post.js:138 +#: skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "por favor introduzca al menos {0} caracteres" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "privilegio insuficiente" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "no puede escoger su propia respuesta como la mejor" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "por favor inicie sesión" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "usuarios anónimos no pueden votar" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "por favor confirme ofensiva" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "usuarios anónimos no pueden marcar publicaciones como ofensivas" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "¿Está seguro que desea borrar esto?" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "usuarios anónimos no pueden borrar o recuperar publicaciones" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "publicación recuperada" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "publicación borrada。" + +#: skins/common/media/js/post.js:536 +#: skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 +#: skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 +#: skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 +#: skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 +#: skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "recuperar" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "borrar" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "agregar comentario" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "%s caracteres faltantes" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "borrar este comentario" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "¿Realmente desea borrar este comentario?" + +#: skins/common/media/js/post.js:1622 +#: skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 #: skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" +#: skins/common/media/js/user.js:157 #: skins/default/media/js/user.js:161 -#, perl-format +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" +#: skins/common/media/js/user.js:160 #: skins/default/media/js/user.js:164 -#, perl-format +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" +#: skins/common/media/js/user.js:166 #: skins/default/media/js/user.js:170 -#, perl-format +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "negrita" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "cursiva" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "enlace" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "citar" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "texto preformateado" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "imagen" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "lista numerada" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "lista no numerada" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "encabezado" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "barra horizontal" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "deshacer" + +#: skins/common/media/js/wmd/wmd.js:42 +#: skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "rehacer" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "introduzca la URL de la imagen, por ejemplo:<br />http://www.example.com/image.jpg \"titulo de imagen\"" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "introduzca direcciones web, ejemplo:<br />http://www.cnprog.com/ \"titulo del enlace\"</p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" + diff --git a/askbot/locale/fi/LC_MESSAGES/django.mo b/askbot/locale/fi/LC_MESSAGES/django.mo Binary files differindex cbd57018..e4142187 100644 --- a/askbot/locale/fi/LC_MESSAGES/django.mo +++ b/askbot/locale/fi/LC_MESSAGES/django.mo diff --git a/askbot/locale/fi/LC_MESSAGES/djangojs.mo b/askbot/locale/fi/LC_MESSAGES/djangojs.mo Binary files differindex 0be0e2e5..ec5b9631 100644 --- a/askbot/locale/fi/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/fi/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/fi/LC_MESSAGES/djangojs.po b/askbot/locale/fi/LC_MESSAGES/djangojs.po index 78b1f23e..d98fb20e 100644 --- a/askbot/locale/fi/LC_MESSAGES/djangojs.po +++ b/askbot/locale/fi/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:26-0500\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,332 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "anna vähintään yksi tagi" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "syötä vähintään {0} merkkiä" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "syötä vähintään {0} merkkiä" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "et voi hyväksyä omaa vastaustasi parhaaksi" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "kirjaudu sisään, jotta voit käyttää tätä ominaisuutta " + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "oletko varma, että tämä on roskaposti, loukkaava tai muuta hyväksymätöntä?" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "oletko varma, että haluat poistaa tämän?" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "kirjaudu sisään, jotta voit käyttää tätä ominaisuutta" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "postauksesi on palautettu!" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "postauksesi on poistettu" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "%s merkkiä jäljellä" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "oletko varma, että haluat poistaa tämän kommentin?" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "Anna kuvan URL-osoite, esim. http://www.example.com/image.jpg \"kuvan otsikko\"" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "Anna URL-osoite, esim. http://www.example.com \"sivun otsikko\"" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/fr/LC_MESSAGES/django.mo b/askbot/locale/fr/LC_MESSAGES/django.mo Binary files differindex 1fe00ef0..709cd9e9 100644 --- a/askbot/locale/fr/LC_MESSAGES/django.mo +++ b/askbot/locale/fr/LC_MESSAGES/django.mo diff --git a/askbot/locale/fr/LC_MESSAGES/djangojs.mo b/askbot/locale/fr/LC_MESSAGES/djangojs.mo Binary files differindex 386cff64..0a8cfd17 100644 --- a/askbot/locale/fr/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/fr/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/fr/LC_MESSAGES/djangojs.po b/askbot/locale/fr/LC_MESSAGES/djangojs.po index 96c21a1c..52594fab 100644 --- a/askbot/locale/fr/LC_MESSAGES/djangojs.po +++ b/askbot/locale/fr/LC_MESSAGES/djangojs.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:27-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" +"PO-Revision-Date: 2011-09-28 08:12-0800\n" +"Last-Translator: Rosandra Cuello <rosandra.cuello@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" @@ -17,49 +17,344 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "You don't have a method to log in right now, please add one or more by clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "Chargement en cours..." + +#: skins/common/media/js/post.js:127 +#: skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "Les mots-clés ne doivent pas être vides" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "Le contenu ne doit pas être vide" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "Veuillez saisir au moins {0} caractères" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "Veuillez saisir un titre" + +#: skins/common/media/js/post.js:138 +#: skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "Veuillez saisir au moins {0} caractères" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "Privilèges insuffisants" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "Vous ne pouvez pas désigner une de vos propres réponses comme étant la meilleure réponse" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "Veuillez vous authentifier" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "les utilisateurs anonyment ne peuvent pas voter " + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "Veuillez confirmer que le contenu est abusif" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "Les utilisateurs anonymes ne peuvent pas signaler les messages à contenu abusif" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "Confirmer la suppression" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "Les utilisateurs anonymes ne peuvent pas supprimer/restaurer" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "Message restauré" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "Message supprimé" + +#: skins/common/media/js/post.js:536 +#: skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 +#: skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 +#: skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 +#: skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 +#: skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "Restaurer" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "supprimer" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "OK" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "supprimer ce commentaire" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "Confirmer la suppression du commentaire" + +#: skins/common/media/js/post.js:1622 +#: skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 #: skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" +#: skins/common/media/js/user.js:157 #: skins/default/media/js/user.js:161 -#, perl-format +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" +#: skins/common/media/js/user.js:160 #: skins/default/media/js/user.js:164 -#, perl-format +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" +#: skins/common/media/js/user.js:166 #: skins/default/media/js/user.js:170 -#, perl-format +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "gras" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "italique" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "lien" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "Citer" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "Texte préformaté" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "Image" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "liste numérotée" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "liste" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "Titre" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "Barre horizontale" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "Annuler" + +#: skins/common/media/js/wmd/wmd.js:42 +#: skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "Rétablir" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "Veuillez saisir une URL menant à une image, par exemple <br />http://www.votre-domaine.com/nom-image.jpg" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "Entrez une URL, par exemple <br />http://www.askbot.org/ </p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" + diff --git a/askbot/locale/it/LC_MESSAGES/django.mo b/askbot/locale/it/LC_MESSAGES/django.mo Binary files differindex 6cbc8fac..46ec86a8 100644 --- a/askbot/locale/it/LC_MESSAGES/django.mo +++ b/askbot/locale/it/LC_MESSAGES/django.mo diff --git a/askbot/locale/it/LC_MESSAGES/djangojs.mo b/askbot/locale/it/LC_MESSAGES/djangojs.mo Binary files differindex e51c1286..cd794c2b 100644 --- a/askbot/locale/it/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/it/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/it/LC_MESSAGES/djangojs.po b/askbot/locale/it/LC_MESSAGES/djangojs.po index ce10412c..8077b936 100644 --- a/askbot/locale/it/LC_MESSAGES/djangojs.po +++ b/askbot/locale/it/LC_MESSAGES/djangojs.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:27-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" +"PO-Revision-Date: 2011-09-28 08:20-0800\n" +"Last-Translator: Rosandra Cuello <rosandra.cuello@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" @@ -17,49 +17,344 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "You don't have a method to log in right now, please add one or more by clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "Caricamento..." + +#: skins/common/media/js/post.js:127 +#: skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "Il campo Tags non può essere vuoto" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "il contenuto non può essere vuoto" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "per favore inserisci più di {0} caratteri" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "Per favore inserisci il titolo" + +#: skins/common/media/js/post.js:138 +#: skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "per favore inserisci almeno {0} caratteri" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "privilegi non sufficienti" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "non è possibile assegnare come miglior risposta ad una propria domanda una propria risposta" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "Per favore effettua il login" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "Gli utenti anonimi non possono votare " + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "sei certo che questo post sia offensivo, contenga spam, pubblicità, osservazioni poco idonee, ecc.?" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "Gli utenti anonimi non possono flaggare come offensivo questo post" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "conferma la cancellazione" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "Gli utenti anonimi non possono cancellare/annullare la cancellazione" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "Post recuperato" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "Post eliminato" + +#: skins/common/media/js/post.js:536 +#: skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 +#: skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 +#: skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 +#: skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 +#: skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "elimina" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "elimina" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "OK" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "%s caratteri rimanenti" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "Elimina questo commento" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "Vuoi davvero cancellare il commento?" + +#: skins/common/media/js/post.js:1622 +#: skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 #: skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" +#: skins/common/media/js/user.js:157 #: skins/default/media/js/user.js:161 -#, perl-format +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" +#: skins/common/media/js/user.js:160 #: skins/default/media/js/user.js:164 -#, perl-format +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" +#: skins/common/media/js/user.js:166 #: skins/default/media/js/user.js:170 -#, perl-format +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "grassetto" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "corsivo" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "Link" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "cita" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "Testo preformattato" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "Immagine" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "Lista numerata" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "Lista" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "Titolo" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "barra orizzontale" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "annulla" + +#: skins/common/media/js/wmd/wmd.js:42 +#: skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "Esegui nuovamente" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "inserisci l'URL dell'immagine, es. http://www.example.com/immagine.jpg \"titolo immagine\"" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "inserisci l'indirizzo web, e.g. <br />http://www.askbot.org/ </p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" + diff --git a/askbot/locale/ja/LC_MESSAGES/django.mo b/askbot/locale/ja/LC_MESSAGES/django.mo Binary files differindex efb75cc8..7f98e565 100644 --- a/askbot/locale/ja/LC_MESSAGES/django.mo +++ b/askbot/locale/ja/LC_MESSAGES/django.mo diff --git a/askbot/locale/ja/LC_MESSAGES/djangojs.mo b/askbot/locale/ja/LC_MESSAGES/djangojs.mo Binary files differindex a0e8222d..7bb76233 100644 --- a/askbot/locale/ja/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/ja/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/ja/LC_MESSAGES/djangojs.po b/askbot/locale/ja/LC_MESSAGES/djangojs.po index 9dc61083..fdbc6f65 100644 --- a/askbot/locale/ja/LC_MESSAGES/djangojs.po +++ b/askbot/locale/ja/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:28-0500\n" +"POT-Creation-Date: 2011-09-28 00:32-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,331 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/ko/LC_MESSAGES/django.mo b/askbot/locale/ko/LC_MESSAGES/django.mo Binary files differindex 5f175980..c117d238 100644 --- a/askbot/locale/ko/LC_MESSAGES/django.mo +++ b/askbot/locale/ko/LC_MESSAGES/django.mo diff --git a/askbot/locale/ko/LC_MESSAGES/djangojs.mo b/askbot/locale/ko/LC_MESSAGES/djangojs.mo Binary files differindex 94448970..ac9345ee 100644 --- a/askbot/locale/ko/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/ko/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/ko/LC_MESSAGES/djangojs.po b/askbot/locale/ko/LC_MESSAGES/djangojs.po index b033cb97..7cec7ad6 100644 --- a/askbot/locale/ko/LC_MESSAGES/djangojs.po +++ b/askbot/locale/ko/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:29-0500\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,331 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/pt_BR/LC_MESSAGES/django.mo b/askbot/locale/pt_BR/LC_MESSAGES/django.mo Binary files differindex 172807a7..2e17a8ef 100644 --- a/askbot/locale/pt_BR/LC_MESSAGES/django.mo +++ b/askbot/locale/pt_BR/LC_MESSAGES/django.mo diff --git a/askbot/locale/pt_BR/LC_MESSAGES/djangojs.mo b/askbot/locale/pt_BR/LC_MESSAGES/djangojs.mo Binary files differindex 1b7fa761..673ea50c 100644 --- a/askbot/locale/pt_BR/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/pt_BR/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/pt_BR/LC_MESSAGES/djangojs.po b/askbot/locale/pt_BR/LC_MESSAGES/djangojs.po index eb07cced..cba62186 100644 --- a/askbot/locale/pt_BR/LC_MESSAGES/djangojs.po +++ b/askbot/locale/pt_BR/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:35-0500\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,332 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/ro/LC_MESSAGES/django.mo b/askbot/locale/ro/LC_MESSAGES/django.mo Binary files differindex 7b66727a..33ff42f7 100644 --- a/askbot/locale/ro/LC_MESSAGES/django.mo +++ b/askbot/locale/ro/LC_MESSAGES/django.mo diff --git a/askbot/locale/ro/LC_MESSAGES/djangojs.mo b/askbot/locale/ro/LC_MESSAGES/djangojs.mo Binary files differindex 6701db6d..06702fae 100644 --- a/askbot/locale/ro/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/ro/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/ro/LC_MESSAGES/djangojs.po b/askbot/locale/ro/LC_MESSAGES/djangojs.po index b6f24438..988f77ca 100644 --- a/askbot/locale/ro/LC_MESSAGES/djangojs.po +++ b/askbot/locale/ro/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:30-0500\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -18,49 +18,333 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n == 1 ? 0: (((n % 100 > 19) || ((n % 100 " "== 0) && (n != 0))) ? 2: 1));\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/ru/LC_MESSAGES/django.mo b/askbot/locale/ru/LC_MESSAGES/django.mo Binary files differindex c41a06bf..4d01e193 100644 --- a/askbot/locale/ru/LC_MESSAGES/django.mo +++ b/askbot/locale/ru/LC_MESSAGES/django.mo diff --git a/askbot/locale/ru/LC_MESSAGES/djangojs.mo b/askbot/locale/ru/LC_MESSAGES/djangojs.mo Binary files differindex a4408153..80e49dd0 100644 --- a/askbot/locale/ru/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/ru/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/ru/LC_MESSAGES/djangojs.po b/askbot/locale/ru/LC_MESSAGES/djangojs.po index a92490fb..a4709cf8 100644 --- a/askbot/locale/ru/LC_MESSAGES/djangojs.po +++ b/askbot/locale/ru/LC_MESSAGES/djangojs.po @@ -7,69 +7,362 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:30-0500\n" -"PO-Revision-Date: 2011-09-05 09:02\n" -"Last-Translator: <efadeev@uci.edu>\n" +"POT-Creation-Date: 2011-09-28 00:32-0700\n" +"PO-Revision-Date: 2011-09-28 08:02-0800\n" +"Last-Translator: Rosandra Cuello <rosandra.cuello@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" -"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2\n" "X-Translated-Using: django-rosetta 0.6.2\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "Вы действительно хотите удалить логин через %s?" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "Пожалуйста, добавьте хотя бы один постоянный метод для авторизации." + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "You don't have a method to log in right now, please add one or more by clicking any of the icons below." +msgstr "У Вас сейчас нет постоянного метода авторизации, пожалуйста выберите хотя бы один, нажав на любую из предложеных ниже кнопок." + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "пароли не совпадают" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "Просмотреть, изменить существующие методы авторизации." + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "Чтобы продолжить, пожалуйста введите %s" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "Соедините %(site)s с Вашим аккаунтом от %(provider_name)s" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "Измените Ваш пароль для %s" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "Изменить пароль" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "Создать пароль для %s" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "Создать пароль" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "Создать аккаунт, защищенный паролем" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "загрузка..." + +#: skins/common/media/js/post.js:127 +#: skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "введите теги" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "пожалуйста, добавьте содержание" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "содержание должно быть более {0} символов" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "пожалуйста, введите заголовок" + +#: skins/common/media/js/post.js:138 +#: skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "заголовок должен быть более {0} символов" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "недостаточно прав" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "Извините, выбрать собственный ответ в качестве лучшего не разрешается" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "введите логин" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "Извините, но для того чтобы голосовать, " + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "Вы уверены что это сообщение неуместно?" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "Извините, но для того чтобы пожаловаться на сообщение, " + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "Удалить?" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "неавторизированные пользователи не могут восстанавливать и удалять сообщения " + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "восстановить сообщение" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "сообщение удалено" + +#: skins/common/media/js/post.js:536 +#: skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "Добавить закладку" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 +#: skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 +#: skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 +#: skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "%s закладка" msgstr[1] "%s закладки" msgstr[2] "%s закладок" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 +#: skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "<div>Есть закладка!</div><div class=\"unfollow\">Убрать закладку</div>" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "восстановить" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "удалить" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "добавить комментарий" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "сохранить комментарий" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "недостаточно символов, пожалуйста, добавьте ещё {0}" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "осталось место для %s символов" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "удалить этот комментарий" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "Удалить комментарий?" + +#: skins/common/media/js/post.js:1622 +#: skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "Пожалуйста, добавьте заглавие к вопросу (>10 букв)" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "Тег \"<span></span>\" подходит для:" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "и ещё %s, не показано..." +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "Пожалуйста, отметьте хотя бы одно извещение" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "Удалить это извещение?" +msgstr[1] "Удалить эти извещения?" +msgstr[2] "Удалить эти извещения?" + +#: skins/common/media/js/user.js:125 #: skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" -msgstr "" -"Пожалуйста <a href=\"%(signin_url)s\">авторизуйтесь</a> чтобы отметить " -"профиль %(username)s" +msgstr "Пожалуйста <a href=\"%(signin_url)s\">авторизуйтесь</a> чтобы отметить профиль %(username)s" +#: skins/common/media/js/user.js:157 #: skins/default/media/js/user.js:161 -#, perl-format +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" +#: skins/common/media/js/user.js:160 #: skins/default/media/js/user.js:164 -#, perl-format +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" +#: skins/common/media/js/user.js:166 #: skins/default/media/js/user.js:170 -#, perl-format +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "нажмите здесь, чтобы отредактировать этот комментарий" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "редактировать" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "смотрите вопросы, помеченные '%s'" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "жирный" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "курсив" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "ссылка" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "цитата" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "форматирование текста" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "изображение" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "пронумерованный список" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "маркированный список" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "заголовок" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "горизонтальная полоса" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "отменить" + +#: skins/common/media/js/wmd/wmd.js:42 +#: skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "повторить" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "введите url изображения, например:<br /> http://www.domain.ru/kartinka.gif" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "введите url, например:<br />http://www.domain.ru/ </p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "загрузить файл" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "название файла" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" + #~ msgid "%(q_num)s question" + #~ msgid_plural "%(q_num)s questions" #~ msgstr[0] "%(q_num)s вопрос" #~ msgstr[1] "%(q_num)s вопроса" diff --git a/askbot/locale/sr/LC_MESSAGES/django.mo b/askbot/locale/sr/LC_MESSAGES/django.mo Binary files differindex 00cab4f5..3e3ca237 100644 --- a/askbot/locale/sr/LC_MESSAGES/django.mo +++ b/askbot/locale/sr/LC_MESSAGES/django.mo diff --git a/askbot/locale/sr/LC_MESSAGES/djangojs.mo b/askbot/locale/sr/LC_MESSAGES/djangojs.mo Binary files differindex 2c8ecbcf..4880c727 100644 --- a/askbot/locale/sr/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/sr/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/sr/LC_MESSAGES/djangojs.po b/askbot/locale/sr/LC_MESSAGES/djangojs.po index 91b621d4..f3f038d0 100644 --- a/askbot/locale/sr/LC_MESSAGES/djangojs.po +++ b/askbot/locale/sr/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:31-0500\n" +"POT-Creation-Date: 2011-09-28 00:32-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -18,49 +18,333 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" +msgstr[2] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/tr/LC_MESSAGES/django.mo b/askbot/locale/tr/LC_MESSAGES/django.mo Binary files differindex 5e511994..5f3f7a79 100644 --- a/askbot/locale/tr/LC_MESSAGES/django.mo +++ b/askbot/locale/tr/LC_MESSAGES/django.mo diff --git a/askbot/locale/tr/LC_MESSAGES/djangojs.mo b/askbot/locale/tr/LC_MESSAGES/djangojs.mo Binary files differindex 36a5bdfa..6545f119 100644 --- a/askbot/locale/tr/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/tr/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/tr/LC_MESSAGES/djangojs.po b/askbot/locale/tr/LC_MESSAGES/djangojs.po index 5872aa10..22e96e6c 100644 --- a/askbot/locale/tr/LC_MESSAGES/djangojs.po +++ b/askbot/locale/tr/LC_MESSAGES/djangojs.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:32-0500\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" +"PO-Revision-Date: 2011-09-28 04:13-0800\n" +"Last-Translator: Rosandra Cuello <rosandra.cuello@gmail.com>\n" "Language-Team: LANGUAGE <LL@li.org>\n" "Language: \n" "MIME-Version: 1.0\n" @@ -17,49 +17,344 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "You don't have a method to log in right now, please add one or more by clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "yükleniyor..." + +#: skins/common/media/js/post.js:127 +#: skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "etiketler boş olamaz" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "içerik boş olamaz" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "Lütfen en az (0) karakter girin" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "lütfen bir başlık yazın" + +#: skins/common/media/js/post.js:138 +#: skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "Lütfen en az (0) karakter girin" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "buna yetkiniz yoktur" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "en cevap olarak kendi cevabınızı seçemezsiniz" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "lütfen üye girişi yapınız" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "üye girişi yapmadan oy kullanamazsınız" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "şikayetinizi onaylayın" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "üye girişi yapmadan şikayet gönderemezsiniz" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "Bunu silmek istediğinizden emin misiniz?" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "üye girişi yapmadan yazı silemez yada geri alamazsınız" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "yazı geri alındı" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "yazı silindi" + +#: skins/common/media/js/post.js:536 +#: skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 +#: skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 +#: skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 +#: skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 +#: skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "geri al" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "sil" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "yorum ekle" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "yazılabilir %s karakter eksik" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "bu yorumu sil" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "yorumu silmek istediğinizden emin misiniz?" + +#: skins/common/media/js/post.js:1622 +#: skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" +msgstr[1] "" + +#: skins/common/media/js/user.js:125 #: skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" +#: skins/common/media/js/user.js:157 #: skins/default/media/js/user.js:161 -#, perl-format +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" +#: skins/common/media/js/user.js:160 #: skins/default/media/js/user.js:164 -#, perl-format +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" +#: skins/common/media/js/user.js:166 #: skins/default/media/js/user.js:170 -#, perl-format +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "kalın" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "italik" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "link" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "alıntı" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "hazır metin" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "resimler" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "numaralı liste" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "işaretli liste" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "Başlık" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "yatay bar" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "geri" + +#: skins/common/media/js/wmd/wmd.js:42 +#: skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "yeniden" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "örnek resmin URLsini girin: <br />http://www.example.com/image.jpg \"resim başlığı\"" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "web adresini girin: <br />http://www.cnprog.com/ \"başlık bağlantısı\"</p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" + diff --git a/askbot/locale/vi/LC_MESSAGES/django.mo b/askbot/locale/vi/LC_MESSAGES/django.mo Binary files differindex 4f175ad6..cb82d178 100644 --- a/askbot/locale/vi/LC_MESSAGES/django.mo +++ b/askbot/locale/vi/LC_MESSAGES/django.mo diff --git a/askbot/locale/vi/LC_MESSAGES/djangojs.mo b/askbot/locale/vi/LC_MESSAGES/djangojs.mo Binary files differindex 497e70f5..ac9345ee 100644 --- a/askbot/locale/vi/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/vi/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/vi/LC_MESSAGES/djangojs.po b/askbot/locale/vi/LC_MESSAGES/djangojs.po index 3448d342..7cec7ad6 100644 --- a/askbot/locale/vi/LC_MESSAGES/djangojs.po +++ b/askbot/locale/vi/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:33-0500\n" +"POT-Creation-Date: 2011-09-28 00:33-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,331 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "" + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/zh-tw/LC_MESSAGES/django.mo b/askbot/locale/zh-tw/LC_MESSAGES/django.mo Binary files differindex 9e398bb2..3a914dd3 100644 --- a/askbot/locale/zh-tw/LC_MESSAGES/django.mo +++ b/askbot/locale/zh-tw/LC_MESSAGES/django.mo diff --git a/askbot/locale/zh-tw/LC_MESSAGES/djangojs.mo b/askbot/locale/zh-tw/LC_MESSAGES/djangojs.mo Binary files differindex 496607ae..4d81cbf2 100644 --- a/askbot/locale/zh-tw/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/zh-tw/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/zh-tw/LC_MESSAGES/djangojs.po b/askbot/locale/zh-tw/LC_MESSAGES/djangojs.po index 7e7b0ccb..dbd7b604 100644 --- a/askbot/locale/zh-tw/LC_MESSAGES/djangojs.po +++ b/askbot/locale/zh-tw/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:50-0500\n" +"POT-Creation-Date: 2011-09-28 00:32-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,331 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "讀取中..." + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "標籤不能為空白" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "內容不能為空白" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "請輸入至少 {0} 字符。" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "請輸入標題。" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "請輸入至少 {0} 字符。" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "權限不足" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "不能蔽掃自珍" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "請先登錄" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "確定要歸類該帖為廣告、人身攻擊、惡意言論嗎?" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "匿名用戶不能操作" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "確定刪除" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "匿名用戶不能刪除或恢復帖子" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "操作成功!該帖子已被恢複。" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "操作成功!該帖子已刪除。" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "取消" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "刪除" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "添加評論" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "還可寫%s字" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "刪除此評論" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "刪除評論確認" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "點擊消息框關閉" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "粗體" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "斜體" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "超連接" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "引用" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "代碼" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "圖片" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "數字編號列表" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "項目符號列表" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "標題" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "水平線" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "撤銷" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "重做" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "<b>輸入圖片地址</b></p><p>示例:<br />http://www.example.com/image.jpg \"我的截圖\"" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "<b>輸入Web地址</b></p><p>示例:<br />http://www.cnprog.com/ \"我的網站\"</p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/locale/zh_CN/LC_MESSAGES/django.mo b/askbot/locale/zh_CN/LC_MESSAGES/django.mo Binary files differindex 59fb0403..e0c7877e 100644 --- a/askbot/locale/zh_CN/LC_MESSAGES/django.mo +++ b/askbot/locale/zh_CN/LC_MESSAGES/django.mo diff --git a/askbot/locale/zh_CN/LC_MESSAGES/djangojs.mo b/askbot/locale/zh_CN/LC_MESSAGES/djangojs.mo Binary files differindex 497e70f5..594e1f99 100644 --- a/askbot/locale/zh_CN/LC_MESSAGES/djangojs.mo +++ b/askbot/locale/zh_CN/LC_MESSAGES/djangojs.mo diff --git a/askbot/locale/zh_CN/LC_MESSAGES/djangojs.po b/askbot/locale/zh_CN/LC_MESSAGES/djangojs.po index 3448d342..895e57fe 100644 --- a/askbot/locale/zh_CN/LC_MESSAGES/djangojs.po +++ b/askbot/locale/zh_CN/LC_MESSAGES/djangojs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.7\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-08 02:33-0500\n" +"POT-Creation-Date: 2011-09-28 00:32-0700\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,49 +17,331 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0\n" -#: skins/default/media/js/post.js:532 +#: skins/common/media/jquery-openid/jquery.openid.js:73 +#, c-format +msgid "Are you sure you want to remove your %s login?" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:90 +msgid "Please add one or more login methods." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:93 +msgid "" +"You don't have a method to log in right now, please add one or more by " +"clicking any of the icons below." +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:135 +msgid "passwords do not match" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:162 +msgid "Show/change current login methods" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:223 +#, c-format +msgid "Please enter your %s, then proceed" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:225 +msgid "Connect your %(provider_name)s account to %(site)s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:319 +#, c-format +msgid "Change your %s password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:320 +msgid "Change password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:323 +#, c-format +msgid "Create a password for %s" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:324 +msgid "Create password" +msgstr "" + +#: skins/common/media/jquery-openid/jquery.openid.js:340 +msgid "Create a password-protected account" +msgstr "" + +#: skins/common/media/js/post.js:28 +msgid "loading..." +msgstr "读取中..." + +#: skins/common/media/js/post.js:127 skins/common/media/js/post.js.c:856 +msgid "tags cannot be empty" +msgstr "标签不能为空。" + +#: skins/common/media/js/post.js:133 +msgid "content cannot be empty" +msgstr "内容不能为空。" + +#: skins/common/media/js/post.js:134 +msgid "content minchars" +msgstr "请输入至少 {0} 字符。" + +#: skins/common/media/js/post.js:137 +msgid "please enter title" +msgstr "请输入标题。" + +#: skins/common/media/js/post.js:138 skins/common/media/js/post.js.c:981 +msgid "title minchars" +msgstr "请输入至少 {0} 字符。" + +#: skins/common/media/js/post.js:281 +msgid "insufficient privilege" +msgstr "用户权限不在操作范围" + +#: skins/common/media/js/post.js:282 +msgid "cannot pick own answer as best" +msgstr "不能设置自己的回答为最佳答案" + +#: skins/common/media/js/post.js:287 +msgid "please login" +msgstr "注册或者登录" + +#: skins/common/media/js/post.js:289 +msgid "anonymous users cannot follow questions" +msgstr "" + +#: skins/common/media/js/post.js:290 +msgid "anonymous users cannot subscribe to questions" +msgstr "" + +#: skins/common/media/js/post.js:291 +msgid "anonymous users cannot vote" +msgstr "" + +#: skins/common/media/js/post.js:293 +msgid "please confirm offensive" +msgstr "确定要归类该帖为广告、人身攻击、恶意言论吗?" + +#: skins/common/media/js/post.js:294 +msgid "anonymous users cannot flag offensive posts" +msgstr "匿名用户不能操作,请先" + +#: skins/common/media/js/post.js:295 +msgid "confirm delete" +msgstr "确定要删除/撤销删除该帖吗?" + +#: skins/common/media/js/post.js:296 +msgid "anonymous users cannot delete/undelete" +msgstr "匿名用户不能删除或撤销删除帖子" + +#: skins/common/media/js/post.js:297 +msgid "post recovered" +msgstr "操作成功!该帖子已被恢复。" + +#: skins/common/media/js/post.js:298 +msgid "post deleted" +msgstr "操作成功!该帖子已删除。" + +#: skins/common/media/js/post.js:536 skins/default/media/js/post.js:535 +#: skins/old/media/js/post.js:535 msgid "Follow" msgstr "" -#: skins/default/media/js/post.js:541 skins/default/media/js/post.js.py:550 -#, perl-format +#: skins/common/media/js/post.js:545 skins/common/media/js/post.js.c:554 +#: skins/default/media/js/post.js:544 skins/default/media/js/post.js.c:553 +#: skins/old/media/js/post.js:544 skins/old/media/js/post.js.c:553 +#, c-format msgid "%s follower" msgid_plural "%s followers" msgstr[0] "" msgstr[1] "" -#: skins/default/media/js/post.js:546 +#: skins/common/media/js/post.js:550 skins/default/media/js/post.js:549 +#: skins/old/media/js/post.js:549 msgid "<div>Following</div><div class=\"unfollow\">Unfollow</div>" msgstr "" -#: skins/default/media/js/post.js:1613 +#: skins/common/media/js/post.js:612 +msgid "undelete" +msgstr "取消" + +#: skins/common/media/js/post.js:617 +msgid "delete" +msgstr "删除" + +#: skins/common/media/js/post.js:954 +msgid "add comment" +msgstr "添加评论" + +#: skins/common/media/js/post.js:957 +msgid "save comment" +msgstr "" + +#: skins/common/media/js/post.js:984 +msgid "enter more characters" +msgstr "" + +#: skins/common/media/js/post.js:989 +#, c-format +msgid "%s characters left" +msgstr "还可写%s字符" + +#: skins/common/media/js/post.js:1060 +msgid "cancel" +msgstr "" + +#: skins/common/media/js/post.js:1103 +msgid "confirm abandon comment" +msgstr "" + +#: skins/common/media/js/post.js:1177 +msgid "delete this comment" +msgstr "删除此评论" + +#: skins/common/media/js/post.js:1381 +msgid "confirm delete comment" +msgstr "真要删除此评论吗?" + +#: skins/common/media/js/post.js:1622 skins/default/media/js/post.js:1621 +#: skins/old/media/js/post.js:1621 msgid "Please enter question title (>10 characters)" msgstr "" +#: skins/common/media/js/tag_selector.js:15 #: skins/default/media/js/tag_selector.js:15 +#: skins/old/media/js/tag_selector.js:15 msgid "Tag \"<span></span>\" matches:" msgstr "" +#: skins/common/media/js/tag_selector.js:84 #: skins/default/media/js/tag_selector.js:84 -#, perl-format +#: skins/old/media/js/tag_selector.js:84 +#, c-format msgid "and %s more, not shown..." msgstr "" -#: skins/default/media/js/user.js:129 +#: skins/common/media/js/user.js:14 +msgid "Please select at least one item" +msgstr "" + +#: skins/common/media/js/user.js:58 +msgid "Delete this notification?" +msgid_plural "Delete these notifications?" +msgstr[0] "" + +#: skins/common/media/js/user.js:125 skins/default/media/js/user.js:129 +#: skins/old/media/js/user.js:129 msgid "Please <a href=\"%(signin_url)s\">signin</a> to follow %(username)s" msgstr "" -#: skins/default/media/js/user.js:161 -#, perl-format +#: skins/common/media/js/user.js:157 skins/default/media/js/user.js:161 +#: skins/old/media/js/user.js:161 +#, c-format msgid "unfollow %s" msgstr "" -#: skins/default/media/js/user.js:164 -#, perl-format +#: skins/common/media/js/user.js:160 skins/default/media/js/user.js:164 +#: skins/old/media/js/user.js:164 +#, c-format msgid "following %s" msgstr "" -#: skins/default/media/js/user.js:170 -#, perl-format +#: skins/common/media/js/user.js:166 skins/default/media/js/user.js:170 +#: skins/old/media/js/user.js:170 +#, c-format msgid "follow %s" msgstr "" + +#: skins/common/media/js/utils.js:43 +msgid "click to close" +msgstr "点击消息框关闭" + +#: skins/common/media/js/utils.js:214 +msgid "click to edit this comment" +msgstr "" + +#: skins/common/media/js/utils.js:215 +msgid "edit" +msgstr "" + +#: skins/common/media/js/utils.js:369 +#, c-format +msgid "see questions tagged '%s'" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:30 +msgid "bold" +msgstr "粗体" + +#: skins/common/media/js/wmd/wmd.js:31 +msgid "italic" +msgstr "斜体" + +#: skins/common/media/js/wmd/wmd.js:32 +msgid "link" +msgstr "超链接" + +#: skins/common/media/js/wmd/wmd.js:33 +msgid "quote" +msgstr "引用" + +#: skins/common/media/js/wmd/wmd.js:34 +msgid "preformatted text" +msgstr "代码" + +#: skins/common/media/js/wmd/wmd.js:35 +msgid "image" +msgstr "图片" + +#: skins/common/media/js/wmd/wmd.js:36 +msgid "attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:37 +msgid "numbered list" +msgstr "数字编号列表" + +#: skins/common/media/js/wmd/wmd.js:38 +msgid "bulleted list" +msgstr "项目符号列表" + +#: skins/common/media/js/wmd/wmd.js:39 +msgid "heading" +msgstr "标题" + +#: skins/common/media/js/wmd/wmd.js:40 +msgid "horizontal bar" +msgstr "水平线" + +#: skins/common/media/js/wmd/wmd.js:41 +msgid "undo" +msgstr "撤销" + +#: skins/common/media/js/wmd/wmd.js:42 skins/common/media/js/wmd/wmd.js:1116 +msgid "redo" +msgstr "重做" + +#: skins/common/media/js/wmd/wmd.js:53 +msgid "enter image url" +msgstr "<b>输入图片地址</b></p><p>示例:<br />http://www.example.com/image.jpg \"我的截图\"" + +#: skins/common/media/js/wmd/wmd.js:54 +msgid "enter url" +msgstr "<b>输入Web地址</b></p><p>示例:<br />http://www.cnprog.com/ \"我的网站\"</p>" + +#: skins/common/media/js/wmd/wmd.js:55 +msgid "upload file attachment" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1778 +msgid "image description" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1781 +msgid "file name" +msgstr "" + +#: skins/common/media/js/wmd/wmd.js:1785 +msgid "link text" +msgstr "" diff --git a/askbot/management/commands/merge_users.py b/askbot/management/commands/merge_users.py new file mode 100644 index 00000000..4691c4b3 --- /dev/null +++ b/askbot/management/commands/merge_users.py @@ -0,0 +1,60 @@ +from django.core.management.base import CommandError, BaseCommand +from askbot.models import User + + +class Command(BaseCommand): + args = '<from_user_id> <to_user_id>' + help = 'Merge an account and all information from a <user_id> to a <user_id>, deleting the <from_user>' + + def parse_arguments(self, *arguments): + if len(arguments) != 2: + raise CommandError('Arguments are <from_user_id> to <to_user_id>') + self.from_user = User.objects.get(id = arguments[0]) + self.to_user = User.objects.get(id = arguments[1]) + + def handle(self, *arguments, **options): + self.parse_arguments(*arguments) + + for rel in User._meta.get_all_related_objects(): + try: + self.process_field(rel.model, rel.field.name) + except Exception, error: + self.stdout.write(u'Warning: %s\n' % error) + + for rel in User._meta.get_all_related_many_to_many_objects(): + try: + self.process_m2m_field(rel.model, rel.field.name) + except Exception, error: + self.stdout.write(u'Warning: %s\n' % error) + + self.to_user.reputation += self.from_user.reputation - 1 + self.to_user.gold += self.from_user.gold + self.to_user.silver += self.from_user.silver + self.to_user.bronze += self.from_user.bronze + + if self.from_user.last_seen > self.to_user.last_seen: + self.to_user.last_seen = self.from_user.last_seen + + if self.from_user.date_joined < self.to_user.date_joined: + self.to_user.date_joined = self.from_user.date_joined + + self.to_user.save() + + self.from_user.delete() + + def process_field(self, model, field_name): + """reassigns the related object to the new user""" + filter_condition = {field_name: self.from_user} + related_objects_qs = model.objects.filter(**filter_condition) + update_condition = {field_name: self.to_user} + related_objects_qs.update(**update_condition) + + def process_m2m_field(self, model, field_name): + """removes the old user from the M2M relation + and adds the new user""" + filter_condition = {field_name: self.from_user} + related_objects_qs = model.objects.filter(**filter_condition) + for obj in related_objects_qs: + m2m_field = getattr(obj, field_name) + m2m_field.remove(self.from_user) + m2m_field.add(self.to_user) diff --git a/askbot/management/commands/send_accept_answer_reminders.py b/askbot/management/commands/send_accept_answer_reminders.py new file mode 100644 index 00000000..58b07b45 --- /dev/null +++ b/askbot/management/commands/send_accept_answer_reminders.py @@ -0,0 +1,84 @@ +import datetime +from django.core.management.base import NoArgsCommand +from django.conf import settings as django_settings +from askbot import models +from askbot import const +from askbot.conf import settings as askbot_settings +from django.utils.translation import ugettext as _ +from django.utils.translation import ungettext +from askbot.utils import mail +from askbot.utils.classes import ReminderSchedule + +DEBUG_THIS_COMMAND = False + +class Command(NoArgsCommand): + def handle_noargs(self, **options): + if askbot_settings.ENABLE_ACCEPT_ANSWER_REMINDERS == False: + return + #get questions without answers, excluding closed and deleted + #order it by descending added_at date + + schedule = ReminderSchedule( + askbot_settings.DAYS_BEFORE_SENDING_ACCEPT_ANSWER_REMINDER, + askbot_settings.ACCEPT_ANSWER_REMINDER_FREQUENCY, + askbot_settings.MAX_ACCEPT_ANSWER_REMINDERS + ) + + questions = models.Question.objects.exclude( + deleted = True + ).added_between( + start = schedule.start_cutoff_date, + end = schedule.end_cutoff_date + ).filter( + answer_count__gt = 0 + ).filter( + answer_accepted = False + ).order_by('-added_at') + #for all users, excluding blocked + #for each user, select a tag filtered subset + #format the email reminder and send it + for user in models.User.objects.exclude(status = 'b'): + user_questions = questions.filter(author = user) + + final_question_list = user_questions.get_questions_needing_reminder( + activity_type = const.TYPE_ACTIVITY_ACCEPT_ANSWER_REMINDER_SENT, + user = user, + recurrence_delay = schedule.recurrence_delay + ) + #todo: rewrite using query set filter + #may be a lot more efficient + + question_count = len(final_question_list) + if question_count == 0: + continue + + #tag_summary = get_tag_summary_from_questions(final_question_list) + subject_line = _( + 'Accept the best answer for %(question_count)d of your questions' + ) % {'question_count': question_count} + + #todo - make a template for these + if question_count == 1: + reminder_phrase = _('Please accept the best answer for this question:') + else: + reminder_phrase = _('Please accept the best answer for these questions:') + body_text = '<p>' + reminder_phrase + '</p>' + body_text += '<ul>' + for question in final_question_list: + body_text += '<li><a href="%s%s?sort=latest">%s</a></li>' \ + % ( + askbot_settings.APP_URL, + question.get_absolute_url(), + question.title + ) + body_text += '</ul>' + + if DEBUG_THIS_COMMAND: + print "User: %s<br>\nSubject:%s<br>\nText: %s<br>\n" % \ + (user.email, subject_line, body_text) + else: + mail.send_mail( + subject_line = subject_line, + body_text = body_text, + recipient_list = (user.email,) + ) diff --git a/askbot/management/commands/send_email.py b/askbot/management/commands/send_email.py new file mode 100644 index 00000000..2493c51b --- /dev/null +++ b/askbot/management/commands/send_email.py @@ -0,0 +1,24 @@ +from askbot.utils.mail import send_mail +from django.core.exceptions import ValidationError +from django.core.management.base import BaseCommand, CommandError +from django.core.validators import validate_email + +class Command(BaseCommand): + args = '<recipients email>' + help = 'Sends a test email to the specified email address' + + def handle(self, *args, **options): + + if len(args) != 1: + raise CommandError('Recipients email address required') + + try: + validate_email(args[0]) + except ValidationError: + raise CommandError('%s is not a valid email address' % (args[0])) + + send_mail( + subject_line = 'Askbot Mail Test', + body_text = 'Askbot Mail Test', + recipient_list = [args[0]], + ) diff --git a/askbot/management/commands/send_email_alerts.py b/askbot/management/commands/send_email_alerts.py index 330e1cc9..c904cdde 100644 --- a/askbot/management/commands/send_email_alerts.py +++ b/askbot/management/commands/send_email_alerts.py @@ -3,8 +3,8 @@ from django.core.management.base import NoArgsCommand from django.core.urlresolvers import reverse from django.db import connection from django.db.models import Q, F -from askbot.models import User, Question, Answer, Tag, QuestionRevision -from askbot.models import AnswerRevision, Activity, EmailFeedSetting +from askbot.models import User, Question, Answer, Tag, PostRevision +from askbot.models import Activity, EmailFeedSetting from askbot.models import Comment from askbot.models.question import get_tag_summary_from_questions from django.utils.translation import ugettext as _ @@ -336,7 +336,7 @@ class Command(NoArgsCommand): #collect info on all sorts of news that happened after #the most recent emailing to the user about this question - q_rev = QuestionRevision.objects.filter( + q_rev = PostRevision.objects.question_revisions().filter( question=q, revised_at__gt=emailed_at ) @@ -359,7 +359,7 @@ class Command(NoArgsCommand): new_ans = new_ans.exclude(author=user) meta_data['new_ans'] = len(new_ans) - ans_rev = AnswerRevision.objects.filter( + ans_rev = PostRevision.objects.answer_revisions().filter( answer__question = q, answer__deleted = False, revised_at__gt = emailed_at diff --git a/askbot/management/commands/send_unanswered_question_reminders.py b/askbot/management/commands/send_unanswered_question_reminders.py index 41fa8569..778a8575 100644 --- a/askbot/management/commands/send_unanswered_question_reminders.py +++ b/askbot/management/commands/send_unanswered_question_reminders.py @@ -1,41 +1,36 @@ -import datetime from django.core.management.base import NoArgsCommand -from django.conf import settings as django_settings from askbot import models from askbot import const from askbot.conf import settings as askbot_settings -from django.utils.translation import ugettext as _ from django.utils.translation import ungettext from askbot.utils import mail +from askbot.utils.classes import ReminderSchedule from askbot.models.question import get_tag_summary_from_questions DEBUG_THIS_COMMAND = False class Command(NoArgsCommand): + """management command that sends reminders + about unanswered questions to all users + """ def handle_noargs(self, **options): if askbot_settings.ENABLE_UNANSWERED_REMINDERS == False: return #get questions without answers, excluding closed and deleted #order it by descending added_at date - wait_period = datetime.timedelta( - askbot_settings.DAYS_BEFORE_SENDING_UNANSWERED_REMINDER + schedule = ReminderSchedule( + askbot_settings.DAYS_BEFORE_SENDING_UNANSWERED_REMINDER, + askbot_settings.UNANSWERED_REMINDER_FREQUENCY, + max_reminders = askbot_settings.MAX_UNANSWERED_REMINDERS ) - start_cutoff_date = datetime.datetime.now() - wait_period - - recurrence_delay = datetime.timedelta( - askbot_settings.UNANSWERED_REMINDER_FREQUENCY - ) - max_emails = askbot_settings.MAX_UNANSWERED_REMINDERS - end_cutoff_date = start_cutoff_date - (max_emails - 1)*recurrence_delay questions = models.Question.objects.exclude( closed = True ).exclude( deleted = True - ).filter( - added_at__lt = start_cutoff_date - ).exclude( - added_at__lt = end_cutoff_date + ).added_between( + start = schedule.start_cutoff_date, + end = schedule.end_cutoff_date ).filter( answer_count = 0 ).order_by('-added_at') @@ -46,30 +41,11 @@ class Command(NoArgsCommand): user_questions = questions.exclude(author = user) user_questions = user.get_tag_filtered_questions(user_questions) - final_question_list = list() - #todo: rewrite using query set filter - #may be a lot more efficient - for question in user_questions: - activity_type = const.TYPE_ACTIVITY_UNANSWERED_REMINDER_SENT - try: - activity = models.Activity.objects.get( - user = user, - question = question, - activity_type = activity_type - ) - now = datetime.datetime.now() - if now < activity.active_at + recurrence_delay: - continue - except models.Activity.DoesNotExist: - activity = models.Activity( - user = user, - question = question, - activity_type = activity_type, - content_object = question, - ) - activity.active_at = datetime.datetime.now() - activity.save() - final_question_list.append(question) + final_question_list = user_questions.get_questions_needing_reminder( + user = user, + activity_type = const.TYPE_ACTIVITY_UNANSWERED_REMINDER_SENT, + recurrence_delay = schedule.recurrence_delay + ) question_count = len(final_question_list) if question_count == 0: diff --git a/askbot/migrations/0046_add_uniques_to_email_feed_settings.py b/askbot/migrations/0046_add_uniques_to_email_feed_settings.py new file mode 100644 index 00000000..bab16266 --- /dev/null +++ b/askbot/migrations/0046_add_uniques_to_email_feed_settings.py @@ -0,0 +1,306 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + db.create_unique(u'askbot_emailfeedsetting', ('feed_type', 'subscriber_id')) + + def backwards(self, orm): + db.add_unique(u'askbot_emailfeedsetting', ('feed_type', 'subscriber_id')) + + models = { + 'askbot.activity': { + 'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"}, + 'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True'}), + 'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}), + 'summary': ('django.db.models.fields.TextField', [], {'default': "''"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.activityauditstatus': { + 'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.anonymousanswer': { + 'Meta': {'object_name': 'AnonymousAnswer'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Question']"}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.anonymousquestion': { + 'Meta': {'object_name': 'AnonymousQuestion'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.answer': { + 'Meta': {'object_name': 'Answer', 'db_table': "u'answer'"}, + 'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['askbot.Question']"}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.answerrevision': { + 'Meta': {'ordering': "('-revision',)", 'object_name': 'AnswerRevision', 'db_table': "u'answer_revision'"}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Answer']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answerrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}) + }, + 'askbot.award': { + 'Meta': {'object_name': 'Award', 'db_table': "u'award'"}, + 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"}) + }, + 'askbot.badgedata': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'}, + 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}) + }, + 'askbot.comment': { + 'Meta': {'ordering': "('-added_at',)", 'object_name': 'Comment', 'db_table': "u'comment'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'html': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2048'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'offensive_flag_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': "orm['auth.User']"}) + }, + 'askbot.emailfeedsetting': { + 'Meta': {'object_name': 'EmailFeedSetting', 'unique_together': "(('feed_type', 'subscriber'),)"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"}) + }, + 'askbot.favoritequestion': { + 'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"}) + }, + 'askbot.markedtag': { + 'Meta': {'object_name': 'MarkedTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"}) + }, + 'askbot.question': { + 'Meta': {'object_name': 'Question', 'db_table': "u'question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'answer_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': "orm['auth.User']"}), + 'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'closed_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'favorite_questions'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}), + 'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_questions'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_active_in_questions'", 'to': "orm['auth.User']"}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'questions'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.questionrevision': { + 'Meta': {'ordering': "('-revision',)", 'object_name': 'QuestionRevision', 'db_table': "u'question_revision'"}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questionrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Question']"}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}) + }, + 'askbot.questionview': { + 'Meta': {'object_name': 'QuestionView'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Question']"}), + 'when': ('django.db.models.fields.DateTimeField', [], {}), + 'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"}) + }, + 'askbot.repute': { + 'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.tag': { + 'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) + }, + 'askbot.vote': { + 'Meta': {'unique_together': "(('content_type', 'object_id', 'user'),)", 'object_name': 'Vote', 'db_table': "u'vote'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}), + 'vote': ('django.db.models.fields.SmallIntegerField', [], {}), + 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), + 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), + 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'has_custom_avatar': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), + 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['askbot'] diff --git a/askbot/migrations/0047_auto__add_field_answerrevision_revision_type__add_field_answerrevision.py b/askbot/migrations/0047_auto__add_field_answerrevision_revision_type__add_field_answerrevision.py new file mode 100644 index 00000000..61ae0ee7 --- /dev/null +++ b/askbot/migrations/0047_auto__add_field_answerrevision_revision_type__add_field_answerrevision.py @@ -0,0 +1,352 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding field 'AnswerRevision.revision_type' + db.add_column(u'answer_revision', 'revision_type', self.gf('django.db.models.fields.SmallIntegerField')(default=0), keep_default=False) + + # Adding field 'AnswerRevision.title' + db.add_column(u'answer_revision', 'title', self.gf('django.db.models.fields.CharField')(default='', max_length=300, blank=True), keep_default=False) + + # Adding field 'AnswerRevision.tagnames' + db.add_column(u'answer_revision', 'tagnames', self.gf('django.db.models.fields.CharField')(default='', max_length=125, blank=True), keep_default=False) + + # Adding field 'AnswerRevision.is_anonymous' + db.add_column(u'answer_revision', 'is_anonymous', self.gf('django.db.models.fields.BooleanField')(default=False), keep_default=False) + + # Adding unique constraint on 'AnswerRevision', fields ['answer', 'revision'] + db.create_unique(u'answer_revision', ['answer_id', 'revision']) + + # Adding field 'QuestionRevision.revision_type' + db.add_column(u'question_revision', 'revision_type', self.gf('django.db.models.fields.SmallIntegerField')(default=0), keep_default=False) + + # Adding unique constraint on 'QuestionRevision', fields ['question', 'revision'] + db.create_unique(u'question_revision', ['question_id', 'revision']) + + + def backwards(self, orm): + + # Removing unique constraint on 'QuestionRevision', fields ['question', 'revision'] + db.delete_unique(u'question_revision', ['question_id', 'revision']) + + # Removing unique constraint on 'AnswerRevision', fields ['answer', 'revision'] + db.delete_unique(u'answer_revision', ['answer_id', 'revision']) + + # Deleting field 'AnswerRevision.revision_type' + db.delete_column(u'answer_revision', 'revision_type') + + # Deleting field 'AnswerRevision.title' + db.delete_column(u'answer_revision', 'title') + + # Deleting field 'AnswerRevision.tagnames' + db.delete_column(u'answer_revision', 'tagnames') + + # Deleting field 'AnswerRevision.is_anonymous' + db.delete_column(u'answer_revision', 'is_anonymous') + + # Deleting field 'QuestionRevision.revision_type' + db.delete_column(u'question_revision', 'revision_type') + + + models = { + 'askbot.activity': { + 'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"}, + 'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True'}), + 'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}), + 'summary': ('django.db.models.fields.TextField', [], {'default': "''"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.activityauditstatus': { + 'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.anonymousanswer': { + 'Meta': {'object_name': 'AnonymousAnswer'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Question']"}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.anonymousquestion': { + 'Meta': {'object_name': 'AnonymousQuestion'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.answer': { + 'Meta': {'object_name': 'Answer', 'db_table': "u'answer'"}, + 'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['askbot.Question']"}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.answerrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'),)", 'object_name': 'AnswerRevision', 'db_table': "u'answer_revision'"}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Answer']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answerrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.award': { + 'Meta': {'object_name': 'Award', 'db_table': "u'award'"}, + 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"}) + }, + 'askbot.badgedata': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'}, + 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}) + }, + 'askbot.comment': { + 'Meta': {'ordering': "('-added_at',)", 'object_name': 'Comment', 'db_table': "u'comment'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'html': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2048'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'offensive_flag_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': "orm['auth.User']"}) + }, + 'askbot.emailfeedsetting': { + 'Meta': {'object_name': 'EmailFeedSetting'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"}) + }, + 'askbot.favoritequestion': { + 'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"}) + }, + 'askbot.markedtag': { + 'Meta': {'object_name': 'MarkedTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"}) + }, + 'askbot.question': { + 'Meta': {'object_name': 'Question', 'db_table': "u'question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'answer_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': "orm['auth.User']"}), + 'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'closed_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'favorite_questions'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}), + 'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_questions'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_active_in_questions'", 'to': "orm['auth.User']"}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'questions'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.questionrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('question', 'revision'),)", 'object_name': 'QuestionRevision', 'db_table': "u'question_revision'"}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questionrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Question']"}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.questionview': { + 'Meta': {'object_name': 'QuestionView'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Question']"}), + 'when': ('django.db.models.fields.DateTimeField', [], {}), + 'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"}) + }, + 'askbot.repute': { + 'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.tag': { + 'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) + }, + 'askbot.vote': { + 'Meta': {'unique_together': "(('content_type', 'object_id', 'user'),)", 'object_name': 'Vote', 'db_table': "u'vote'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}), + 'vote': ('django.db.models.fields.SmallIntegerField', [], {}), + 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), + 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), + 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), + 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['askbot'] diff --git a/askbot/migrations/0048_set_proper_revision_types.py b/askbot/migrations/0048_set_proper_revision_types.py new file mode 100644 index 00000000..3b55462e --- /dev/null +++ b/askbot/migrations/0048_set_proper_revision_types.py @@ -0,0 +1,313 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import DataMigration +from django.db import models + +class Migration(DataMigration): + + def forwards(self, orm): + orm.QuestionRevision.objects.update(revision_type=1) + orm.AnswerRevision.objects.update(revision_type=2) + + + def backwards(self, orm): + "Write your backwards methods here." + + + models = { + 'askbot.activity': { + 'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"}, + 'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True'}), + 'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}), + 'summary': ('django.db.models.fields.TextField', [], {'default': "''"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.activityauditstatus': { + 'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.anonymousanswer': { + 'Meta': {'object_name': 'AnonymousAnswer'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Question']"}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.anonymousquestion': { + 'Meta': {'object_name': 'AnonymousQuestion'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.answer': { + 'Meta': {'object_name': 'Answer', 'db_table': "u'answer'"}, + 'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['askbot.Question']"}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.answerrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'),)", 'object_name': 'AnswerRevision', 'db_table': "u'answer_revision'"}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Answer']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answerrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.award': { + 'Meta': {'object_name': 'Award', 'db_table': "u'award'"}, + 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"}) + }, + 'askbot.badgedata': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'}, + 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}) + }, + 'askbot.comment': { + 'Meta': {'ordering': "('-added_at',)", 'object_name': 'Comment', 'db_table': "u'comment'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'html': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2048'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'offensive_flag_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': "orm['auth.User']"}) + }, + 'askbot.emailfeedsetting': { + 'Meta': {'object_name': 'EmailFeedSetting'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"}) + }, + 'askbot.favoritequestion': { + 'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"}) + }, + 'askbot.markedtag': { + 'Meta': {'object_name': 'MarkedTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"}) + }, + 'askbot.question': { + 'Meta': {'object_name': 'Question', 'db_table': "u'question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'answer_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': "orm['auth.User']"}), + 'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'closed_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'favorite_questions'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}), + 'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_questions'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_active_in_questions'", 'to': "orm['auth.User']"}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'questions'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.questionrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('question', 'revision'),)", 'object_name': 'QuestionRevision', 'db_table': "u'question_revision'"}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questionrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Question']"}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.questionview': { + 'Meta': {'object_name': 'QuestionView'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Question']"}), + 'when': ('django.db.models.fields.DateTimeField', [], {}), + 'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"}) + }, + 'askbot.repute': { + 'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.tag': { + 'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) + }, + 'askbot.vote': { + 'Meta': {'unique_together': "(('content_type', 'object_id', 'user'),)", 'object_name': 'Vote', 'db_table': "u'vote'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}), + 'vote': ('django.db.models.fields.SmallIntegerField', [], {}), + 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), + 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), + 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), + 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['askbot'] diff --git a/askbot/migrations/0049_add_postrevision_model.py b/askbot/migrations/0049_add_postrevision_model.py new file mode 100644 index 00000000..af2816aa --- /dev/null +++ b/askbot/migrations/0049_add_postrevision_model.py @@ -0,0 +1,357 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Adding model 'PostRevision' + db.create_table('askbot_postrevision', ( + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('revision_type', self.gf('django.db.models.fields.SmallIntegerField')()), + ('revision', self.gf('django.db.models.fields.PositiveIntegerField')()), + ('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name='postrevisions', to=orm['auth.User'])), + ('revised_at', self.gf('django.db.models.fields.DateTimeField')()), + ('summary', self.gf('django.db.models.fields.CharField')(max_length=300, blank=True)), + ('text', self.gf('django.db.models.fields.TextField')()), + ('title', self.gf('django.db.models.fields.CharField')(default='', max_length=300, blank=True)), + ('tagnames', self.gf('django.db.models.fields.CharField')(default='', max_length=125, blank=True)), + ('is_anonymous', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('answer', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['askbot.Answer'], null=True, blank=True)), + ('question', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['askbot.Question'], null=True, blank=True)), + )) + db.send_create_signal('askbot', ['PostRevision']) + + # Adding unique constraint on 'PostRevision', fields ['answer', 'revision'] + db.create_unique('askbot_postrevision', ['answer_id', 'revision']) + + # Adding unique constraint on 'PostRevision', fields ['question', 'revision'] + db.create_unique('askbot_postrevision', ['question_id', 'revision']) + + + def backwards(self, orm): + + # Removing unique constraint on 'PostRevision', fields ['question', 'revision'] + db.delete_unique('askbot_postrevision', ['question_id', 'revision']) + + # Removing unique constraint on 'PostRevision', fields ['answer', 'revision'] + db.delete_unique('askbot_postrevision', ['answer_id', 'revision']) + + # Deleting model 'PostRevision' + db.delete_table('askbot_postrevision') + + + models = { + 'askbot.activity': { + 'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"}, + 'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True'}), + 'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}), + 'summary': ('django.db.models.fields.TextField', [], {'default': "''"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.activityauditstatus': { + 'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.anonymousanswer': { + 'Meta': {'object_name': 'AnonymousAnswer'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Question']"}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.anonymousquestion': { + 'Meta': {'object_name': 'AnonymousQuestion'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.answer': { + 'Meta': {'object_name': 'Answer', 'db_table': "u'answer'"}, + 'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['askbot.Question']"}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.answerrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'),)", 'object_name': 'AnswerRevision', 'db_table': "u'answer_revision'"}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Answer']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answerrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.award': { + 'Meta': {'object_name': 'Award', 'db_table': "u'award'"}, + 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"}) + }, + 'askbot.badgedata': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'}, + 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}) + }, + 'askbot.comment': { + 'Meta': {'ordering': "('-added_at',)", 'object_name': 'Comment', 'db_table': "u'comment'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'html': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2048'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'offensive_flag_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': "orm['auth.User']"}) + }, + 'askbot.emailfeedsetting': { + 'Meta': {'object_name': 'EmailFeedSetting'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"}) + }, + 'askbot.favoritequestion': { + 'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"}) + }, + 'askbot.markedtag': { + 'Meta': {'object_name': 'MarkedTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"}) + }, + 'askbot.postrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'), ('question', 'revision'))", 'object_name': 'PostRevision'}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Answer']", 'null': 'True', 'blank': 'True'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'postrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.question': { + 'Meta': {'object_name': 'Question', 'db_table': "u'question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'answer_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': "orm['auth.User']"}), + 'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'closed_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'favorite_questions'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}), + 'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_questions'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_active_in_questions'", 'to': "orm['auth.User']"}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'questions'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.questionrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('question', 'revision'),)", 'object_name': 'QuestionRevision', 'db_table': "u'question_revision'"}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questionrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Question']"}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.questionview': { + 'Meta': {'object_name': 'QuestionView'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Question']"}), + 'when': ('django.db.models.fields.DateTimeField', [], {}), + 'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"}) + }, + 'askbot.repute': { + 'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.tag': { + 'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) + }, + 'askbot.vote': { + 'Meta': {'unique_together': "(('content_type', 'object_id', 'user'),)", 'object_name': 'Vote', 'db_table': "u'vote'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}), + 'vote': ('django.db.models.fields.SmallIntegerField', [], {}), + 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), + 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), + 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), + 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['askbot'] diff --git a/askbot/migrations/0050_move_qa_revisions_to_postrevision.py b/askbot/migrations/0050_move_qa_revisions_to_postrevision.py new file mode 100644 index 00000000..36c46551 --- /dev/null +++ b/askbot/migrations/0050_move_qa_revisions_to_postrevision.py @@ -0,0 +1,366 @@ +# encoding: utf-8 +import datetime + +from django.db import models + +from south.db import db +from south.v2 import DataMigration + +class Migration(DataMigration): + + def copy_revision(self, orm, source_revision): + question = getattr(source_revision, 'question', None) + answer = getattr(source_revision, 'answer', None) + + if bool(question) == bool(answer): # one and only one has to be set (!xor) + raise ValueError('Strange source revision! Check this manually') + + if (question and source_revision.revision_type != 1) or (answer and source_revision.revision_type != 2): + raise ValueError('Data problem! Check this manually') + + orm.PostRevision.objects.create( + question=question, + answer=answer, + + revision_type=source_revision.revision_type, + + revision=source_revision.revision, + author=source_revision.author, + revised_at=source_revision.revised_at, + summary=source_revision.summary, + text=source_revision.text, + + title=source_revision.title, + tagnames=source_revision.tagnames, + is_anonymous=source_revision.is_anonymous + ) + + # INFO: There's no need to migrate also the related Activity instances + # - it's because `revision edited` Activities point to Question&Answer instances + # ans not to their relevant revisions. (BTW this might be considered a bug) + + + def forwards(self, orm): + # Process revisions + for qr in orm.QuestionRevision.objects.all(): + self.copy_revision(orm=orm, source_revision=qr) + + for ar in orm.AnswerRevision.objects.all(): + self.copy_revision(orm=orm, source_revision=ar) + + + def backwards(self, orm): + "Write your backwards methods here." + + + models = { + 'askbot.activity': { + 'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"}, + 'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True'}), + 'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}), + 'summary': ('django.db.models.fields.TextField', [], {'default': "''"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.activityauditstatus': { + 'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.anonymousanswer': { + 'Meta': {'object_name': 'AnonymousAnswer'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Question']"}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.anonymousquestion': { + 'Meta': {'object_name': 'AnonymousQuestion'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.answer': { + 'Meta': {'object_name': 'Answer', 'db_table': "u'answer'"}, + 'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['askbot.Question']"}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.answerrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'),)", 'object_name': 'AnswerRevision', 'db_table': "u'answer_revision'"}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Answer']"}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answerrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.award': { + 'Meta': {'object_name': 'Award', 'db_table': "u'award'"}, + 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"}) + }, + 'askbot.badgedata': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'}, + 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}) + }, + 'askbot.comment': { + 'Meta': {'ordering': "('-added_at',)", 'object_name': 'Comment', 'db_table': "u'comment'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'html': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2048'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'offensive_flag_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': "orm['auth.User']"}) + }, + 'askbot.emailfeedsetting': { + 'Meta': {'object_name': 'EmailFeedSetting'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"}) + }, + 'askbot.favoritequestion': { + 'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"}) + }, + 'askbot.markedtag': { + 'Meta': {'object_name': 'MarkedTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"}) + }, + 'askbot.postrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'), ('question', 'revision'))", 'object_name': 'PostRevision'}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Answer']", 'null': 'True', 'blank': 'True'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'postrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.question': { + 'Meta': {'object_name': 'Question', 'db_table': "u'question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'answer_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': "orm['auth.User']"}), + 'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'closed_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'favorite_questions'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}), + 'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_questions'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_active_in_questions'", 'to': "orm['auth.User']"}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'questions'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.questionrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('question', 'revision'),)", 'object_name': 'QuestionRevision', 'db_table': "u'question_revision'"}, + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questionrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'revisions'", 'to': "orm['askbot.Question']"}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.questionview': { + 'Meta': {'object_name': 'QuestionView'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Question']"}), + 'when': ('django.db.models.fields.DateTimeField', [], {}), + 'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"}) + }, + 'askbot.repute': { + 'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.tag': { + 'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) + }, + 'askbot.vote': { + 'Meta': {'unique_together': "(('content_type', 'object_id', 'user'),)", 'object_name': 'Vote', 'db_table': "u'vote'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}), + 'vote': ('django.db.models.fields.SmallIntegerField', [], {}), + 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), + 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), + 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), + 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['askbot'] diff --git a/askbot/migrations/0051_proxify_qa_rev_models.py b/askbot/migrations/0051_proxify_qa_rev_models.py new file mode 100644 index 00000000..c4e37593 --- /dev/null +++ b/askbot/migrations/0051_proxify_qa_rev_models.py @@ -0,0 +1,347 @@ +# encoding: utf-8 +import datetime +from south.db import db +from south.v2 import SchemaMigration +from django.db import models + +class Migration(SchemaMigration): + + def forwards(self, orm): + + # Removing unique constraint on 'QuestionRevision', fields ['question', 'revision'] + db.delete_unique(u'question_revision', ['question_id', 'revision']) + + # Removing unique constraint on 'AnswerRevision', fields ['answer', 'revision'] + db.delete_unique(u'answer_revision', ['answer_id', 'revision']) + + # Deleting model 'AnswerRevision' + db.delete_table(u'answer_revision') + + # Deleting model 'QuestionRevision' + db.delete_table(u'question_revision') + + + def backwards(self, orm): + + # Adding model 'AnswerRevision' + db.create_table(u'answer_revision', ( + ('text', self.gf('django.db.models.fields.TextField')()), + ('revised_at', self.gf('django.db.models.fields.DateTimeField')()), + ('revision_type', self.gf('django.db.models.fields.SmallIntegerField')()), + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('is_anonymous', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name='answerrevisions', to=orm['auth.User'])), + ('tagnames', self.gf('django.db.models.fields.CharField')(default='', max_length=125, blank=True)), + ('title', self.gf('django.db.models.fields.CharField')(default='', max_length=300, blank=True)), + ('summary', self.gf('django.db.models.fields.CharField')(max_length=300, blank=True)), + ('answer', self.gf('django.db.models.fields.related.ForeignKey')(related_name='revisions', to=orm['askbot.Answer'])), + ('revision', self.gf('django.db.models.fields.PositiveIntegerField')()), + )) + db.send_create_signal('askbot', ['AnswerRevision']) + + # Adding unique constraint on 'AnswerRevision', fields ['answer', 'revision'] + db.create_unique(u'answer_revision', ['answer_id', 'revision']) + + # Adding model 'QuestionRevision' + db.create_table(u'question_revision', ( + ('text', self.gf('django.db.models.fields.TextField')()), + ('revised_at', self.gf('django.db.models.fields.DateTimeField')()), + ('revision_type', self.gf('django.db.models.fields.SmallIntegerField')()), + ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)), + ('is_anonymous', self.gf('django.db.models.fields.BooleanField')(default=False)), + ('author', self.gf('django.db.models.fields.related.ForeignKey')(related_name='questionrevisions', to=orm['auth.User'])), + ('tagnames', self.gf('django.db.models.fields.CharField')(default='', max_length=125, blank=True)), + ('title', self.gf('django.db.models.fields.CharField')(default='', max_length=300, blank=True)), + ('question', self.gf('django.db.models.fields.related.ForeignKey')(related_name='revisions', to=orm['askbot.Question'])), + ('summary', self.gf('django.db.models.fields.CharField')(max_length=300, blank=True)), + ('revision', self.gf('django.db.models.fields.PositiveIntegerField')()), + )) + db.send_create_signal('askbot', ['QuestionRevision']) + + # Adding unique constraint on 'QuestionRevision', fields ['question', 'revision'] + db.create_unique(u'question_revision', ['question_id', 'revision']) + + + models = { + 'askbot.activity': { + 'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"}, + 'active_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'activity_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_auditted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True'}), + 'receiving_users': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'received_activity'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'recipients': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'incoming_activity'", 'symmetrical': 'False', 'through': "orm['askbot.ActivityAuditStatus']", 'to': "orm['auth.User']"}), + 'summary': ('django.db.models.fields.TextField', [], {'default': "''"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.activityauditstatus': { + 'Meta': {'unique_together': "(('user', 'activity'),)", 'object_name': 'ActivityAuditStatus'}, + 'activity': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Activity']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'status': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.anonymousanswer': { + 'Meta': {'object_name': 'AnonymousAnswer'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'anonymous_answers'", 'to': "orm['askbot.Question']"}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.anonymousquestion': { + 'Meta': {'object_name': 'AnonymousQuestion'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ip_addr': ('django.db.models.fields.IPAddressField', [], {'max_length': '15'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'session_key': ('django.db.models.fields.CharField', [], {'max_length': '40'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}) + }, + 'askbot.answer': { + 'Meta': {'object_name': 'Answer', 'db_table': "u'answer'"}, + 'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'accepted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_answers'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': "orm['askbot.Question']"}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.award': { + 'Meta': {'object_name': 'Award', 'db_table': "u'award'"}, + 'awarded_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'badge': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_badge'", 'to': "orm['askbot.BadgeData']"}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'notified': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'award_user'", 'to': "orm['auth.User']"}) + }, + 'askbot.badgedata': { + 'Meta': {'ordering': "('slug',)", 'object_name': 'BadgeData'}, + 'awarded_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'awarded_to': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'badges'", 'symmetrical': 'False', 'through': "orm['askbot.Award']", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}) + }, + 'askbot.comment': { + 'Meta': {'ordering': "('-added_at',)", 'object_name': 'Comment', 'db_table': "u'comment'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '2048'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'html': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2048'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'offensive_flag_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'comments'", 'to': "orm['auth.User']"}) + }, + 'askbot.emailfeedsetting': { + 'Meta': {'object_name': 'EmailFeedSetting'}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), + 'feed_type': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'frequency': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '8'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reported_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True'}), + 'subscriber': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'notification_subscriptions'", 'to': "orm['auth.User']"}) + }, + 'askbot.favoritequestion': { + 'Meta': {'object_name': 'FavoriteQuestion', 'db_table': "u'favorite_question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_favorite_questions'", 'to': "orm['auth.User']"}) + }, + 'askbot.markedtag': { + 'Meta': {'object_name': 'MarkedTag'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'reason': ('django.db.models.fields.CharField', [], {'max_length': '16'}), + 'tag': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'user_selections'", 'to': "orm['askbot.Tag']"}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'tag_selections'", 'to': "orm['auth.User']"}) + }, + 'askbot.postrevision': { + 'Meta': {'ordering': "('-revision',)", 'unique_together': "(('answer', 'revision'), ('question', 'revision'))", 'object_name': 'PostRevision'}, + 'answer': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Answer']", 'null': 'True', 'blank': 'True'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'postrevisions'", 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'revised_at': ('django.db.models.fields.DateTimeField', [], {}), + 'revision': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'revision_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '125', 'blank': 'True'}), + 'text': ('django.db.models.fields.TextField', [], {}), + 'title': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '300', 'blank': 'True'}) + }, + 'askbot.question': { + 'Meta': {'object_name': 'Question', 'db_table': "u'question'"}, + 'added_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'answer_accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'answer_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'author': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': "orm['auth.User']"}), + 'close_reason': ('django.db.models.fields.SmallIntegerField', [], {'null': 'True', 'blank': 'True'}), + 'closed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'closed_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'closed_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'closed_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'comment_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'favorited_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'favorite_questions'", 'symmetrical': 'False', 'through': "orm['askbot.FavoriteQuestion']", 'to': "orm['auth.User']"}), + 'favourite_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'followed_by': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'followed_questions'", 'symmetrical': 'False', 'to': "orm['auth.User']"}), + 'html': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'is_anonymous': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_activity_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_activity_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'last_active_in_questions'", 'to': "orm['auth.User']"}), + 'last_edited_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'last_edited_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'last_edited_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'locked_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'locked_questions'", 'null': 'True', 'to': "orm['auth.User']"}), + 'offensive_flag_count': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'score': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'summary': ('django.db.models.fields.CharField', [], {'max_length': '180'}), + 'tagnames': ('django.db.models.fields.CharField', [], {'max_length': '125'}), + 'tags': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'questions'", 'symmetrical': 'False', 'to': "orm['askbot.Tag']"}), + 'text': ('django.db.models.fields.TextField', [], {'null': 'True'}), + 'title': ('django.db.models.fields.CharField', [], {'max_length': '300'}), + 'view_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}), + 'vote_down_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'vote_up_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'wiki': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'wikified_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}) + }, + 'askbot.questionview': { + 'Meta': {'object_name': 'QuestionView'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'viewed'", 'to': "orm['askbot.Question']"}), + 'when': ('django.db.models.fields.DateTimeField', [], {}), + 'who': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'question_views'", 'to': "orm['auth.User']"}) + }, + 'askbot.repute': { + 'Meta': {'object_name': 'Repute', 'db_table': "u'repute'"}, + 'comment': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'negative': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'positive': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'question': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['askbot.Question']", 'null': 'True', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.IntegerField', [], {'default': '1'}), + 'reputation_type': ('django.db.models.fields.SmallIntegerField', [], {}), + 'reputed_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}) + }, + 'askbot.tag': { + 'Meta': {'ordering': "('-used_count', 'name')", 'object_name': 'Tag', 'db_table': "u'tag'"}, + 'created_by': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'created_tags'", 'to': "orm['auth.User']"}), + 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'deleted_at': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}), + 'deleted_by': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'deleted_tags'", 'null': 'True', 'to': "orm['auth.User']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), + 'used_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}) + }, + 'askbot.vote': { + 'Meta': {'unique_together': "(('content_type', 'object_id', 'user'),)", 'object_name': 'Vote', 'db_table': "u'vote'"}, + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}), + 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'votes'", 'to': "orm['auth.User']"}), + 'vote': ('django.db.models.fields.SmallIntegerField', [], {}), + 'voted_at': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}) + }, + 'auth.group': { + 'Meta': {'object_name': 'Group'}, + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}), + 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}) + }, + 'auth.permission': { + 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'}, + 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) + }, + 'auth.user': { + 'Meta': {'object_name': 'User'}, + 'about': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'avatar_type': ('django.db.models.fields.CharField', [], {'default': "'n'", 'max_length': '1'}), + 'bronze': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'consecutive_days_visit_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'country': ('django_countries.fields.CountryField', [], {'max_length': '2', 'blank': 'True'}), + 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'date_of_birth': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}), + 'display_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}), + 'email_isvalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'email_key': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}), + 'email_tag_filter_strategy': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'}), + 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'gold': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'gravatar': ('django.db.models.fields.CharField', [], {'max_length': '32'}), + 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'ignored_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'interesting_tags': ('django.db.models.fields.TextField', [], {'blank': 'True'}), + 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), + 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}), + 'last_seen': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), + 'location': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'new_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}), + 'questions_per_page': ('django.db.models.fields.SmallIntegerField', [], {'default': '10'}), + 'real_name': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}), + 'reputation': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), + 'seen_response_count': ('django.db.models.fields.IntegerField', [], {'default': '0'}), + 'show_country': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), + 'silver': ('django.db.models.fields.SmallIntegerField', [], {'default': '0'}), + 'status': ('django.db.models.fields.CharField', [], {'default': "'w'", 'max_length': '2'}), + 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}), + 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}), + 'website': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}) + }, + 'contenttypes.contenttype': { + 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"}, + 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), + 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}), + 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}) + } + } + + complete_apps = ['askbot'] diff --git a/askbot/models/__init__.py b/askbot/models/__init__.py index 5d1cd95d..6a609923 100644 --- a/askbot/models/__init__.py +++ b/askbot/models/__init__.py @@ -19,13 +19,14 @@ import askbot from askbot import exceptions as askbot_exceptions from askbot import const from askbot.conf import settings as askbot_settings -from askbot.models.question import Question, QuestionRevision +from askbot.models.question import Question from askbot.models.question import QuestionView, AnonymousQuestion from askbot.models.question import FavoriteQuestion -from askbot.models.answer import Answer, AnonymousAnswer, AnswerRevision +from askbot.models.answer import Answer, AnonymousAnswer from askbot.models.tag import Tag, MarkedTag from askbot.models.meta import Vote, Comment from askbot.models.user import EmailFeedSetting, ActivityAuditStatus, Activity +from askbot.models.post import PostRevision from askbot.models import signals from askbot.models.badges import award_badges_signal, get_badge, init_badges #from user import AuthKeyUserAssociation @@ -2656,15 +2657,15 @@ __all__ = [ 'signals', 'Question', - 'QuestionRevision', 'QuestionView', 'FavoriteQuestion', 'AnonymousQuestion', 'Answer', - 'AnswerRevision', 'AnonymousAnswer', + 'PostRevision', + 'Tag', 'Comment', 'Vote', diff --git a/askbot/models/answer.py b/askbot/models/answer.py index b9b28f89..cd9699ec 100644 --- a/askbot/models/answer.py +++ b/askbot/models/answer.py @@ -7,7 +7,7 @@ from django.core import exceptions as django_exceptions from django.conf import settings from askbot import exceptions from askbot.models.base import AnonymousContent, DeletableContent -from askbot.models.base import ContentRevision +from askbot.models.post import PostRevision from askbot.models.base import parse_post_text, parse_and_save_post from askbot.models import content from askbot import const @@ -217,7 +217,7 @@ class Answer(content.Content, DeletableContent): comment = const.POST_STATUS['default_version'] else: comment = 'No.%s Revision' % rev_no - return AnswerRevision.objects.create( + return PostRevision.objects.create_answer_revision( answer=self, author=author, revised_at=revised_at, @@ -300,32 +300,6 @@ class Answer(content.Content, DeletableContent): return self.html -class AnswerRevision(ContentRevision): - """A revision of an Answer.""" - answer = models.ForeignKey('Answer', related_name='revisions') - - def get_absolute_url(self): - return reverse('answer_revisions', kwargs={'id':self.answer.id}) - - def get_question_title(self): - return self.answer.question.title - - def as_html(self, **kwargs): - markdowner = markup.get_parser() - return sanitize_html(markdowner.convert(self.text)) - - class Meta(ContentRevision.Meta): - db_table = u'answer_revision' - ordering = ('-revision',) - - def save(self, **kwargs): - """Looks up the next available revision number if not set.""" - if not self.revision: - self.revision = AnswerRevision.objects.filter( - answer=self.answer).values_list('revision', - flat=True)[0] + 1 - super(AnswerRevision, self).save(**kwargs) - class AnonymousAnswer(AnonymousContent): question = models.ForeignKey('Question', related_name='anonymous_answers') diff --git a/askbot/models/base.py b/askbot/models/base.py index b456bca8..5ac2ac7a 100644 --- a/askbot/models/base.py +++ b/askbot/models/base.py @@ -1,17 +1,20 @@ import datetime import cgi +import logging + from django.db import models from django.utils.html import strip_tags from django.contrib.auth.models import User from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.sitemaps import ping_google + #todo: maybe merge askbot.utils.markup and forum.utils.html from askbot.utils import markup from askbot.utils.diff import textDiff as htmldiff from askbot.utils.html import sanitize_html from django.utils import html -import logging + #todo: following methods belong to a future common post class def parse_post_text(post): @@ -215,30 +218,6 @@ class DeletableContent(models.Model): app_label = 'askbot' -class ContentRevision(models.Model): - """ - Base class for QuestionRevision and AnswerRevision - """ - revision = models.PositiveIntegerField() - author = models.ForeignKey(User, related_name='%(class)ss') - revised_at = models.DateTimeField() - summary = models.CharField(max_length=300, blank=True) - text = models.TextField() - - class Meta: - abstract = True - app_label = 'askbot' - - def as_html(self, **kwargs): - """should return html representation of - the revision - """ - raise NotImplementedError() - - def get_snipet(self): - pass - - class AnonymousContent(models.Model): """ Base class for AnonymousQuestion and AnonymousAnswer diff --git a/askbot/models/meta.py b/askbot/models/meta.py index 9022a7ec..cbec7d33 100644 --- a/askbot/models/meta.py +++ b/askbot/models/meta.py @@ -49,6 +49,10 @@ class Vote(base.MetaContent, base.UserContent): def __unicode__(self): return '[%s] voted at %s: %s' %(self.user, self.voted_at, self.vote) + def __int__(self): + """1 if upvote -1 if downvote""" + return self.vote + def is_upvote(self): return self.vote == self.VOTE_UP diff --git a/askbot/models/post.py b/askbot/models/post.py new file mode 100644 index 00000000..16352228 --- /dev/null +++ b/askbot/models/post.py @@ -0,0 +1,130 @@ +from django.db import models +from django.core.exceptions import ValidationError + +from askbot.utils import markup +from askbot.utils.html import sanitize_html + +#class Post(models.Model): +# pass + +class PostRevisionManager(models.Manager): + # TODO: Make sure this manager /with the "blocked" .create() method/ is used also as a `related` manager: + # - https://docs.djangoproject.com/en/1.3/topics/db/managers/#controlling-automatic-manager-types + # - use_for_related_fields + def create(self, *kargs, **kwargs): + raise NotImplementedError # Prevent accidental creation of PostRevision instance without `revision_type` set + + + def create_question_revision(self, *kargs, **kwargs): + kwargs['revision_type'] = self.model.QUESTION_REVISION + return super(PostRevisionManager, self).create(*kargs, **kwargs) + + def create_answer_revision(self, *kargs, **kwargs): + kwargs['revision_type'] = self.model.ANSWER_REVISION + return super(PostRevisionManager, self).create(*kargs, **kwargs) + + def question_revisions(self): + return self.filter(revision_type=self.model.QUESTION_REVISION) + + def answer_revisions(self): + return self.filter(revision_type=self.model.ANSWER_REVISION) + + +class PostRevision(models.Model): + QUESTION_REVISION_TEMPLATE_NO_TAGS = ( + '<h3>%(title)s</h3>\n' + '<div class="text">%(html)s</div>\n' + ) + + QUESTION_REVISION = 1 + ANSWER_REVISION = 2 + REVISION_TYPE_CHOICES = ( + (QUESTION_REVISION, 'question'), + (ANSWER_REVISION, 'answer'), + ) + REVISION_TYPE_CHOICES_DICT = dict(REVISION_TYPE_CHOICES) + + answer = models.ForeignKey('askbot.Answer', related_name='revisions', null=True, blank=True) + question = models.ForeignKey('askbot.Question', related_name='revisions', null=True, blank=True) + + revision_type = models.SmallIntegerField(choices=REVISION_TYPE_CHOICES) + + revision = models.PositiveIntegerField() + author = models.ForeignKey('auth.User', related_name='%(class)ss') + revised_at = models.DateTimeField() + summary = models.CharField(max_length=300, blank=True) + text = models.TextField() + + # Question-specific fields + title = models.CharField(max_length=300, blank=True, default='') + tagnames = models.CharField(max_length=125, blank=True, default='') + is_anonymous = models.BooleanField(default=False) + + objects = PostRevisionManager() + + class Meta: + # INFO: This `unique_together` constraint might be problematic for databases in which + # 2+ NULLs cannot be stored in an UNIQUE column. + # As far as I know MySQL, PostgreSQL and SQLite allow that so we're on the safe side. + unique_together = (('answer', 'revision'), ('question', 'revision')) + ordering = ('-revision',) + app_label = 'askbot' + + def revision_type_str(self): + return self.REVISION_TYPE_CHOICES_DICT[self.revision_type] + + def __unicode__(self): + return u'%s - revision %s of %s' % (self.revision_type_str(), self.revision, self.title) + + def parent(self): + if self.is_question_revision(): + return self.question + elif self.is_answer_revision(): + return self.answer + + def clean(self): + "Internal cleaning method, called from self.save() by self.full_clean()" + if bool(self.question) == bool(self.answer): # one and only one has to be set (!xor) + raise ValidationError('One (and only one) of question/answer fields has to be set.') + if (self.question and not self.is_question_revision()) or (self.answer and not self.is_answer_revision()): + raise ValidationError('Revision_type doesn`t match values in question/answer fields.') + + def save(self, **kwargs): + # Determine the revision number, if not set + if not self.revision: + # TODO: Maybe use Max() aggregation? Or `revisions.count() + 1` + self.revision = self.parent().revisions.values_list('revision', flat=True)[0] + 1 + + # Make sure that everything is ok, in particular that `revision_type` and `revision` are set to valid values + self.full_clean() + + super(PostRevision, self).save(**kwargs) + + def is_question_revision(self): + return self.revision_type == self.QUESTION_REVISION + + def is_answer_revision(self): + return self.revision_type == self.ANSWER_REVISION + + @models.permalink + def get_absolute_url(self): + if self.is_question_revision(): + return 'question_revisions', (self.question.id,), {} + elif self.is_answer_revision(): + return 'answer_revisions', (), {'id':self.answer.id} + + def get_question_title(self): + #INFO: ack-grepping shows that it's only used for Questions, so there's no code for Answers + return self.question.title + + def as_html(self, **kwargs): + markdowner = markup.get_parser() + sanitized_html = sanitize_html(markdowner.convert(self.text)) + + if self.is_question_revision(): + return self.QUESTION_REVISION_TEMPLATE_NO_TAGS % { + 'title': self.title, + 'html': sanitized_html + } + elif self.is_answer_revision(): + return sanitized_html diff --git a/askbot/models/question.py b/askbot/models/question.py index 0ddb5b08..7f38bd5c 100644 --- a/askbot/models/question.py +++ b/askbot/models/question.py @@ -15,7 +15,7 @@ from askbot import exceptions from askbot.models.tag import Tag from askbot.models.base import AnonymousContent from askbot.models.base import DeletableContent -from askbot.models.base import ContentRevision +from askbot.models.post import PostRevision from askbot.models.base import BaseQuerySetManager from askbot.models.base import parse_post_text from askbot.models.base import parse_and_save_post @@ -24,8 +24,6 @@ from askbot.models import signals from askbot import const from askbot.utils.lists import LazyList from askbot.utils.slug import slugify -from askbot.utils import markup -from askbot.utils.html import sanitize_html from askbot.utils import mysql #todo: too bad keys are duplicated see const sort methods @@ -360,6 +358,48 @@ class QuestionQuerySet(models.query.QuerySet): meta_data['ignored_tag_names'].extend(tagnames.split()) return qs, meta_data, related_tags + def added_between(self, start, end): + """questions added between ``start`` and ``end`` timestamps""" + return self.filter( + added_at__gt = start + ).exclude( + added_at__gt = end + ) + + def get_questions_needing_reminder(self, + user = None, + activity_type = None, + recurrence_delay = None): + """returns list of questions that need a reminder, + corresponding the given ``activity_type`` + ``user`` - is the user receiving the reminder + ``recurrence_delay`` - interval between sending the + reminders about the same question + """ + from askbot.models import Activity#avoid circular import + question_list = list() + for question in self: + try: + activity = Activity.objects.get( + user = user, + question = question, + activity_type = activity_type + ) + now = datetime.datetime.now() + if now < activity.active_at + recurrence_delay: + continue + except Activity.DoesNotExist: + activity = Activity( + user = user, + question = question, + activity_type = activity_type, + content_object = question, + ) + activity.active_at = datetime.datetime.now() + activity.save() + question_list.append(question) + return question_list + #todo: this function is similar to get_response_receivers #profile this function against the other one #todo: maybe this must be a query set method, not manager method @@ -718,7 +758,7 @@ class Question(content.Content, DeletableContent): # Create a new revision latest_revision = self.get_latest_revision() - QuestionRevision.objects.create( + PostRevision.objects.create_question_revision( question = self, title = latest_revision.title, author = retagged_by, @@ -796,7 +836,7 @@ class Question(content.Content, DeletableContent): else: comment = 'No.%s Revision' % rev_no - return QuestionRevision.objects.create( + return PostRevision.objects.create_question_revision( question = self, revision = rev_no, title = self.title, @@ -965,54 +1005,6 @@ class FavoriteQuestion(models.Model): def __unicode__(self): return '[%s] favorited at %s' %(self.user, self.added_at) -QUESTION_REVISION_TEMPLATE = ('<h3>%(title)s</h3>\n' - '<div class="text">%(html)s</div>\n' - '<div class="tags">%(tags)s</div>') -QUESTION_REVISION_TEMPLATE_NO_TAGS = ('<h3>%(title)s</h3>\n' - '<div class="text">%(html)s</div>\n') -class QuestionRevision(ContentRevision): - """A revision of a Question.""" - question = models.ForeignKey(Question, related_name='revisions') - title = models.CharField(max_length=300) - tagnames = models.CharField(max_length=125) - is_anonymous = models.BooleanField(default=False) - - class Meta(ContentRevision.Meta): - db_table = u'question_revision' - ordering = ('-revision',) - - def get_question_title(self): - return self.question.title - - def get_absolute_url(self): - #print 'in QuestionRevision.get_absolute_url()' - return reverse('question_revisions', args=[self.question.id]) - - def as_html(self, include_tags=True): - markdowner = markup.get_parser() - if include_tags: - return QUESTION_REVISION_TEMPLATE % { - 'title': self.title, - 'html': sanitize_html(markdowner.convert(self.text)), - 'tags': ' '.join(['<a class="post-tag">%s</a>' % tag - for tag in self.tagnames.split(' ')]), - } - else: - return QUESTION_REVISION_TEMPLATE_NO_TAGS % { - 'title': self.title, - 'html': sanitize_html(markdowner.convert(self.text)) - } - - def save(self, **kwargs): - """Looks up the next available revision number.""" - if not self.revision: - self.revision = QuestionRevision.objects.filter( - question=self.question).values_list('revision', - flat=True)[0] + 1 - super(QuestionRevision, self).save(**kwargs) - - def __unicode__(self): - return u'revision %s of %s' % (self.revision, self.title) class AnonymousQuestion(AnonymousContent): """question that was asked before logging in diff --git a/askbot/models/user.py b/askbot/models/user.py index ab5b43fb..6a0e3d4d 100644 --- a/askbot/models/user.py +++ b/askbot/models/user.py @@ -286,6 +286,10 @@ class EmailFeedSetting(models.Model): reported_at = models.DateTimeField(null=True) objects = EmailFeedSettingManager() + class Meta: + #added to make account merges work properly + unique_together = ('subscriber', 'feed_type') + def __str__(self): if self.reported_at is None: reported_at = "'not yet'" diff --git a/askbot/search/sphinx/sphinx.conf b/askbot/search/sphinx/sphinx.conf index 7ff44604..cdf0f004 100644 --- a/askbot/search/sphinx/sphinx.conf +++ b/askbot/search/sphinx/sphinx.conf @@ -25,12 +25,13 @@ source src_askbot INNER JOIN \ ( \ SELECT MAX(id) as id, question_id \ - FROM question_revision \ + FROM askbot_postrevision \ + WHERE revision_type = 1 \ GROUP BY question_id \ ) \ AS mqr \ ON q.id=mqr.question_id \ - INNER JOIN question_revision AS qr ON qr.id=mqr.id \ + INNER JOIN askbot_postrevision AS qr ON qr.id=mqr.id \ LEFT JOIN \ ( \ SELECT GROUP_CONCAT(answer_current.text SEPARATOR '. ') AS text, \ @@ -42,12 +43,13 @@ source src_askbot INNER JOIN \ ( \ SELECT MAX(id) as id, answer_id \ - FROM answer_revision \ + FROM askbot_postrevision \ + WHERE revision_type = 2 \ GROUP BY answer_id \ ) \ AS mar \ ON mar.answer_id = a.id \ - INNER JOIN answer_revision AS ar ON ar.id=mar.id \ + INNER JOIN askbot_postrevision AS ar ON ar.id=mar.id \ WHERE a.deleted=0 \ ) \ AS answer_current \ diff --git a/askbot/setup_templates/settings.py b/askbot/setup_templates/settings.py index 20598463..e8adc2ce 100644 --- a/askbot/setup_templates/settings.py +++ b/askbot/setup_templates/settings.py @@ -40,7 +40,7 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' #go to the site's live settings and enable the feature #"Email settings" -> "allow asking by email" # -# WARNING: command post_emailed_questions DELETES all +# WARNING: command post_emailed_questions DELETES all # emails from the mailbox each time # do not use your personal mail box here!!! # @@ -78,7 +78,7 @@ PROJECT_ROOT = os.path.dirname(__file__) ADMIN_MEDIA_PREFIX = '/admin/media/' # Make up some unique string, and don't share it with anybody. -SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s ' +SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s ' # List of callables that know how to import templates from various sources. TEMPLATE_LOADERS = ( @@ -117,7 +117,7 @@ ROOT_URLCONF = os.path.basename(os.path.dirname(__file__)) + '.urls' #UPLOAD SETTINGS FILE_UPLOAD_TEMP_DIR = os.path.join( - os.path.dirname(__file__), + os.path.dirname(__file__), 'tmp' ).replace('\\','/') @@ -177,6 +177,7 @@ CACHE_BACKEND = 'locmem://' #needed for django-keyedcache CACHE_TIMEOUT = 6000 CACHE_PREFIX = 'askbot' #make this unique +CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True #If you use memcache you may want to uncomment the following line to enable memcached based sessions #SESSION_ENGINE = 'django.contrib.sessions.backends.cache_db' @@ -200,6 +201,7 @@ logging.basicConfig( # ASKBOT_URL = 'forum/' # ASKBOT_URL = '' #no leading slash, default = '' empty string +ASKBOT_TRANSLATE_URL = True #translate specific URLs _ = lambda v:v #fake translation function for the login url LOGIN_URL = '/%s%s%s' % (ASKBOT_URL,_('account/'),_('signin/')) #note - it is important that upload dir url is NOT translated!!! @@ -210,11 +212,11 @@ ASKBOT_USE_STACKEXCHANGE_URLS = False #mimic url scheme of stackexchange ASKBOT_CLOSED_FORUM_MODE = False #Celery Settings -BROKER_BACKEND = "djkombu.transport.DatabaseTransport" +BROKER_TRANSPORT = "djkombu.transport.DatabaseTransport" CELERY_ALWAYS_EAGER = True import djcelery djcelery.setup_loader() -CSRF_COOKIE_NAME = 'askbot_scrf' +CSRF_COOKIE_NAME = 'askbot_csrf' CSRF_COOKIE_DOMAIN = ''#enter domain name here - e.g. example.com diff --git a/askbot/setup_templates/settings.py.mustache b/askbot/setup_templates/settings.py.mustache new file mode 100644 index 00000000..081f37fa --- /dev/null +++ b/askbot/setup_templates/settings.py.mustache @@ -0,0 +1,220 @@ +## Django settings for ASKBOT enabled project. +import os.path +import logging +import sys +import askbot + +#this line is added so that we can import pre-packaged askbot dependencies +sys.path.append(os.path.join(os.path.dirname(askbot.__file__), 'deps')) + +DEBUG = False#set to True to enable debugging +TEMPLATE_DEBUG = False#keep false when debugging jinja2 templates +INTERNAL_IPS = ('127.0.0.1',) + +ADMINS = ( + ('Your Name', 'your_email@domain.com'), +) + +MANAGERS = ADMINS + +DATABASE_ENGINE = 'postgresql_psycopg2' # only postgres (>8.3) and mysql are supported so far others have not been tested yet +DATABASE_NAME = '{{database_name}}' # Or path to database file if using sqlite3. +DATABASE_USER = '{{database_user}}' # Not used with sqlite3. +DATABASE_PASSWORD = '{{database_password}}' # Not used with sqlite3. +DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. +DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. + +#outgoing mail server settings +SERVER_EMAIL = '' +DEFAULT_FROM_EMAIL = '' +EMAIL_HOST_USER = '' +EMAIL_HOST_PASSWORD = '' +EMAIL_SUBJECT_PREFIX = '' +EMAIL_HOST='' +EMAIL_PORT='' +EMAIL_USE_TLS=False +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' + +#incoming mail settings +#after filling out these settings - please +#go to the site's live settings and enable the feature +#"Email settings" -> "allow asking by email" +# +# WARNING: command post_emailed_questions DELETES all +# emails from the mailbox each time +# do not use your personal mail box here!!! +# +IMAP_HOST = '' +IMAP_HOST_USER = '' +IMAP_HOST_PASSWORD = '' +IMAP_PORT = '' +IMAP_USE_TLS = False + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# On Unix systems, a value of None will cause Django to use the same +# timezone as the operating system. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'America/Chicago' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True +LANGUAGE_CODE = 'en' + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +ASKBOT_FILE_UPLOAD_DIR = os.path.join(os.path.dirname(__file__), 'askbot', 'upfiles') + +PROJECT_ROOT = os.path.dirname(__file__) + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/admin/media/' + +# Make up some unique string, and don't share it with anybody. +SECRET_KEY = 'sdljdfjkldsflsdjkhsjkldgjlsdgfs s ' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', + #below is askbot stuff for this tuple + 'askbot.skins.loaders.filesystem_load_template_source', + #'django.template.loaders.eggs.load_template_source', +) + + +MIDDLEWARE_CLASSES = ( + #'django.middleware.gzip.GZipMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + #'django.middleware.cache.UpdateCacheMiddleware', + 'django.middleware.common.CommonMiddleware', + #'django.middleware.cache.FetchFromCacheMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + #'django.middleware.sqlprint.SqlPrintingMiddleware', + + #below is askbot stuff for this tuple + 'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware', + 'askbot.middleware.pagesize.QuestionsPageSizeMiddleware', + 'askbot.middleware.cancel.CancelActionMiddleware', + 'django.middleware.transaction.TransactionMiddleware', + #'debug_toolbar.middleware.DebugToolbarMiddleware', + 'askbot.middleware.view_log.ViewLogMiddleware', + 'askbot.middleware.spaceless.SpacelessMiddleware', +) + + +ROOT_URLCONF = os.path.basename(os.path.dirname(__file__)) + '.urls' + + +#UPLOAD SETTINGS +FILE_UPLOAD_TEMP_DIR = os.path.join( + os.path.dirname(__file__), + 'tmp' + ).replace('\\','/') + +FILE_UPLOAD_HANDLERS = ( + 'django.core.files.uploadhandler.MemoryFileUploadHandler', + 'django.core.files.uploadhandler.TemporaryFileUploadHandler', +) +ASKBOT_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff') +ASKBOT_MAX_UPLOAD_FILE_SIZE = 1024 * 1024 #result in bytes +DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' + + +#TEMPLATE_DIRS = (,) #template have no effect in askbot, use the variable below +#ASKBOT_EXTRA_SKIN_DIR = #path to your private skin collection +#take a look here http://askbot.org/en/question/207/ + +TEMPLATE_CONTEXT_PROCESSORS = ( + 'django.core.context_processors.request', + 'askbot.context.application_settings', + #'django.core.context_processors.i18n', + 'askbot.user_messages.context_processors.user_messages',#must be before auth + 'django.core.context_processors.auth', #this is required for admin + 'django.core.context_processors.csrf', #necessary for csrf protection +) + + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + + #all of these are needed for the askbot + 'django.contrib.admin', + 'django.contrib.humanize', + 'django.contrib.sitemaps', + #'debug_toolbar', + 'askbot', + 'askbot.deps.django_authopenid', + #'askbot.importers.stackexchange', #se loader + 'south', + 'askbot.deps.livesettings', + 'keyedcache', + 'robots', + 'django_countries', + 'djcelery', + 'djkombu', + 'followit', + #'avatar',#experimental use git clone git://github.com/ericflo/django-avatar.git$ + #requires setting of MEDIA_ROOT and MEDIA_URL +) + + +#setup memcached for production use! +#see http://docs.djangoproject.com/en/1.1/topics/cache/ for details +CACHE_BACKEND = 'locmem://' +#needed for django-keyedcache +CACHE_TIMEOUT = 6000 +CACHE_PREFIX = 'askbot' #make this unique +CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True +#If you use memcache you may want to uncomment the following line to enable memcached based sessions +#SESSION_ENGINE = 'django.contrib.sessions.backends.cache_db' + +AUTHENTICATION_BACKENDS = ( + 'django.contrib.auth.backends.ModelBackend', + 'askbot.deps.django_authopenid.backends.AuthBackend', +) + +#logging settings +LOG_FILENAME = 'askbot.log' +logging.basicConfig( + filename=os.path.join(os.path.dirname(__file__), 'log', LOG_FILENAME), + level=logging.CRITICAL, + format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s', +) + +########################### +# +# this will allow running your forum with url like http://site.com/forum +# +# ASKBOT_URL = 'forum/' +# +ASKBOT_URL = '' #no leading slash, default = '' empty string +ASKBOT_TRANSLATE_URL = True #translate specific URLs +_ = lambda v:v #fake translation function for the login url +LOGIN_URL = '/%s%s%s' % (ASKBOT_URL,_('account/'),_('signin/')) +#note - it is important that upload dir url is NOT translated!!! +#also, this url must not have the leading slash +ASKBOT_UPLOADED_FILES_URL = '%s%s' % (ASKBOT_URL, 'upfiles/') +ALLOW_UNICODE_SLUGS = False +ASKBOT_USE_STACKEXCHANGE_URLS = False #mimic url scheme of stackexchange + +#Celery Settings +BROKER_TRANSPORT = "djkombu.transport.DatabaseTransport" +CELERY_ALWAYS_EAGER = True + +import djcelery +djcelery.setup_loader() +DOMAIN_NAME = '{{domain_name}}' + +CSRF_COOKIE_NAME = '{{domain_name}}_csrf' +CSRF_COOKIE_DOMAIN = DOMAIN_NAME diff --git a/askbot/skins/common/media/jquery-openid/jquery.openid.js b/askbot/skins/common/media/jquery-openid/jquery.openid.js index 7ba9adce..1d972b55 100644 --- a/askbot/skins/common/media/jquery-openid/jquery.openid.js +++ b/askbot/skins/common/media/jquery-openid/jquery.openid.js @@ -70,13 +70,7 @@ $.fn.authenticator = function() { ).find('button'); remove_button.click( function(){ - var message = $.i18n._( - 'Are you sure you want to remove ' + - 'your {provider} login?' - ).replace( - '{provider}', - provider_name - ); + var message = interpolate(gettext('Are you sure you want to remove your %s login?'), [provider_name]); if (confirm(message)){ $.ajax({ type: 'POST', @@ -93,10 +87,10 @@ $.fn.authenticator = function() { $('#ab-existing-login-methods').remove(); $('#ab-show-login-methods').remove(); $('h1').html( - $.i18n._("Please add one or more login methods.") + gettext("Please add one or more login methods.") ); $('#login-intro').html( - $.i18n._("You don\'t have a method to log in right now, please add one or more by clicking any of the icons below.") + gettext("You don\'t have a method to log in right now, please add one or more by clicking any of the icons below.") ); existing_login_methods = null; } @@ -138,7 +132,7 @@ $.fn.authenticator = function() { if (newpass.val() !== newpass_retyped.val()){ newpass_retyped.after( '<span class="error">' + - $.i18n._('passwords do not match') + + gettext('passwords do not match') + '</span>' ); newpass.val('').focus(); @@ -165,7 +159,7 @@ $.fn.authenticator = function() { else { enabler = $( '<p id="login-list-enabler"><a href="#">' + - $.i18n._('Show/change current login methods') + + gettext('Show/change current login methods') + '</a></p>'); setup_event_handlers( enabler, @@ -225,18 +219,15 @@ $.fn.authenticator = function() { reset_form(); var token_name = extra_token_name[provider_name] if (userIsAuthenticated){ - var heading_text = $.i18n._( - 'Please enter your {token_name}, then proceed' - ); $('#openid-heading').html( - heading_text.replace('{token_name}', token_name) + interpolate(gettext('Please enter your %s, then proceed'), [token_name]) ); - var button_text = $.i18n._('Connect your {provider_name} account to {site}'); - button_text = button_text.replace( - '{provider_name}', provider_name - ).replace( - '{site}', siteName - ); + var button_text = gettext('Connect your %(provider_name)s account to %(site)s'); + var data = { + provider_name: provider_name, + site: siteName + } + button_text = interpolate(button_text, data, true); openid_submit_button.val(button_text); } else { @@ -318,24 +309,22 @@ $.fn.authenticator = function() { if (userIsAuthenticated === true){ var password_button = $('input[name=change_password]'); var submit_action = submit_change_password; - if (existing_login_methods && existing_login_methods[provider_name]){ - var change_pw_heading = 'Change your {provider} password'; - var password_heading_text = $.i18n._(change_pw_heading); - var password_button_text = $.i18n._('Change password'); - } - else { - var create_pw_heading = 'Create a password for {provider}'; - var password_heading_text = $.i18n._(create_pw_heading); - var password_button_text = $.i18n._('Create password'); - } if (provider_name === 'local'){ var provider_cleaned_name = siteName; } else { var provider_cleaned_name = provider_name; } + if (existing_login_methods && existing_login_methods[provider_name]){ + var password_heading_text = interpolate(gettext('Change your %s password'), [provider_cleaned_name]) + var password_button_text = gettext('Change password') + } + else { + var password_heading_text = interpolate(gettext('Create a password for %s'), [provider_cleaned_name]) + var password_button_text = gettext('Create password') + } $('#password-heading').html( - password_heading_text.replace('{provider}', provider_cleaned_name) + password_heading_text ) password_button.val(password_button_text); password_action_input.val('change_password'); @@ -348,7 +337,7 @@ $.fn.authenticator = function() { var submit_action = submit_login_with_password; var create_pw_link = $('a.create-password-account') if (create_pw_link.length > 0){ - create_pw_link.html($.i18n._('Create a password-protected account')); + create_pw_link.html(gettext('Create a password-protected account')); var url = create_pw_link.attr('href'); if (url.indexOf('?') !== -1){ url = url.replace(/\?.*$/,'?login_provider=' + provider_name); diff --git a/askbot/skins/common/media/jquery-openid/openid.css b/askbot/skins/common/media/jquery-openid/openid.css index da541e45..e44e5478 100644 --- a/askbot/skins/common/media/jquery-openid/openid.css +++ b/askbot/skins/common/media/jquery-openid/openid.css @@ -1,4 +1,4 @@ -div#login-icons {margin:10px 0 0 0;padding:0} +div#login-icons {margin:10px 0 0 0;padding:10px;border:#eee 1px solid;} ul.login-icons {width: 450px; margin:0;padding:0;text-align:left; list-style-type:none; display:block;} ul.login-icons li {display:inline;} ul.large input {height: 40px; width: 90px;border:1px solid #ccc;margin:0 5px 5px 0;} diff --git a/askbot/skins/common/media/js/live_search.js b/askbot/skins/common/media/js/live_search.js index a02060f8..73e1453a 100644 --- a/askbot/skins/common/media/js/live_search.js +++ b/askbot/skins/common/media/js/live_search.js @@ -338,6 +338,12 @@ var liveSearch = function(){ } }; + var change_rss_url = function(feed_url){ + if(feed_url){ + $("#ContentLeft a.rss:first").attr("href", feed_url); + } + } + var remove_search_tag = function(tag_name){ $.ajax({ url: askbot['urls']['questions'], @@ -414,6 +420,7 @@ var liveSearch = function(){ render_faces(data['faces']); render_related_tags(data['related_tags']); render_relevance_sort_tab(); + change_rss_url(data['feed_url']); set_active_sort_tab(sortMethod); query.focus(); diff --git a/askbot/skins/common/media/js/post.js b/askbot/skins/common/media/js/post.js index 5cf9cb4f..6202347e 100644 --- a/askbot/skins/common/media/js/post.js +++ b/askbot/skins/common/media/js/post.js @@ -25,11 +25,12 @@ var lanai = }; function appendLoader(element) { + loading = gettext('loading...') element.append('<img class="ajax-loader" ' + 'src="' + mediaUrl("media/images/indicator.gif") + '" title="' + - $.i18n._('loading...') + + loading + '" alt="' + - $.i18n._('loading...') + + loading + '" />'); } @@ -121,20 +122,21 @@ var CPValidator = function(){ }; }, getQuestionFormMessages: function(){ + //todo: here use pluralization function instead of replace return { tags: { - required: " " + $.i18n._('tags cannot be empty'), + required: " " + gettext('tags cannot be empty'), maxlength: askbot['messages']['tagLimits'], limit_tag_count: askbot['messages']['maxTagsPerPost'], limit_tag_length: askbot['messages']['maxTagLength'] }, text: { - required: " " + $.i18n._('content cannot be empty'), - minlength: $.i18n._('content minchars').replace('{0}', 10) + required: " " + gettext('content cannot be empty'), + minlength: gettext('content minchars').replace('{0}', 10) }, title: { - required: " " + $.i18n._('please enter title'), - minlength: $.i18n._('title minchars').replace('{0}', 10) + required: " " + gettext('please enter title'), + minlength: gettext('title minchars').replace('{0}', 10) } }; } @@ -277,24 +279,24 @@ var Vote = function(){ var questionSubscribeUpdates = 'question-subscribe-updates'; var questionSubscribeSidebar= 'question-subscribe-sidebar'; - var acceptAnonymousMessage = $.i18n._('insufficient privilege'); - var acceptOwnAnswerMessage = $.i18n._('cannot pick own answer as best'); + var acceptAnonymousMessage = gettext('insufficient privilege'); + var acceptOwnAnswerMessage = gettext('cannot pick own answer as best'); var pleaseLogin = " <a href='" + askbot['urls']['user_signin'] + "?next=" + askbot['urls']['question_url_template'] + "'>" - + $.i18n._('please login') + "</a>"; + + gettext('please login') + "</a>"; - var favoriteAnonymousMessage = $.i18n._('anonymous users cannot follow questions') + pleaseLogin; - var subscribeAnonymousMessage = $.i18n._('anonymous users cannot subscribe to questions') + pleaseLogin; - var voteAnonymousMessage = $.i18n._('anonymous users cannot vote') + pleaseLogin; + var favoriteAnonymousMessage = gettext('anonymous users cannot follow questions') + pleaseLogin; + var subscribeAnonymousMessage = gettext('anonymous users cannot subscribe to questions') + pleaseLogin; + var voteAnonymousMessage = gettext('anonymous users cannot vote') + pleaseLogin; //there were a couple of more messages... - var offensiveConfirmation = $.i18n._('please confirm offensive'); - var offensiveAnonymousMessage = $.i18n._('anonymous users cannot flag offensive posts') + pleaseLogin; - var removeConfirmation = $.i18n._('confirm delete'); - var removeAnonymousMessage = $.i18n._('anonymous users cannot delete/undelete') + pleaseLogin; - var recoveredMessage = $.i18n._('post recovered'); - var deletedMessage = $.i18n._('post deleted'); + var offensiveConfirmation = gettext('please confirm offensive'); + var offensiveAnonymousMessage = gettext('anonymous users cannot flag offensive posts') + pleaseLogin; + var removeConfirmation = gettext('confirm delete'); + var removeAnonymousMessage = gettext('anonymous users cannot delete/undelete') + pleaseLogin; + var recoveredMessage = gettext('post recovered'); + var deletedMessage = gettext('post deleted'); var VoteType = { acceptAnswer : 0, @@ -321,27 +323,27 @@ var Vote = function(){ return $(favoriteNumber); }; var getQuestionVoteUpButton = function(){ - var questionVoteUpButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixQuestionVoteup +']'; + var questionVoteUpButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixQuestionVoteup +']'; return $(questionVoteUpButton); }; var getQuestionVoteDownButton = function(){ - var questionVoteDownButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixQuestionVotedown +']'; + var questionVoteDownButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixQuestionVotedown +']'; return $(questionVoteDownButton); }; var getAnswerVoteUpButtons = function(){ - var answerVoteUpButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAnswerVoteup +']'; + var answerVoteUpButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixAnswerVoteup +']'; return $(answerVoteUpButton); }; var getAnswerVoteDownButtons = function(){ - var answerVoteDownButton = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAnswerVotedown +']'; + var answerVoteDownButton = 'div.'+ voteContainerId +' div[id^='+ imgIdPrefixAnswerVotedown +']'; return $(answerVoteDownButton); }; var getAnswerVoteUpButton = function(id){ - var answerVoteUpButton = 'div.'+ voteContainerId +' img[id='+ imgIdPrefixAnswerVoteup + id + ']'; + var answerVoteUpButton = 'div.'+ voteContainerId +' div[id='+ imgIdPrefixAnswerVoteup + id + ']'; return $(answerVoteUpButton); }; var getAnswerVoteDownButton = function(id){ - var answerVoteDownButton = 'div.'+ voteContainerId +' img[id='+ imgIdPrefixAnswerVotedown + id + ']'; + var answerVoteDownButton = 'div.'+ voteContainerId +' div[id='+ imgIdPrefixAnswerVotedown + id + ']'; return $(answerVoteDownButton); }; @@ -374,19 +376,21 @@ var Vote = function(){ }; var setVoteImage = function(voteType, undo, object){ - var flag = undo ? "" : "-on"; - var arrow = (voteType == VoteType.questionUpVote || voteType == VoteType.answerUpVote) ? "up" : "down"; - object.attr("src", mediaUrl("media/images/vote-arrow-"+ arrow + flag +".png")); + var flag = undo ? false : true; + if (object.hasClass("on")) { + object.removeClass("on"); + }else{ + object.addClass("on"); + } - // if undo voting, then undo the pair of arrows. if(undo){ if(voteType == VoteType.questionUpVote || voteType == VoteType.questionDownVote){ - $(getQuestionVoteUpButton()).attr("src", mediaUrl("media/images/vote-arrow-up.png")); - $(getQuestionVoteDownButton()).attr("src", mediaUrl("media/images/vote-arrow-down.png")); + $(getQuestionVoteUpButton()).removeClass("on"); + $(getQuestionVoteDownButton()).removeClass("on"); } else{ - $(getAnswerVoteUpButton(postId)).attr("src", mediaUrl("media/images/vote-arrow-up.png")); - $(getAnswerVoteDownButton(postId)).attr("src", mediaUrl("media/images/vote-arrow-down.png")); + $(getAnswerVoteUpButton(postId)).removeClass("on"); + $(getAnswerVoteDownButton(postId)).removeClass("on"); } } }; @@ -398,10 +402,12 @@ var Vote = function(){ var bindEvents = function(){ // accept answers - var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']'; - $(acceptedButtons).unbind('click').click(function(event){ - Vote.accept($(event.target)); - }); + if(questionAuthorId == currentUserId){ + var acceptedButtons = 'div.'+ voteContainerId +' img[id^='+ imgIdPrefixAccept +']'; + $(acceptedButtons).unbind('click').click(function(event){ + Vote.accept($(event.target)); + }); + } // set favorite question var favoriteButton = getFavoriteButton(); favoriteButton.unbind('click').click(function(event){ @@ -606,12 +612,12 @@ var Vote = function(){ if (data.success == "1"){ if (removeActionType == 'delete'){ postNode.addClass('deleted'); - postRemoveLink.innerHTML = $.i18n._('undelete'); + postRemoveLink.innerHTML = gettext('undelete'); showMessage(object, deletedMessage); } else if (removeActionType == 'undelete') { postNode.removeClass('deleted'); - postRemoveLink.innerHTML = $.i18n._('delete'); + postRemoveLink.innerHTML = gettext('delete'); showMessage(object, recoveredMessage); } } @@ -836,7 +842,7 @@ var questionRetagger = function(){ setupInputEventHandlers(tagInput); //button = $('<input type="submit" />'); - //button.val($.i18n._('save tags')); + //button.val(gettext('save tags')); //div.append(button); //setupButtonEventHandlers(button); div.validate({//copy-paste from utils.js @@ -850,7 +856,7 @@ var questionRetagger = function(){ }, messages: { tags: { - required: $.i18n._('tags cannot be empty'), + required: gettext('tags cannot be empty'), maxlength: askbot['messages']['tagLimits'], limit_tag_count: askbot['messages']['maxTagsPerPost'], limit_tag_length: askbot['messages']['maxTagLength'] @@ -948,10 +954,10 @@ EditCommentForm.prototype.attachTo = function(comment, mode){ comment.getElement().hide(); this._comment_widget.hideButton(); if (this._type == 'add'){ - this._submit_btn.html($.i18n._('add comment')); + this._submit_btn.html(gettext('add comment')); } else { - this._submit_btn.html($.i18n._('save comment')); + this._submit_btn.html(gettext('save comment')); } this.getElement().show(); this.focus(); @@ -973,19 +979,22 @@ EditCommentForm.prototype.getCounterUpdater = function(){ length2 = Math.round(0.9*maxCommentLength); } + //todo: + //1) use class instead of color - move color def to css + //2) use pluralization and interpolation instead of string replacement var color = 'maroon'; if (length === 0){ - var feedback = $.i18n._('title minchars').replace('{0}', 10); + var feedback = gettext('title minchars').replace('{0}', 10); } else if (length < 10){ - var feedback = $.i18n._('enter more characters').replace('{0}', 10 - length); + var feedback = gettext('enter more characters').replace('{0}', 10 - length); } else { - color = length > length2 ? "#f00" : length > length1 ? "#f60" : "#999"; - var feedback = $.i18n._('{0} characters left') - .replace('{0}', maxCommentLength - length); + color = length > length2 ? "#f00" : length > length1 ? "#f60" : "#999" + chars = maxCommentLength - length + var feedback = interpolate(gettext('%s characters left'), [chars]) } - counter.html(feedback).css('color', color); + counter.html(feedback).css('color', color) }; return handler; }; @@ -1054,7 +1063,7 @@ EditCommentForm.prototype.createDom = function(){ this._submit_btn = $('<button class="submit small"></button>'); div.append(this._submit_btn); this._cancel_btn = $('<button class="submit small"></button>'); - this._cancel_btn.html($.i18n._('cancel')); + this._cancel_btn.html(gettext('cancel')); div.append(this._cancel_btn); setupButtonEventHandlers(this._submit_btn, this.getSaveHandler()); @@ -1097,7 +1106,7 @@ EditCommentForm.prototype.reset = function(){ EditCommentForm.prototype.confirmAbandon = function(){ this.focus(true); this._textarea.addClass('highlight'); - var answer = confirm($.i18n._('confirm abandon comment')); + var answer = confirm(gettext('confirm abandon comment')); this._textarea.removeClass('highlight'); return answer; }; @@ -1171,7 +1180,7 @@ var Comment = function(widget, data){ this._data = data || {}; this._blank = true;//set to false by setContent this._element = null; - this._delete_prompt = $.i18n._('delete this comment'); + this._delete_prompt = gettext('delete this comment'); if (data && data['is_deletable']){ this._deletable = data['is_deletable']; } @@ -1375,7 +1384,7 @@ Comment.prototype.getDeleteHandler = function(){ var comment = this; var del_icon = this._delete_icon; return function(){ - if (confirm($.i18n._('confirm delete comment'))){ + if (confirm(gettext('confirm delete comment'))){ comment.getElement().hide(); $.ajax({ type: 'POST', @@ -1568,7 +1577,7 @@ var socialSharing = function(){ url = url.replace('{TEXT}', TEXT); var params = SERVICE_DATA[service_name]['params']; if(!window.open(url, "sharing", params)){ - window.location.href=share_url; + window.location.href=url; } } }); diff --git a/askbot/skins/common/media/js/user.js b/askbot/skins/common/media/js/user.js index 438a3273..d80adad6 100644 --- a/askbot/skins/common/media/js/user.js +++ b/askbot/skins/common/media/js/user.js @@ -11,7 +11,7 @@ $(document).ready(function(){ }); if (id_list.length === 0){ - alert($.i18n._('Please select at least one item')); + alert(gettext('Please select at least one item')); } return {id_list: id_list, elements: elements}; @@ -55,12 +55,8 @@ $(document).ready(function(){ return; } if (action_type == 'delete'){ - if (data['id_list'].length === 1){ - var msg = $.i18n._('Delete this notification?') - } - else { - var msg = $.i18n._('Delete these notifications?') - } + msg = ngettext('Delete this notification?', + 'Delete these notifications?', data['id_list'].length); if (confirm(msg) === false){ return; } diff --git a/askbot/skins/common/media/js/utils.js b/askbot/skins/common/media/js/utils.js index 2b2579ab..0afd03a7 100644 --- a/askbot/skins/common/media/js/utils.js +++ b/askbot/skins/common/media/js/utils.js @@ -40,7 +40,7 @@ var getUniqueWords = function(value){ var showMessage = function(element, msg, where) { var div = $('<div class="vote-notification"><h3>' + msg + '</h3>(' + - $.i18n._('click to close') + ')</div>'); + gettext('click to close') + ')</div>'); div.click(function(event) { $(".vote-notification").fadeOut("fast", function() { $(this).remove(); }); @@ -211,8 +211,8 @@ EditLink.prototype.createDom = function(){ EditLink.prototype.decorate = function(element){ this._element = element; - this._element.attr('title', $.i18n._('click to edit this comment')); - this._element.html($.i18n._('edit')); + this._element.attr('title', gettext('click to edit this comment')); + this._element.html(gettext('edit')); this.setHandlerInternal(); }; @@ -366,12 +366,7 @@ Tag.prototype.createDom = function(){ this._inner_element.attr('rel', 'tag'); if (this._title === null){ this.setTitle( - $.i18n._( - "see questions tagged '{tag}'" - ).replace( - '{tag}', - this.getName() - ) + interpolate(gettext("see questions tagged '%s'"), [this.getName()]) ); } this._inner_element.attr('title', this._title); diff --git a/askbot/skins/common/media/js/wmd/wmd.css b/askbot/skins/common/media/js/wmd/wmd.css index 15182541..3ad615e7 100644 --- a/askbot/skins/common/media/js/wmd/wmd.css +++ b/askbot/skins/common/media/js/wmd/wmd.css @@ -15,7 +15,7 @@ border-top:#cce6ec 3px solid; border-right:#cce6ec 3px solid; float:left; - width:100%; + width:730px; } #wmd-input diff --git a/askbot/skins/common/media/js/wmd/wmd.js b/askbot/skins/common/media/js/wmd/wmd.js index bc3b5a0c..1d524361 100644 --- a/askbot/skins/common/media/js/wmd/wmd.js +++ b/askbot/skins/common/media/js/wmd/wmd.js @@ -27,19 +27,19 @@ Attacklab.wmdBase = function(){ global.isOpera = /opera/.test(nav.userAgent.toLowerCase()); global.isKonqueror = /konqueror/.test(nav.userAgent.toLowerCase()); - var toolbar_strong_label = $.i18n._('bold') + " <strong> Ctrl-B"; - var toolbar_emphasis_label = $.i18n._('italic') + " <em> Ctrl-I"; - var toolbar_hyperlink_label = $.i18n._('link') + " <a> Ctrl-L"; - var toolbar_blockquote_label = $.i18n._('quote') + " <blockquote> Ctrl-."; - var toolbar_code_label = $.i18n._('preformatted text') + " <pre><code> Ctrl-K"; - var toolbar_image_label = $.i18n._('image') + " <img> Ctrl-G"; - var toolbar_attachment_label = $.i18n._('attachment') + " Ctrl-F"; - var toolbar_numbered_label = $.i18n._('numbered list') + " <ol> Ctrl-O"; - var toolbar_bulleted_label = $.i18n._('bulleted list') + " <ul> Ctrl-U"; - var toolbar_heading_label = $.i18n._('heading') + " <h1>/<h2> Ctrl-H"; - var toolbar_horizontal_label = $.i18n._('horizontal bar') + " <hr> Ctrl-R"; - var toolbar_undo_label = $.i18n._('undo') + " Ctrl-Z"; - var toolbar_redo_label = $.i18n._('redo') + " Ctrl-Y"; + var toolbar_strong_label = gettext('bold') + " <strong> Ctrl-B"; + var toolbar_emphasis_label = gettext('italic') + " <em> Ctrl-I"; + var toolbar_hyperlink_label = gettext('link') + " <a> Ctrl-L"; + var toolbar_blockquote_label = gettext('quote') + " <blockquote> Ctrl-."; + var toolbar_code_label = gettext('preformatted text') + " <pre><code> Ctrl-K"; + var toolbar_image_label = gettext('image') + " <img> Ctrl-G"; + var toolbar_attachment_label = gettext('attachment') + " Ctrl-F"; + var toolbar_numbered_label = gettext('numbered list') + " <ol> Ctrl-O"; + var toolbar_bulleted_label = gettext('bulleted list') + " <ul> Ctrl-U"; + var toolbar_heading_label = gettext('heading') + " <h1>/<h2> Ctrl-H"; + var toolbar_horizontal_label = gettext('horizontal bar') + " <hr> Ctrl-R"; + var toolbar_undo_label = gettext('undo') + " Ctrl-Z"; + var toolbar_redo_label = gettext('redo') + " Ctrl-Y"; // ------------------------------------------------------------------- // YOUR CHANGES GO HERE @@ -50,9 +50,9 @@ Attacklab.wmdBase = function(){ // The text that appears on the upper part of the dialog box when // entering links. - var imageDialogText = "<p style='margin-top: 0px'>" + $.i18n._('enter image url') + '</p>'; - var linkDialogText = "<p style='margin-top: 0px'>" + $.i18n._('enter url') + '</p>'; - var fileDialogText = "<p>" + $.i18n._('upload file attachment') + '</p>'; + var imageDialogText = "<p style='margin-top: 0px'>" + gettext('enter image url') + '</p>'; + var linkDialogText = "<p style='margin-top: 0px'>" + gettext('enter url') + '</p>'; + var fileDialogText = "<p>" + gettext('upload file attachment') + '</p>'; // The default text that appears in the dialog input box when entering // links. var imageDefaultText = "http://"; @@ -244,7 +244,7 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){ text = text.replace('http://https://', 'https://'); text = text.replace('http://ftp://', 'ftp://'); - if (text.indexOf('http://') === -1 && text.indexOf('ftp://') === -1) { + if (text.indexOf('http://') === -1 && text.indexOf('ftp://') === -1 && text.indexOf('https://') === -1) { if (dialogType == 'link'){ //add http only to urls text = 'http://' + text; @@ -1113,7 +1113,7 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){ } else { // mac and other non-Windows platforms - redoButton.title = $.i18n._('redo') + " - Ctrl+Shift+Z"; + redoButton.title = gettext('redo') + " - Ctrl+Shift+Z"; } redoButton.XShift = "-240px"; redoButton.execute = function(manager){ @@ -1775,14 +1775,14 @@ util.prompt = function(text, defaultInputText, makeLinkMarkdown, dialogType){ if (!chunk.selection) { if (itemType == 'image') { - chunk.selection = $.i18n._("image description"); + chunk.selection = gettext("image description"); } else if (itemType == 'file'){ - chunk.selection = localUploadFileName || $.i18n._("file name"); + chunk.selection = localUploadFileName || gettext("file name"); localUploadFileName = null; } else { - chunk.selection = $.i18n._("link text"); + chunk.selection = gettext("link text"); } } } diff --git a/askbot/skins/common/templates/authopenid/logout.html b/askbot/skins/common/templates/authopenid/logout.html index a07b78d1..1ac6705c 100644 --- a/askbot/skins/common/templates/authopenid/logout.html +++ b/askbot/skins/common/templates/authopenid/logout.html @@ -2,7 +2,7 @@ <!-- template logout.html --> {% block title %}{% spaceless %}{% trans %}Logout{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans %}You have successfully logged out{% endtrans %}</h1> +<h1 class="section-title">{% trans %}You have successfully logged out{% endtrans %}</h1> {% if have_federated_login_methods %} <p>{% trans %}However, you still may be logged in to your OpenID provider. Please logout of your provider if you wish to do so.{% endtrans %}</p> {% if settings.FACEBOOK_KEY and settings.FACEBOOK_SECRET %} diff --git a/askbot/skins/common/templates/authopenid/signin.html b/askbot/skins/common/templates/authopenid/signin.html index f10d0cd0..4c894aa3 100644 --- a/askbot/skins/common/templates/authopenid/signin.html +++ b/askbot/skins/common/templates/authopenid/signin.html @@ -7,7 +7,7 @@ {% endblock %}
{% block content %}
{% if have_buttons or view_subtype == 'email_sent' %}
- <h1>{{page_title}}</h1>
+ <h1 class="section-title">{{page_title}}</h1>
{% endif %}
{% if answer %}
<div class="message">
@@ -212,7 +212,7 @@ {% block sidebar %}
{% if have_buttons %}
- <div class="boxC">
+ <div class="box">
<h2>{% trans %}Why use OpenID?{% endtrans %}</h2>
<ul>
<li>
diff --git a/askbot/skins/common/templates/question/answer_controls.html b/askbot/skins/common/templates/question/answer_controls.html index 4309e10c..4d26ffb9 100644 --- a/askbot/skins/common/templates/question/answer_controls.html +++ b/askbot/skins/common/templates/question/answer_controls.html @@ -1,18 +1,18 @@ {% set pipe=joiner('<span class="sep">|</span>') %} <span class="linksopt">{{ pipe() }} - <a + <a class="permant-link" href="{{ answer.get_absolute_url() }}" title="{% trans %}answer permanent link{% endtrans %}"> {% trans %}permanent link{% endtrans %} </a> </span> {% if request.user|can_edit_post(answer) %}{{ pipe() }} -<span class="action-link"><a href="{% url edit_answer answer.id %}">{% trans %}edit{% endtrans %}</a></span> +<span class="action-link"><a class="question-edit" href="{% url edit_answer answer.id %}">{% trans %}edit{% endtrans %}</a></span> {% endif %} {% if request.user|can_flag_offensive(answer) %}{{ pipe() }} <span id="answer-offensive-flag-{{ answer.id }}" class="offensive-flag" title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}"> - <a>{% trans %}flag offensive{% endtrans %}</a> + <a class="question-flag">{% trans %}flag offensive{% endtrans %}</a> {% if request.user|can_see_offensive_flags(answer) %} <span class="darkred">{% if answer.offensive_flag_count > 0 %}({{ answer.offensive_flag_count }}){% endif %}</span> {% endif %} @@ -21,7 +21,7 @@ {% if request.user|can_delete_post(answer) %}{{ pipe() }} {% spaceless %} <span class="action-link"> - <a id="answer-delete-link-{{answer.id}}"> + <a class="question-delete" id="answer-delete-link-{{answer.id}}"> {% if answer.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> </span> {% endspaceless %} diff --git a/askbot/skins/common/templates/question/answer_vote_buttons.html b/askbot/skins/common/templates/question/answer_vote_buttons.html index 807f3ab8..0ff57e4b 100644 --- a/askbot/skins/common/templates/question/answer_vote_buttons.html +++ b/askbot/skins/common/templates/question/answer_vote_buttons.html @@ -1,31 +1,17 @@ -<img id="answer-img-upvote-{{ answer.id }}" class="answer-img-upvote" - {% if user_answer_votes[answer.id] == 1 %} - src="{{'/images/vote-arrow-up-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-up.png'|media}}" - {% endif %} - alt="{% trans %}i like this answer (click again to cancel){% endtrans %}" - title="{% trans %}i like this answer (click again to cancel){% endtrans %}"/> -<div id="answer-vote-number-{{ answer.id }}" class="vote-number" title="{% trans %}current number of votes{% endtrans %}"> - {{ answer.score }} -</div> -<img id="answer-img-downvote-{{ answer.id }}" class="answer-img-downvote" - {% if user_answer_votes[answer.id] == -1 %} - src="{{'/images/vote-arrow-down-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-down.png'|media}}" - {% endif %} - alt="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" /> -{% if request.user == question.author or request.user.is_moderator() or request.user.is_superuser() %} +{{ macros.post_vote_buttons( + post = answer, + visitor_vote = user_answer_votes[answer.id] + ) +}} +{% if request.user == question.author or (request.user.is_authenticated() and (request.user.is_moderator() or request.user.is_administrator())) %} <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" {% if answer.accepted %} src="{{'/images/vote-accepted-on.png'|media}}" {% else %} src="{{'/images/vote-accepted.png'|media}}" {% endif %} - alt="{% trans %}mark this answer as favorite (click again to undo){% endtrans %}" - title="{% trans %}mark this answer as favorite (click again to undo){% endtrans %}" /> + alt="{% trans %}mark this answer as correct (click again to undo){% endtrans %}" + title="{% trans %}mark this answer as correct (click again to undo){% endtrans %}" /> {% else %} {% if answer.accepted %} <img id="answer-img-accept-{{ answer.id }}" class="answer-img-accept" @@ -36,5 +22,6 @@ {% endif %} alt="{% trans question_author=question.author.username %}{{question_author}} has selected this answer as correct{% endtrans %}" title="{% trans questsion_author=question.author.username%}{{question_author}} has selected this answer as correct{% endtrans %}" + /> {% endif %} {% endif %} diff --git a/askbot/skins/common/templates/question/closed_question_info.html b/askbot/skins/common/templates/question/closed_question_info.html index db4b10ee..73ff4e47 100644 --- a/askbot/skins/common/templates/question/closed_question_info.html +++ b/askbot/skins/common/templates/question/closed_question_info.html @@ -1,5 +1,5 @@ <div class="question-status"> -<h3>{% trans close_reason=question.get_close_reason_display() %}The question has been closed for the following reason "{{ close_reason }}" by{% endtrans %} -<a href="{{ question.closed_by.get_profile_url() }}">{{ question.closed_by.username }}</a> +<h3>{% trans close_reason=question.get_close_reason_display() %}The question has been closed for the following reason <b>"{{ close_reason }}"</b> <i>by{% endtrans %} +<a href="{{ question.closed_by.get_profile_url() }}">{{ question.closed_by.username }}</a> </i><br> {% trans closed_at=question.closed_at %}close date {{closed_at}}{% endtrans %}</h3> </div> diff --git a/askbot/skins/common/templates/question/question_controls.html b/askbot/skins/common/templates/question/question_controls.html index 257ce870..9de54526 100644 --- a/askbot/skins/common/templates/question/question_controls.html +++ b/askbot/skins/common/templates/question/question_controls.html @@ -1,31 +1,31 @@ {% set pipe=joiner('<span class="sep">|</span>') %} {% if request.user|can_edit_post(question) %}{{ pipe() }} - <a href="{% url edit_question question.id %}">{% trans %}edit{% endtrans %}</a> + <a class="question-edit" href="{% url edit_question question.id %}">{% trans %}edit{% endtrans %}</a> {% endif %} {% if request.user|can_retag_question(question) %}{{ pipe() }} - <a id="retag" href="{% url retag_question question.id %}">{% trans %}retag{% endtrans %}</a> + <a id="retag" class="question-retag"href="{% url retag_question question.id %}">{% trans %}retag{% endtrans %}</a> <script type="text/javascript"> var retagUrl = "{% url retag_question question.id %}"; </script> {% endif %} {% if question.closed %} {% if request.user|can_reopen_question(question) %}{{ pipe() }} - <a href="{% url reopen question.id %}">{% trans %}reopen{% endtrans %}</a> + <a class="question-close" href="{% url reopen question.id %}">{% trans %}reopen{% endtrans %}</a> {% endif %} {% else %} {% if request.user|can_close_question(question) %}{{ pipe() }} - <a href="{% url close question.id %}">{% trans %}close{% endtrans %}</a> + <a class="question-close" href="{% url close question.id %}">{% trans %}close{% endtrans %}</a> {% endif %} {% endif %} {% if request.user|can_flag_offensive(question) %}{{ pipe() }} <span id="question-offensive-flag-{{ question.id }}" class="offensive-flag" title="{% trans %}report as offensive (i.e containing spam, advertising, malicious text, etc.){% endtrans %}"> - <a>{% trans %}flag offensive{% endtrans %}</a> + <a class="question-flag">{% trans %}flag offensive{% endtrans %}</a> {% if request.user|can_see_offensive_flags(question) %} <span class="darkred">{% if question.offensive_flag_count > 0 %}({{ question.offensive_flag_count }}){% endif %}</span> {% endif %} </span> {% endif %} {% if request.user|can_delete_post(question) %}{{ pipe() }} - <a id="question-delete-link-{{question.id}}">{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> + <a id="question-delete-link-{{question.id}}" class="question-delete">{% if question.deleted %}{% trans %}undelete{% endtrans %}{% else %}{% trans %}delete{% endtrans %}{% endif %}</a> {% endif %} diff --git a/askbot/skins/common/templates/question/question_vote_buttons.html b/askbot/skins/common/templates/question/question_vote_buttons.html index b3db504f..ce6b18ff 100644 --- a/askbot/skins/common/templates/question/question_vote_buttons.html +++ b/askbot/skins/common/templates/question/question_vote_buttons.html @@ -1,35 +1,4 @@ -{% if question_vote %} - <img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" - {% if question_vote.is_upvote() %} - src="{{'/images/vote-arrow-up-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-up.png'|media}}" - {% endif %} - alt="{% trans %}i like this post (click again to cancel){% endtrans %}" - title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> -<div id="question-vote-number-{{ question.id }}" class="vote-number" - title="{% trans %}current number of votes{% endtrans %}"> - {{ question.score }} -</div> -<img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - {% if question_vote.is_downvote() %} - src="{{'/images/vote-arrow-down-on.png'|media}}" - {% else %} - src="{{'/images/vote-arrow-down.png'|media}}" - {% endif %} - alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> -{% else %} -<img id="question-img-upvote-{{ question.id }}" class="question-img-upvote" - alt="{% trans %}i like this post (click again to cancel){% endtrans %}" - src="{{'/images/vote-arrow-up.png'|media}}" - title="{% trans %}i like this post (click again to cancel){% endtrans %}" /> -<div id="question-vote-number-{{ question.id }}" class="vote-number" - title="{% trans %}current number of votes{% endtrans %}"> - {{ question.score }} -</div> -<img id="question-img-downvote-{{ question.id }}" class="question-img-downvote" - src="{{'/images/vote-arrow-down.png'|media}}" - alt="{% trans %}i dont like this post (click again to cancel){% endtrans %}" - title="{% trans %}i dont like this post (click again to cancel){% endtrans %}" /> -{% endif %} +{{ macros.post_vote_buttons( + post = question, + visitor_vote = user_question_vote) +}} diff --git a/askbot/skins/common/templates/widgets/search_bar.html b/askbot/skins/common/templates/widgets/search_bar.html index 5efe3860..d5a7859b 100644 --- a/askbot/skins/common/templates/widgets/search_bar.html +++ b/askbot/skins/common/templates/widgets/search_bar.html @@ -21,8 +21,12 @@ {% endif %} {# class was searchInput #} <input - {% if query %} + {% if query and request.user.is_authenticated() %} + class="searchInputCancelableAuth" + {% elif query %} class="searchInputCancelable" + {% elif request.user.is_authenticated() %} + class="searchInputAuth" {% else %} class="searchInput" {% endif %} diff --git a/askbot/skins/default/media/images/background-user-info.png b/askbot/skins/default/media/images/background-user-info.png Binary files differnew file mode 100644 index 00000000..b681cb37 --- /dev/null +++ b/askbot/skins/default/media/images/background-user-info.png diff --git a/askbot/skins/default/media/images/close.png b/askbot/skins/default/media/images/close.png Binary files differnew file mode 100644 index 00000000..cfe209ff --- /dev/null +++ b/askbot/skins/default/media/images/close.png diff --git a/askbot/skins/default/media/images/comment-background.png b/askbot/skins/default/media/images/comment-background.png Binary files differnew file mode 100644 index 00000000..4299b847 --- /dev/null +++ b/askbot/skins/default/media/images/comment-background.png diff --git a/askbot/skins/default/media/images/comment.png b/askbot/skins/default/media/images/comment.png Binary files differnew file mode 100644 index 00000000..9dcc4c66 --- /dev/null +++ b/askbot/skins/default/media/images/comment.png diff --git a/askbot/skins/default/media/images/delete.png b/askbot/skins/default/media/images/delete.png Binary files differnew file mode 100644 index 00000000..9263eae3 --- /dev/null +++ b/askbot/skins/default/media/images/delete.png diff --git a/askbot/skins/default/media/images/edit2.png b/askbot/skins/default/media/images/edit2.png Binary files differnew file mode 100644 index 00000000..f142a68c --- /dev/null +++ b/askbot/skins/default/media/images/edit2.png diff --git a/askbot/skins/default/media/images/flag.png b/askbot/skins/default/media/images/flag.png Binary files differnew file mode 100644 index 00000000..fc302335 --- /dev/null +++ b/askbot/skins/default/media/images/flag.png diff --git a/askbot/skins/default/media/images/link.png b/askbot/skins/default/media/images/link.png Binary files differnew file mode 100644 index 00000000..6ad60f5e --- /dev/null +++ b/askbot/skins/default/media/images/link.png diff --git a/askbot/skins/default/media/images/logo.gif b/askbot/skins/default/media/images/logo.gif Binary files differindex ac4ceda6..810b0bcf 100644 --- a/askbot/skins/default/media/images/logo.gif +++ b/askbot/skins/default/media/images/logo.gif diff --git a/askbot/skins/default/media/images/notification.png b/askbot/skins/default/media/images/notification.png Binary files differnew file mode 100644 index 00000000..c33ba699 --- /dev/null +++ b/askbot/skins/default/media/images/notification.png diff --git a/askbot/skins/default/media/images/retag.png b/askbot/skins/default/media/images/retag.png Binary files differnew file mode 100644 index 00000000..836c043c --- /dev/null +++ b/askbot/skins/default/media/images/retag.png diff --git a/askbot/skins/default/media/images/small-button-cancel.png b/askbot/skins/default/media/images/small-button-cancel.png Binary files differnew file mode 100644 index 00000000..79a87497 --- /dev/null +++ b/askbot/skins/default/media/images/small-button-cancel.png diff --git a/askbot/skins/default/media/images/socialsprite.png b/askbot/skins/default/media/images/socialsprite.png Binary files differnew file mode 100644 index 00000000..8d01ed77 --- /dev/null +++ b/askbot/skins/default/media/images/socialsprite.png diff --git a/askbot/skins/default/media/images/summary-background.png b/askbot/skins/default/media/images/summary-background.png Binary files differindex 58c3855a..28a6a398 100644 --- a/askbot/skins/default/media/images/summary-background.png +++ b/askbot/skins/default/media/images/summary-background.png diff --git a/askbot/skins/default/media/images/vote-arrow-down-new.png b/askbot/skins/default/media/images/vote-arrow-down-new.png Binary files differnew file mode 100644 index 00000000..f2a28aea --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-down-new.png diff --git a/askbot/skins/default/media/images/vote-arrow-down-on-new.png b/askbot/skins/default/media/images/vote-arrow-down-on-new.png Binary files differnew file mode 100644 index 00000000..2127bf7d --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-down-on-new.png diff --git a/askbot/skins/default/media/images/vote-arrow-up-new.png b/askbot/skins/default/media/images/vote-arrow-up-new.png Binary files differnew file mode 100644 index 00000000..cb9ea8b6 --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-up-new.png diff --git a/askbot/skins/default/media/images/vote-arrow-up-on-new.png b/askbot/skins/default/media/images/vote-arrow-up-on-new.png Binary files differnew file mode 100644 index 00000000..ef895206 --- /dev/null +++ b/askbot/skins/default/media/images/vote-arrow-up-on-new.png diff --git a/askbot/skins/default/media/style/jquery.autocomplete.css b/askbot/skins/default/media/style/jquery.autocomplete.css index b3d7b759..09b08192 100644 --- a/askbot/skins/default/media/style/jquery.autocomplete.css +++ b/askbot/skins/default/media/style/jquery.autocomplete.css @@ -4,8 +4,11 @@ .acResults { padding: 0px; border: 1px solid WindowFrame; - background-color: Window; + background-color: #fff; overflow: hidden; + -webkit-box-shadow: 0px 1px 1px #A7A7A7; + -moz-box-shadow: 0px 1px 1px #BFBFBF; + box-shadow: 0px 1px 1px #BFBFBF; } .acResults ul { @@ -23,7 +26,7 @@ display: block; width: 100%; font: menu; - font-size: 12px; + font-size: 14px; overflow: hidden; } diff --git a/askbot/skins/default/media/style/lib_style.less b/askbot/skins/default/media/style/lib_style.less index 34710137..4f2bad79 100644 --- a/askbot/skins/default/media/style/lib_style.less +++ b/askbot/skins/default/media/style/lib_style.less @@ -7,15 +7,15 @@ @question-link:#464646; @button-label:#4a757f; @section-title:#7ea9b3; -@info-text:#8d8d8d; -@info-text-dark:#6b6b6b; +@info-text:#707070; +@info-text-dark:#525252; /* Variables for fonts*/ -@trebuchet:"Trebuchet MS", sans-serif; -@georgia:Georgia, serif; -@yanone:'Yanone Kaffeesatz', sans-serif; -@arial:Arial; +@body-font:Arial; /* "Trebuchet MS", sans-serif;*/ +@sort-font:Georgia, serif; +@main-font:'Yanone Kaffeesatz', sans-serif; +@secondary-font:Arial; /* Receive exactly positions for background Sprite */ @@ -44,3 +44,12 @@ -webkit-border-radius: @radio; -khtml-border-radius: @radio; } + +.rounded-corners-top(@radio:5px){ + border-top-right-radius:@radio; + border-top-left-radius:@radio; + -moz-border-radius-topright:@radio; + -moz-border-radius-topleft:@radio; + -webkit-border-top-left-radius:@radio; + -webkit-border-top-right-radius:@radio; +} diff --git a/askbot/skins/default/media/style/style.css b/askbot/skins/default/media/style/style.css index 23972142..cacc8782 100644 --- a/askbot/skins/default/media/style/style.css +++ b/askbot/skins/default/media/style/style.css @@ -1,2009 +1,2483 @@ @import url(jquery.autocomplete.css); -@import "lib_style.less"; /* Library of predifined less functions styles */ - +/* General Predifined classes, read more in lesscss.org */ +/* Variables for Colors*/ +/* Variables for fonts*/ +/* "Trebuchet MS", sans-serif;*/ +/* Receive exactly positions for background Sprite */ +/* CSS3 Elements */ +/* Library of predifined less functions styles */ /* ----- General HTML Styles----- */ - body { - background: #FFF; - font-size: 14px; - line-height: 150%; - margin: 0; - padding: 0; - color: #000; - font-family: @yanone; + background: #FFF; + font-size: 14px; + line-height: 150%; + margin: 0; + padding: 0; + color: #000; + font-family: Arial; } - div { - margin: 0 auto; - padding: 0; -} - -h1, h2, h3, h4, h5, h6, ul, li, dl, dt, dd, form, img, p { - margin: 0; - padding: 0; - border: none; + margin: 0 auto; + padding: 0; +} +h1, +h2, +h3, +h4, +h5, +h6, +ul, +li, +dl, +dt, +dd, +form, +img, +p { + margin: 0; + padding: 0; + border: none; } - label { - vertical-align: middle; + vertical-align: middle; } - hr { - border: none; - border-top: 1px dashed #ccccce; + border: none; + border-top: 1px dashed #ccccce; } - input, select { - vertical-align: middle; - font-family: Trebuchet MS, "segoe ui", Helvetica, Tahoma, Verdana, MingLiu, PMingLiu, Arial, sans-serif; + vertical-align: middle; + font-family: Trebuchet MS, "segoe ui", Helvetica, Tahoma, Verdana, MingLiu, PMingLiu, Arial, sans-serif; + margin-left: 0px; } - p { - font-size: 14px; - line-height: 140%; - margin-bottom: 6px; - padding-left: 5px; + font-size: 14px; + line-height: 140%; + margin-bottom: 6px; } - a { - color:@link; - text-decoration: none; - cursor: pointer; + color: #1b79bd; + text-decoration: none; + cursor: pointer; } - h2 { - font-size: 140%; - padding: 3px 0 3px 5px; + font-size: 21px; + padding: 3px 0 3px 5px; } - h3 { - font-size: 120%; - padding: 3px 0 3px 5px; + font-size: 19px; + padding: 3px 0 3px 5px; } - ul { - list-style: disc; - margin-left: 20px; - padding-left: 0px; - margin-bottom: 1em; + list-style: disc; + margin-left: 20px; + padding-left: 0px; + margin-bottom: 1em; } - ol { - list-style: decimal; - margin-left: 30px; - margin-bottom: 1em; - padding-left: 0px; + list-style: decimal; + margin-left: 30px; + margin-bottom: 1em; + padding-left: 0px; } - td ul { - vertical-align: middle; + vertical-align: middle; } - li input { - margin: 3px 3px 4px 3px; + margin: 3px 3px 4px 3px; } - pre { - font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace; - font-size: 100%; - margin-bottom: 10px; - /*overflow: auto;*/ - background-color: #F5F5F5; - padding-left: 5px; - padding-top: 5px; - /*width: 671px;*/ - padding-bottom: 20px ! ie7; -} + font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace; + font-size: 100%; + margin-bottom: 10px; + /*overflow: auto;*/ -code { - font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace; - font-size: 100%; + background-color: #F5F5F5; + padding-left: 5px; + padding-top: 5px; + /*width: 671px;*/ + padding-bottom: 20px ! ie7; +} +code { + font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace; + font-size: 100%; } - blockquote { - margin-bottom: 10px; - margin-right: 15px; - padding: 10px 0px 1px 10px; - background-color: #F5F5F5; + margin-bottom: 10px; + margin-right: 15px; + padding: 10px 0px 1px 10px; + background-color: #F5F5F5; } - /* http://pathfindersoftware.com/2007/09/developers-note-2/ */ -* html .clearfix, -* html .paginator { - height: 1; - overflow: visible; -} -+ html .clearfix, -+ html .paginator { - min-height: 1%; -} -.clearfix:after, -.paginator:after { - clear: both; - content:"."; - display:block; - height: 0; - visibility: hidden; +* html .clearfix, * html .paginator { + height: 1; + overflow: visible; +} ++ html .clearfix, + html .paginator { + min-height: 1%; +} +.clearfix:after, .paginator:after { + clear: both; + content: "."; + display: block; + height: 0; + visibility: hidden; } - .badges a { - color: #763333; - text-decoration: underline; + color: #763333; + text-decoration: underline; } - a:hover { - text-decoration: underline; + text-decoration: underline; } - .badge-context-toggle.active { - cursor: pointer; - text-decoration: underline; + cursor: pointer; + text-decoration: underline; } - h1 { - font-size: 160%; - padding: 10px 0 5px 5px; + font-size: 24px; + padding: 10px 0 5px 0px; } - /* ----- Custom positions ----- */ - -.left{float:left} -.right{float:right} -.clean{clear:both} - - +.left { + float: left; +} +.right { + float: right; +} +.clean { + clear: both; +} +.center { + margin: 0 auto; + padding: 0; +} /* ----- Notify message bar , check blocks/system_messages.html ----- */ - .notify { - position: fixed; - top: 0px; - left: 0px; - width: 100%; - z-index: 100; - padding: 0; - text-align: center; - background-color: #f5dd69; - border-top:#fff 1px solid; - - p { - margin-top: 6px; - margin-bottom: 6px; - font-size: 16px; - color:#424242 - } + position: fixed; + top: 0px; + left: 0px; + width: 100%; + z-index: 100; + padding: 0; + text-align: center; + background-color: #f5dd69; + border-top: #fff 1px solid; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.notify p { + margin-top: 6px; + margin-bottom: 6px; + font-size: 16px; + color: #424242; } - #closeNotify { - position: absolute; - right: 5px; - top: 7px; - color: #735005; - text-decoration: none; - line-height: 18px; - .sprites(-6px,-5px); - cursor: pointer; - width:20px; - height:20px; + position: absolute; + right: 5px; + top: 7px; + color: #735005; + text-decoration: none; + line-height: 18px; + background: -6px -5px url(../images/sprites.png) no-repeat; + cursor: pointer; + width: 20px; + height: 20px; } - #closeNotify:hover { - .sprites(-26px,-5px); + background: -26px -5px url(../images/sprites.png) no-repeat; } - /* ----- Header, check blocks/header.html ----- */ - #header { - margin-top: 0px; - background: @header-color; -} - -.content-wrapper {/* wrapper positioning class */ - width: 960px; - margin: auto; - position:relative; -} - -#logo img{ - padding: 5px 0px 5px 0px; -} - -#userToolsNav {/* Navigation bar containing login link or user information, check widgets/user_navigation.html*/ - height: 20px; - position:absolute; - bottom: 0; - right:0px; - padding-bottom:5px; - - a { - height: 35px; - text-align: right; - margin-left: 20px; - text-decoration: underline; - color:#d0e296; - font-size:16px; - } - - a:first-child { - margin-left: 0; - } - - a#ab-responses { - margin-left: 3px; - } - - .user-info,.user-micro-info{ - color:#b5b593; - } - - a img { - vertical-align:middle; - margin-bottom:2px; - } - - .user-info a { - margin: 0; - text-decoration: none; - } + margin-top: 0px; + background: #16160f; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.content-wrapper { + /* wrapper positioning class */ + + width: 960px; + margin: auto; + position: relative; +} +#logo img { + padding: 5px 0px 5px 0px; + height: 75px; + width: auto; +} +#userToolsNav { + /* Navigation bar containing login link or user information, check widgets/user_navigation.html*/ + + height: 20px; + position: absolute; + bottom: 0; + right: 0px; + padding-bottom: 5px; +} +#userToolsNav a { + height: 35px; + text-align: right; + margin-left: 20px; + text-decoration: underline; + color: #d0e296; + font-size: 16px; +} +#userToolsNav a:first-child { + margin-left: 0; +} +#userToolsNav a#ab-responses { + margin-left: 3px; +} +#userToolsNav .user-info, #userToolsNav .user-micro-info { + color: #b5b593; +} +#userToolsNav a img { + vertical-align: middle; + margin-bottom: 2px; +} +#userToolsNav .user-info a { + margin: 0; + text-decoration: none; +} +#metaNav { + /* Top Navigation bar containing links for tags, people and badges, check widgets/header.html */ + + float: right; +} +#metaNav a { + color: #e2e2ae; + padding: 0px 0px 0px 35px; + height: 25px; + line-height: 30px; + margin: 5px 0px 0px 10px; + font-size: 18px; + font-weight: 100; + text-decoration: none; + display: block; + float: left; +} +#metaNav a:hover { + text-decoration: underline; +} +#metaNav a.on { + font-weight: bold; + color: #FFF; + text-decoration: none; +} +#metaNav a.special { + font-size: 18px; + color: #B02B2C; + font-weight: bold; + text-decoration: none; +} +#metaNav a.special:hover { + text-decoration: underline; +} +#metaNav #navTags { + background: -50px -5px url(../images/sprites.png) no-repeat; +} +#metaNav #navUsers { + background: -125px -5px url(../images/sprites.png) no-repeat; +} +#metaNav #navBadges { + background: -210px -5px url(../images/sprites.png) no-repeat; +} +#secondaryHeader { + /* Div containing Home button, scope navigation, search form and ask button, check blocks/secondary_header.html */ + + height: 55px; + background: #e9e9e1; + border-bottom: #d3d3c2 1px solid; + border-top: #fcfcfc 1px solid; + margin-bottom: 10px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +#secondaryHeader #homeButton { + border-right: #afaf9e 1px solid; + background: -6px -36px url(../images/sprites.png) no-repeat; + height: 55px; + width: 43px; + display: block; + float: left; +} +#secondaryHeader #homeButton:hover { + background: -51px -36px url(../images/sprites.png) no-repeat; +} +#secondaryHeader #scopeWrapper { + width: 688px; + float: left; +} +#secondaryHeader #scopeWrapper a { + display: block; + float: left; +} +#secondaryHeader #scopeWrapper .scope-selector { + font-size: 21px; + color: #5a5a4b; + height: 55px; + line-height: 55px; + margin-left: 24px; +} +#secondaryHeader #scopeWrapper .on { + background: url(../images/scopearrow.png) no-repeat center bottom; +} +#secondaryHeader #scopeWrapper .ask-message { + font-size: 24px; +} +#searchBar { + /* Main search form , check widgets/search_bar.html */ + + display: inline-block; + background-color: #fff; + width: 412px; + border: 1px solid #c9c9b5; + float: right; + height: 42px; + margin: 6px 0px 0px 15px; +} +#searchBar .searchInput, +#searchBar .searchInputCancelable, +#searchBar .searchInputAuth, +#searchBar .searchInputCancelableAuth { + font-size: 30px; + height: 40px; + font-weight: 300; + background: #FFF; + border: 0px; + color: #484848; + padding-left: 10px; + font-family: Arial; + vertical-align: middle; +} +#searchBar .searchInput, #searchBar .searchInputCancelable { + width: 352px; +} +#searchBar .searchInputCancelable { + width: 317px; +} +#searchBar .searchInputAuth { + width: 340px; +} +#searchBar .searchInputCancelableAuth { + width: 310px; + /*FIXME byron */ + +} +#searchBar .logoutsearch { + width: 337px; +} +#searchBar .searchBtn { + font-size: 10px; + color: #666; + background-color: #eee; + height: 42px; + border: #FFF 1px solid; + line-height: 22px; + text-align: center; + float: right; + margin: 0px; + width: 48px; + background: -98px -36px url(../images/sprites.png) no-repeat; + cursor: pointer; +} +#searchBar .searchBtn:hover { + background: -146px -36px url(../images/sprites.png) no-repeat; +} +#searchBar .cancelSearchBtn { + font-size: 30px; + color: #ce8888; + background: #fff; + height: 42px; + border: 0px; + border-left: #deded0 1px solid; + text-align: center; + width: 35px; + cursor: pointer; +} +#searchBar .cancelSearchBtn:hover { + color: #d84040; +} +#askButton { + /* check blocks/secondary_header.html and widgets/ask_button.html*/ + + background: url(../images/bigbutton.png) repeat-x bottom; + line-height: 44px; + text-align: center; + width: 200px; + height: 42px; + font-size: 23px; + color: #4a757f; + margin-top: 7px; + float: right; + text-transform: uppercase; + border-radius: 5px; + -ms-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-box-shadow: 1px 1px 2px #636363; + -moz-box-shadow: 1px 1px 2px #636363; + box-shadow: 1px 1px 2px #636363; +} +#askButton:hover { + text-decoration: none; + background: url(../images/bigbutton.png) repeat-x top; + text-shadow: 0px 1px 0px #c6d9dd; + -moz-text-shadow: 0px 1px 0px #c6d9dd; + -webkit-text-shadow: 0px 1px 0px #c6d9dd; } - -#metaNav {/* Top Navigation bar containing links for tags, people and badges, check widgets/header.html */ - float:right; - - a { - color: #e2e2ae; - padding: 0px 0px 0px 35px; - height: 25px; - line-height: 30px; - margin:5px 0px 0px 10px; - font-size: 18px; - font-weight: 100; - text-decoration: none; - display: block; - float: left; - } - - a:hover { - text-decoration: underline; - } - - a.on { - font-weight:bold; - color: #FFF; - text-decoration: none; - } - - a.special { - font-size: 18px; - color: #B02B2C; - font-weight: bold; - text-decoration: none; - } - - a.special:hover { - text-decoration: underline; - } - - #navTags{ - .sprites(-50px,-5px) - } - - #navUsers{ - .sprites(-125px,-5px) - } - - #navBadges{ - .sprites(-210px,-5px) - } -} - -#secondaryHeader{ /* Div containing Home button, scope navigation, search form and ask button, check blocks/secondary_header.html */ - height:55px; - background:#e9e9e1; - border-bottom:#d3d3c2 1px solid; - border-top:#fcfcfc 1px solid; - margin-bottom:10px; - - #homeButton{ - border-right:#afaf9e 1px solid; - .sprites(-6px,-36px); - height:55px; - width:43px; - display:block; - float:left; - } - - #homeButton:hover{ - .sprites(-6px-45,-36px); - } - - #scopeWrapper{ - width:688px; - float:left; - - a{ - display:block; - float:left; - } - - .scope-selector{ - font-size:21px; - color:#5a5a4b; - height:55px; - line-height:55px; - margin-left:24px - } - .on{ - background:url(../images/scopearrow.png) no-repeat center bottom; - } - - .ask-message{ - font-size:24px; - } - } -} - -#searchBar { /* Main search form , check widgets/search_bar.html */ - display:inline-block; - background-color: #fff; - width:412px; - border: 1px solid #c9c9b5; - float:right; - height:42px; - margin:6px 0px 0px 15px; - - .searchInput, .searchInputCancelable { - font-size: 30px; - height: 40px; - font-weight:300; - background:#FFF; - border:0px; - color:#484848; - padding-left:10px; - font-family:@trebuchet; - vertical-align: middle; - } - - .searchInput, .searchInputCancelable { - width: 352px; - } - - .searchInputCancelable { - width: 317px; - } - .logoutsearch { - width: 337px; - } - - .searchBtn { - font-size: 10px; - color: #666; - background-color: #eee; - height: 42px; - border:#FFF 1px solid; - line-height: 22px; - text-align: center; - float:right; - margin: 0px; - width:48px; - .sprites(-98px,-36px); - cursor:pointer; - } - - .searchBtn:hover { - .sprites(-98px-48,-36px); - } - - .cancelSearchBtn { - font-size: 30px; - color: #ce8888; - background:#fff; - height: 42px; - border:0px; - border-left:#deded0 1px solid; - text-align: center; - width: 35px; - cursor:pointer; - } - - .cancelSearchBtn:hover { - color: #d84040; - } -} - -#askButton{ /* check blocks/secondary_header.html and widgets/ask_button.html*/ - background: url(../images/bigbutton.png) repeat-x bottom; - line-height:44px; - text-align:center; - width:200px; - height:42px; - font-size:23px; - color:@button-label; - margin-top:7px; - float:right; - text-transform:uppercase; - .rounded-corners(5px); - .box-shadow(1px, 1px, 2px, #636363) -} - -#askButton:hover{ - text-decoration:none; - background: url(../images/bigbutton.png) repeat-x top; - .text-shadow(0px, 1px, 0px, #c6d9dd) -} - /* ----- Content layout, check two_column_body.html or one_column_body.html ----- */ - #ContentLeft { - width: 730px; - float: left; - position: relative; + width: 730px; + float: left; + position: relative; + padding-bottom: 10px; } - #ContentRight { - width: 200px; - float: right; - padding: 0 0px 10px 0px; + width: 200px; + float: right; + padding: 0 0px 10px 0px; } - #ContentFull { - float: left; - width: 950px; + float: left; + width: 960px; } - -/* ----- Sidebar Widgets Box, check main_page/sidebar.html ----- */ - +/* ----- Sidebar Widgets Box, check main_page/sidebar.html or question/sidebar.html ----- */ .box { - background: #fff; - padding: 4px 0px 10px 0px; - - - p { - margin-bottom: 4px; - } - - p.info-box-follow-up-links { - text-align: right; - margin: 0; - } - - h2 { - padding-left: 0; - background:#eceeeb; - height:30px; - line-height:30px; - text-align:right; - font-size:24px; - font-weight:normal; - color:#656565; - padding-right:10px; - margin-bottom:10px; - } - h3{ - color:#4a757f; - font-size:18px; - text-align:left; - font-weight:normal; - } - .contributorback{ - background: #eceeeb url(../images/contributorsback.png) no-repeat center left; - } - - label { - color: #333; - } - - ul { - margin-left: 22px; - } - - li { - list-style-type: disc; - font-size: 13px; - line-height: 20px; - margin-bottom: 10px; - } - ul.tags { - list-style: none; - margin: 0; - padding: 0; - line-height: 170%; - display: block; - } - #displayTagFilterControl p label{ - color:@info-text; - font-size:15px; - } - - .inputs{ - #interestingTagInput, #ignoredTagInput{ - width:159px; - border:#c9c9b5 1px solid; - height:25px; - } - #interestingTagAdd, #ignoredTagAdd{ - background:url(../images/small-button-blue.png) repeat-x top; - border:0; - color:@button-label; - font-weight:bold; - font-size:12px; - width:33px; - height:27px; - margin-top:-2px; - cursor:pointer; - .rounded-corners(4px); - .text-shadow(0px,1px,0px,#E6F6FA); - .box-shadow(1px, 1px, 2px, #808080) - - } - #interestingTagAdd:hover, #ignoredTagAdd:hover{ - background:url(../images/small-button-blue.png) repeat-x bottom; - } - } - + background: #fff; + padding: 4px 0px 10px 0px; + width: 200px; + /* widgets for question template */ + +} +.box p { + margin-bottom: 4px; +} +.box p.info-box-follow-up-links { + text-align: right; + margin: 0; +} +.box h2 { + padding-left: 0; + background: #eceeeb; + height: 30px; + line-height: 30px; + text-align: right; + font-size: 18px !important; + font-weight: normal; + color: #656565; + padding-right: 10px; + margin-bottom: 10px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.box h3 { + color: #4a757f; + font-size: 18px; + text-align: left; + font-weight: normal; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.box .contributorback { + background: #eceeeb url(../images/contributorsback.png) no-repeat center left; +} +.box label { + color: #707070; + font-size: 15px; + display: block; + float: right; + width: 177px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.box ul { + margin-left: 22px; +} +.box li { + list-style-type: disc; + font-size: 13px; + line-height: 20px; + margin-bottom: 10px; + color: #707070; +} +.box ul.tags { + list-style: none; + margin: 0; + padding: 0; + line-height: 170%; + display: block; +} +.box #displayTagFilterControl p label { + color: #707070; + font-size: 15px; +} +.box .inputs #interestingTagInput, .box .inputs #ignoredTagInput { + width: 158px; + border: #c9c9b5 1px solid; + height: 25px; +} +.box .inputs #interestingTagAdd, .box .inputs #ignoredTagAdd { + background: url(../images/small-button-blue.png) repeat-x top; + border: 0; + color: #4a757f; + font-weight: bold; + font-size: 12px; + width: 30px; + height: 27px; + margin-top: -2px; + cursor: pointer; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + text-shadow: 0px 1px 0px #e6f6fa; + -moz-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-box-shadow: 1px 1px 2px #808080; + -moz-box-shadow: 1px 1px 2px #808080; + box-shadow: 1px 1px 2px #808080; +} +.box .inputs #interestingTagAdd:hover, .box .inputs #ignoredTagAdd:hover { + background: url(../images/small-button-blue.png) repeat-x bottom; +} +.box img.gravatar { + margin: 1px; +} +.box a.followed, .box a.follow { + background: url(../images/medium-button.png) top repeat-x; + height: 34px; + line-height: 34px; + text-align: center; + border: 0; + font-family: 'Yanone Kaffeesatz', sans-serif; + color: #4a757f; + font-weight: normal; + font-size: 21px; + margin-top: 3px; + display: block; + width: 120px; + text-decoration: none; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-box-shadow: 1px 1px 2px #636363; + -moz-box-shadow: 1px 1px 2px #636363; + box-shadow: 1px 1px 2px #636363; + margin: 0 auto; + padding: 0; +} +.box a.followed:hover, .box a.follow:hover { + text-decoration: none; + background: url(../images/medium-button.png) bottom repeat-x; + text-shadow: 0px 1px 0px #c6d9dd; + -moz-text-shadow: 0px 1px 0px #c6d9dd; + -webkit-text-shadow: 0px 1px 0px #c6d9dd; +} +.box a.followed div.unfollow { + display: none; +} +.box a.followed:hover div { + display: none; +} +.box a.followed:hover div.unfollow { + display: inline; + color: #a05736; +} +.box .favorite-number { + padding: 5px 0 0 5px; + font-size: 100%; + font-family: Arial; + font-weight: bold; + color: #777; + text-align: center; +} +.statsWidget p { + color: #707070; + font-size: 16px; + border-bottom: #cccccc 1px solid; + font-size: 13px; +} +.statsWidget p strong { + float: right; + padding-right: 10px; } - -img.gravatar { - margin:1px; +.questions-related { + word-wrap: break-word; +} +.questions-related p { + line-height: 20px; + padding: 4px 0px 4px 0px; + font-size: 16px; + font-weight: normal; + border-bottom: #cccccc 1px solid; +} +.questions-related a { + font-size: 13px; } - /* tips and markdown help are widgets for ask template */ - -#tips{ - li{ - color:@info-text; - font-size:16px; - list-style-image: url(../images/tips.png); - } - a{ - font-size:16px; - } +#tips li { + color: #707070; + font-size: 13px; + list-style-image: url(../images/tips.png); } - -#markdownHelp{ - li{ - color:@info-text; - font-size:16px; - } - a{ - font-size:16px; - } +#tips a { + font-size: 16px; +} +#markdownHelp li { + color: #707070; + font-size: 13px; +} +#markdownHelp a { + font-size: 16px; } - /* ----- Sorting top Tab, check main_page/tab_bar.html ------*/ - .tabBar { - background-color: #eff5f6; - height: 30px; - width: 336px; - margin-bottom: 3px; - margin-top: 3px; - float:right; - font-family:@georgia; - font-size:16px; - .rounded-corners(5px); + background-color: #eff5f6; + height: 30px; + margin-bottom: 3px; + margin-top: 3px; + float: right; + font-family: Georgia, serif; + font-size: 16px; + border-radius: 5px; + -ms-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -khtml-border-radius: 5px; } - .tabBar h2 { - float: left; + float: left; } - .tabsA, .tabsC { - float: right; - position: relative; - display: block; - height: 20px; + float: right; + position: relative; + display: block; + height: 20px; } - /* tabsA - used for sorting */ -.tabsA { float: right; } -.tabsC { float: left; } - -.tabsA a, .tabsC a{ - - border-left: 1px solid #d0e1e4; - color: @section-title; - display: block; - float: left; - height: 20px; - line-height: 20px; - padding:4px 7px 4px 7px; - text-decoration: none; -} - -.tabsA a.on, .tabsC a.on, .tabsA a:hover, .tabsC a:hover { - color: @button-label; -} - -.tabsA a.rev.on, tabsA a.rev.on:hover { +.tabsA { + float: right; +} +.tabsC { + float: left; +} +.tabsA a, .tabsC a { + border-left: 1px solid #d0e1e4; + color: #7ea9b3; + display: block; + float: left; + height: 20px; + line-height: 20px; + padding: 4px 7px 4px 7px; + text-decoration: none; +} +.tabsA a.on, +.tabsC a.on, +.tabsA a:hover, +.tabsC a:hover { + color: #4a757f; } - .tabsA .label, .tabsC .label { - float: left; - color: #646464; - margin-top:4px; - margin-right:5px; + float: left; + color: #646464; + margin-top: 4px; + margin-right: 5px; } - .tabsB a { - background: #eee; - border: 1px solid #eee; - color: #777; - display: block; - float: left; - height: 22px; - line-height: 28px; - margin: 5px 0px 0 4px; - padding: 0 11px 0 11px; - text-decoration: none; + background: #eee; + border: 1px solid #eee; + color: #777; + display: block; + float: left; + height: 22px; + line-height: 28px; + margin: 5px 0px 0 4px; + padding: 0 11px 0 11px; + text-decoration: none; } - .rss { - float: right; - font-size: 16px; - color: #f57900; - margin: 5px 0px 3px 7px; - width:52px; - padding-left: 16px; - padding-top:3px; - background:#fff url(../images/feed-icon-small.png) no-repeat center right; - float:right; - font-family:@georgia; - font-size:16px; + float: right; + font-size: 16px; + color: #f57900; + margin: 5px 0px 3px 7px; + width: 52px; + padding-left: 16px; + padding-top: 3px; + background: #ffffff url(../images/feed-icon-small.png) no-repeat center right; + float: right; + font-family: Georgia, serif; + font-size: 16px; } - .rss:hover { - color: #F4A731 !important; + color: #F4A731 !important; } - /* ----- Headline, containing number of questions and tags selected, check main_page/headline.html ----- */ - -#questionCount{ - font-weight:bold; - font-size:23px; - color:@section-title; - width:200px; - float:left; - margin-bottom:8px; - padding-top:6px; +#questionCount { + font-weight: bold; + font-size: 23px; + color: #7ea9b3; + width: 200px; + float: left; + margin-bottom: 8px; + padding-top: 6px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +#listSearchTags { + float: left; + margin-top: 3px; + color: #707070; + font-size: 16px; + font-family: 'Yanone Kaffeesatz', sans-serif; } - -#listSearchTags{ - float:left; - margin-top:3px; - color:@info-text; - font-size:16px; -} - ul#searchTags { - margin-left:10px; - float:right; - padding-top:2px; + margin-left: 10px; + float: right; + padding-top: 2px; } - .search-tips { - font-size:16px; - line-height:17px; - color: @info-text; - margin:5px 0 10px 0; - padding:0px; - float:left; - - a { - text-decoration: underline; - color: @link; - } + font-size: 16px; + line-height: 17px; + color: #707070; + margin: 5px 0 10px 0; + padding: 0px; + float: left; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.search-tips a { + text-decoration: underline; + color: #1b79bd; } - /* ----- Question list , check main_page/content.html and macros/macros.html----- */ - #question-list { - float: left; - position: relative; - background-color: #FFF; - padding: 0; - width: 100%; + float: left; + position: relative; + background-color: #FFF; + padding: 0; + width: 100%; } - .short-summary { - position: relative; - filter: inherit; - padding: 10px; - border-bottom: 1px solid #DDDBCE; - margin-bottom:1px; - overflow: hidden; - width: 710px; - float: left; - background: url(../images/summary-background.png) repeat-x; - - h2 { - font-size: 24px; - font-weight:normal; - line-height: 26px; - padding-left: 0; - margin-bottom:8px; - display:block; - } - - a { - color:@question-link; - } - - .userinfo { - text-align:right; - line-height:16px; - font-family:@trebuchet; - padding-right:4px; - } - - - .userinfo .relativetime, span.anonymous - { - font-size: 11px; - clear:both; - font-weight: normal; - color: #555; - } - - .userinfo a{ - font-weight:bold; - font-size:11px; - } - - .counts { - float: right; - margin: 4px 0 0 5px; - } - - .counts .item-count { - padding:0px 5px 0px 5px; - font-size: 25px; - font-family:@yanone; - } - - .counts .votes div, - .counts .views div, - .counts .answers div, - .counts .favorites div - { - margin-top:3px; - font-size: 14px; - line-height:14px; - color: #646464; - } - - .tags { - margin-top: 0; - } - - .votes, .answers, .favorites, .views { - text-align: center; - margin: 0 3px; - padding: 8px 2px 0px 2px; - width: 51px; - float: right; - height:44px; - border:#dbdbd4 1px solid; - } - - .votes{ - background: url(../images/vote-background.png) repeat-x; - } - - .answers{ - background:url(../images/answers-background.png) repeat-x; - } - - .views { - background:url(../images/view-background.png) repeat-x; - } - - .no-votes .item-count { - color: #b1b5b6; - } - .some-votes .item-count { - color: #4a757f; - } - - .no-answers .item-count { - color: #b1b5b6; - } - .some-answers .item-count { - color: #eab243; - } - - .no-views .item-count { - color: #b1b5b6; - } - .some-views .item-count { - color: #d33f00; - } - - .accepted .item-count { - background:url(../images/accept.png) no-repeat top right; - display: block; - text-align: center; - width: 40px; - color: #eab243; - } - - .some-favorites .item-count { - background:#338333; - color:#d0f5a9; - } - .no-favorites .item-count { - background: #eab243; - color: yellow; - } - + position: relative; + filter: inherit; + padding: 10px; + border-bottom: 1px solid #DDDBCE; + margin-bottom: 1px; + overflow: hidden; + width: 710px; + float: left; + background: url(../images/summary-background.png) repeat-x; +} +.short-summary h2 { + font-size: 24px; + font-weight: normal; + line-height: 26px; + padding-left: 0; + margin-bottom: 8px; + display: block; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.short-summary a { + color: #464646; +} +.short-summary .userinfo { + text-align: right; + line-height: 16px; + font-family: Arial; + padding-right: 4px; +} +.short-summary .userinfo .relativetime, .short-summary span.anonymous { + font-size: 11px; + clear: both; + font-weight: normal; + color: #555; +} +.short-summary .userinfo a { + font-weight: bold; + font-size: 11px; +} +.short-summary .counts { + float: right; + margin: 4px 0 0 5px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.short-summary .counts .item-count { + padding: 0px 5px 0px 5px; + font-size: 25px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.short-summary .counts .votes div, +.short-summary .counts .views div, +.short-summary .counts .answers div, +.short-summary .counts .favorites div { + margin-top: 3px; + font-size: 14px; + line-height: 14px; + color: #646464; +} +.short-summary .tags { + margin-top: 0; +} +.short-summary .votes, +.short-summary .answers, +.short-summary .favorites, +.short-summary .views { + text-align: center; + margin: 0 3px; + padding: 8px 2px 0px 2px; + width: 51px; + float: right; + height: 44px; + border: #dbdbd4 1px solid; +} +.short-summary .votes { + background: url(../images/vote-background.png) repeat-x; +} +.short-summary .answers { + background: url(../images/answers-background.png) repeat-x; +} +.short-summary .views { + background: url(../images/view-background.png) repeat-x; +} +.short-summary .no-votes .item-count { + color: #b1b5b6; +} +.short-summary .some-votes .item-count { + color: #4a757f; +} +.short-summary .no-answers .item-count { + color: #b1b5b6; +} +.short-summary .some-answers .item-count { + color: #eab243; +} +.short-summary .no-views .item-count { + color: #b1b5b6; +} +.short-summary .some-views .item-count { + color: #d33f00; +} +.short-summary .accepted .item-count { + background: url(../images/accept.png) no-repeat top right; + display: block; + text-align: center; + width: 40px; + color: #eab243; +} +.short-summary .some-favorites .item-count { + background: #338333; + color: #d0f5a9; +} +.short-summary .no-favorites .item-count { + background: #eab243; + color: yellow; } - /* ----- Question list Paginator , check main_content/pager.html and macros/utils_macros.html----- */ - .evenMore { - font-size: 16px; - color:@info-text; - padding:15px 0px 10px 0px; - clear:both; + font-size: 13px; + color: #707070; + padding: 15px 0px 10px 0px; + clear: both; } - .evenMore a { - text-decoration: underline; - color:@link; + text-decoration: underline; + color: #1b79bd; } - .pager { - margin-top: 10px; - margin-bottom: 16px; + margin-top: 10px; + margin-bottom: 16px; } - .pagesize { - margin-top: 10px; - margin-bottom: 16px; - float: right; + margin-top: 10px; + margin-bottom: 16px; + float: right; } - .paginator { - padding: 5px 0 10px 0; - font-size:16px; - - .prev a, .prev a:visited, - .next a, .next a:visited { - background-color: #fff; - color: #777; - padding: 2px 4px 3px 4px; - font-family:@yanone; - } - a{ - color:@section-title; - } - .prev { - margin-right: .5em; - } - - .next { - margin-left: .5em; - } - - .page a, .page a:visited, .curr { - padding: .25em; - background-color: #fff; - margin: 0em .25em; - color: #ff; - } - - .curr { - background-color: #8ebcc7; - color: #fff; - font-weight: bold; - } - .next a, .prev a{ - color:@section-title - } - .page a:hover, - .curr a:hover, - .prev a:hover, - .next a:hover { - color: #8C8C8C; - background-color: #E1E1E1; - text-decoration: none; - } - - .text { - color: #777; - padding: .3em; - } - - .paginator-container-left { - padding: 5px 0 10px 0; - } - + padding: 5px 0 10px 0; + font-size: 13px; +} +.paginator .prev a, +.paginator .prev a:visited, +.paginator .next a, +.paginator .next a:visited { + background-color: #fff; + color: #777; + padding: 2px 4px 3px 4px; +} +.paginator a { + color: #7ea9b3; +} +.paginator .prev { + margin-right: .5em; +} +.paginator .next { + margin-left: .5em; +} +.paginator .page a, .paginator .page a:visited, .paginator .curr { + padding: .25em; + background-color: #fff; + margin: 0em .25em; + color: #ff; +} +.paginator .curr { + background-color: #8ebcc7; + color: #fff; + font-weight: bold; +} +.paginator .next a, .paginator .prev a { + color: #7ea9b3; +} +.paginator .page a:hover, +.paginator .curr a:hover, +.paginator .prev a:hover, +.paginator .next a:hover { + color: #8C8C8C; + background-color: #E1E1E1; + text-decoration: none; +} +.paginator .text { + color: #777; + padding: .3em; +} +.paginator .paginator-container-left { + padding: 5px 0 10px 0; } - /* ----- Tags Styles ----- */ - /* tag formatting is also copy-pasted in template because it must be the same in the emails askbot/models/__init__.py:format_instant_notification_email() */ - /* tag cloud */ - .tag-size-1 { - font-size:12px; + font-size: 12px; } .tag-size-2 { - font-size:13px; + font-size: 13px; } .tag-size-3 { - font-size:14px; + font-size: 14px; } .tag-size-4 { - font-size:15px; + font-size: 15px; } .tag-size-5 { - font-size:16px; + font-size: 16px; } .tag-size-6 { - font-size:17px; + font-size: 17px; } .tag-size-7 { - font-size:18px; + font-size: 18px; } .tag-size-8 { - font-size:19px; + font-size: 19px; } .tag-size-9 { - font-size:20px; + font-size: 20px; } .tag-size-10 { - font-size:21px; + font-size: 21px; } - -ul.tags, -ul.tags.marked-tags, -ul#related-tags { - list-style: none; - margin: 0; - padding: 0; - line-height: 170%; - display: block; +ul.tags, ul.tags.marked-tags, ul#related-tags { + list-style: none; + margin: 0; + padding: 0; + line-height: 170%; + display: block; } - ul.tags li { - float:left; - display: block; - margin: 0 5px 0 0; - padding: 0; - height:20px; + float: left; + display: block; + margin: 0 5px 0 0; + padding: 0; + height: 20px; } - .wildcard-tags { - clear: both; + clear: both; } - -ul.tags.marked-tags li, -.wildcard-tags ul.tags li { - margin-bottom: 5px; +ul.tags.marked-tags li, .wildcard-tags ul.tags li { + margin-bottom: 5px; } - #tagSelector div.inputs { - clear: both; - float: none; - margin-bottom:10px; + clear: both; + float: none; + margin-bottom: 10px; } - -.tags-page ul.tags li, -ul#ab-user-tags li { - width: 160px; +.tags-page ul.tags li, ul#ab-user-tags li { + width: 160px; + margin: 5px; } - ul#related-tags li { - margin: 0 5px 5px 0; - float: left; - clear: left; + margin: 0 5px 5px 0; + float: left; + clear: left; } - /* .tag-left and .tag-right are for the sliding doors decoration of tags */ - .tag-left { - background: url(../images/tag-right.png) no-repeat right center; - border: none; - cursor: pointer; - display: block; - float: left; - height: 20px; - margin: 0 5px 0 0; - padding: 0; + background: url(../images/tag-right.png) no-repeat right center; + border: none; + cursor: pointer; + display: block; + float: left; + height: 20px; + margin: 0 5px 0 0; + padding: 0; } - .tag-right { - background:url(../images/tag-left.png) no-repeat left center; - border: none; - display: block; - float: left; - height: 20px; - line-height: 20px; - font-weight: normal; - font-size: 11px; - padding: 0px 10px 0px 15px; - text-decoration: none; - text-align: center; - white-space: nowrap; - vertical-align: middle; - font-family:@trebuchet; - color:#717179; + background: url(../images/tag-left.png) no-repeat left center; + border: none; + display: block; + float: left; + height: 20px; + line-height: 20px; + font-weight: normal; + font-size: 11px; + padding: 0px 10px 0px 15px; + text-decoration: none; + text-align: center; + white-space: nowrap; + vertical-align: middle; + font-family: Arial; + color: #717179; } .deletable-tag { - margin-right: 3px; - white-space: nowrap; + margin-right: 3px; + white-space: nowrap; } - .deletable-tag .tag-right { - padding-right: 0px; - float: left; + padding-right: 0px; + float: left; } .deletable-tag.tag-left { - padding-right: 0px; + padding-right: 0px; } - -.tags a.tag-right, -.tags span.tag-right { - color: #585858; - text-decoration: none; - +.tags a.tag-right, .tags span.tag-right { + color: #585858; + text-decoration: none; } -.tags a:hover{ - color: #1A1A1A; +.tags a:hover { + color: #1A1A1A; } - .users-page h1, .tags-page h1 { - float: left; + float: left; } - .main-page h1 { - margin-right: 5px; + margin-right: 5px; } - span.delete-icon { - padding-left: 13px; - vertical-align: bottom; - background: url(../images/close-small-dark.png) bottom no-repeat; - cursor: default; + padding-left: 13px; + vertical-align: bottom; + background: url(../images/close-small-dark.png) bottom no-repeat; + cursor: default; } span.delete-icon:hover { - background: url(../images/close-small-dark.png) top no-repeat; + background: url(../images/close-small-dark.png) top no-repeat; } - .tags span.delete-icon { - float: left; - height: 20px; - width:8px; - margin: 0px 0 0 10px; - display: block; + float: left; + height: 20px; + width: 8px; + margin: 0px 0 0 10px; + display: block; } - .tag-number { - font-weight: normal; - float: left; - font-size:16px; - color:#5d5d5d; + font-weight: normal; + float: left; + font-size: 16px; + color: #5d5d5d; } - .badges .tag-number { - float: none; - display: inline; - padding-right: 15px; + float: none; + display: inline; + padding-right: 15px; } - -/* ----- Ask Question Form template----- */ - -#fmask{ - margin-bottom:30px; - width:100%; +/* ----- Ask and Edit Question Form template----- */ +.section-title { + color: #7ea9b3; + font-family: 'Yanone Kaffeesatz', sans-serif; + font-weight: bold; + font-size: 24px; } - -#askFormBar { - display:inline-block; - padding: 4px 7px 5px 0px; - margin-top:0px; - - p{ - margin:0 0 5px 0; - font-size:16px; - color:@info-text-dark; - line-height:1.2; - } - .questionTitleInput { - font-size: 24px; - line-height: 24px; - height: 36px; - margin: 0px; - padding: 0px 0 0 5px; - border:#cce6ec 3px solid; - width:725px; - } +.ask-body { + padding-right: 10px; } - -.ask-page{ - - div#question-list { - float: none; - border-bottom:#f0f0ec 1px solid; - float:left; - margin-bottom:10px; - - } - - div#question-list h2 { - font-size: 16px; - padding-bottom: 0; - color:@link; - border-top:#f0f0ec 1px solid; - border-left:#f0f0ec 1px solid; - height:30px; - line-height:30px; - font-weight:normal; - } - - div#question-list span { - width:28px; - height:26px; - line-height:26px; - text-align:center; - margin-right: 10px; - float:left; - display:block; - color:#fff; - background: #b8d0d5; - .rounded-corners(3px); - } - label{ - color:@info-text-dark; - font-size:15px; - } - - #id_tags{ - border:#cce6ec 3px solid; - height:25px; - padding-left:5px; - width:395px; - } +#fmask { + margin-bottom: 30px; + width: 100%; } - -.title-desc { - color: @info-text; - font-size: 15px; +#askFormBar { + display: inline-block; + padding: 4px 7px 5px 0px; + margin-top: 0px; +} +#askFormBar p { + margin: 0 0 5px 0; + font-size: 14px; + color: #525252; + line-height: 1.4; +} +#askFormBar .questionTitleInput { + font-size: 24px; + line-height: 24px; + height: 36px; + margin: 0px; + padding: 0px 0 0 5px; + border: #cce6ec 3px solid; + width: 725px; +} +.ask-page div#question-list, .edit-question-page div#question-list { + float: none; + border-bottom: #f0f0ec 1px solid; + float: left; + margin-bottom: 10px; +} +.ask-page div#question-list a, .edit-question-page div#question-list a { + line-height: 30px; +} +.ask-page div#question-list h2, .edit-question-page div#question-list h2 { + font-size: 13px; + padding-bottom: 0; + color: #1b79bd; + border-top: #f0f0ec 1px solid; + border-left: #f0f0ec 1px solid; + height: 30px; + line-height: 30px; + font-weight: normal; +} +.ask-page div#question-list span, .edit-question-page div#question-list span { + width: 28px; + height: 26px; + line-height: 26px; + text-align: center; + margin-right: 10px; + float: left; + display: block; + color: #fff; + background: #b8d0d5; + border-radius: 3px; + -ms-border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; +} +.ask-page label, .edit-question-page label { + color: #525252; + font-size: 13px; +} +.ask-page #id_tags, .edit-question-page #id_tags { + border: #cce6ec 3px solid; + height: 25px; + padding-left: 5px; + width: 395px; + font-size: 14px; } - -.ask-page input.submit, -.edit-question-page input.submit { - float: left; - background: url(../images/medium-button.png) top repeat-x; - height:34px; - border:0; - font-family:@yanone; - color:@button-label; - font-weight:normal; - font-size:21px; - margin-top:3px; - .rounded-corners(4px); - .box-shadow(1px, 1px, 2px, #636363); -} -.ask-page input.submit:hover, -.edit-question-page input.submit:hover{ - text-decoration:none; - background: url(../images/medium-button.png) bottom repeat-x; - .text-shadow(0px, 1px, 0px, #c6d9dd) -} -#editor { /*adjustment for editor preview*/ - font-size: 100%; - min-height: 200px; - line-height: 18px; - margin:0; - border-left:#cce6ec 3px solid; - border-bottom:#cce6ec 3px solid; - border-right:#cce6ec 3px solid; - border-top:0; - padding:10px; - margin-bottom:10px; - width:710px; +.title-desc { + color: #707070; + font-size: 13px; +} +#fmanswer input.submit, .ask-page input.submit, .edit-question-page input.submit { + float: left; + background: url(../images/medium-button.png) top repeat-x; + height: 34px; + border: 0; + font-family: 'Yanone Kaffeesatz', sans-serif; + color: #4a757f; + font-weight: normal; + font-size: 21px; + margin-top: 3px; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-box-shadow: 1px 1px 2px #636363; + -moz-box-shadow: 1px 1px 2px #636363; + box-shadow: 1px 1px 2px #636363; + margin-right: 7px; +} +#fmanswer input.submit:hover, .ask-page input.submit:hover, .edit-question-page input.submit:hover { + text-decoration: none; + background: url(../images/medium-button.png) bottom repeat-x; + text-shadow: 0px 1px 0px #c6d9dd; + -moz-text-shadow: 0px 1px 0px #c6d9dd; + -webkit-text-shadow: 0px 1px 0px #c6d9dd; +} +#editor { + /*adjustment for editor preview*/ + + font-size: 100%; + min-height: 200px; + line-height: 18px; + margin: 0; + border-left: #cce6ec 3px solid; + border-bottom: #cce6ec 3px solid; + border-right: #cce6ec 3px solid; + border-top: 0; + padding: 10px; + margin-bottom: 10px; + width: 710px; } - #id_title { - width: 100%; + width: 100%; } - .wmd-preview { - margin: 3px 0 5px 0; - padding: 6px; - background-color: #F5F5F5; - min-height: 20px; - overflow: auto; + margin: 3px 0 5px 0; + padding: 6px; + background-color: #F5F5F5; + min-height: 20px; + overflow: auto; + font-size: 13px; + font-family: Arial; +} +.wmd-preview p { + margin-bottom: 14px; + line-height: 1.4; + font-size: 14px; } - .wmd-preview pre { - background-color: #E7F1F8; - + background-color: #E7F1F8; } - .wmd-preview blockquote { - background-color: #eee; + background-color: #eee; } - .wmd-preview IMG { - max-width: 600px; + max-width: 600px; } - .preview-toggle { - width: 100%; - color: #b6a475; /*letter-spacing:1px;*/ - text-align: left; -} + width: 100%; + color: #b6a475; + /*letter-spacing:1px;*/ + text-align: left; +} .preview-toggle span:hover { - cursor: pointer; + cursor: pointer; } - .after-editor { - margin-top: 10px; + margin-top: 10px; } - .checkbox { - margin-left:5px; - font-weight:normal; - cursor:help + margin-left: 5px; + font-weight: normal; + cursor: help; } - .question-options { - margin-top: 1px; - float: left; - color: #666; - line-height: 13px; + margin-top: 1px; + color: #666; + line-height: 13px; + margin-bottom: 5px; } .question-options label { - vertical-align: text-bottom; + vertical-align: text-bottom; } - .edit-content-html { - border-top: 1px dotted #D8D2A9; - border-bottom: 1px dotted #D8D2A9; - margin: 5px 0 5px 0; + border-top: 1px dotted #D8D2A9; + border-bottom: 1px dotted #D8D2A9; + margin: 5px 0 5px 0; +} +.edit-question-page, #fmedit { + color: #525252; +} +.edit-question-page #id_revision, #fmedit #id_revision { + font-size: 14px; + margin-top: 5px; + margin-bottom: 5px; +} +.edit-question-page #id_title, #fmedit #id_title { + font-size: 24px; + line-height: 24px; + height: 36px; + margin: 0px; + padding: 0px 0 0 5px; + border: #cce6ec 3px solid; + width: 725px; + margin-bottom: 10px; +} +.edit-question-page #id_summary, #fmedit #id_summary { + border: #cce6ec 3px solid; + height: 25px; + padding-left: 5px; + width: 395px; + font-size: 14px; +} +.edit-question-page .title-desc, #fmedit .title-desc { + margin-bottom: 10px; } - /* ----- Question template ----- */ - -.question-page{ - - h1 a{ - color:@question-link; - font-size:30px; - font-weight:normal; - line-height:1; - } - - p.rss { - float:none; - clear:both; - padding: 3px 0 0 1px; - font-size: 14px; - } - - p.rss a { - padding-left: 18px; - vertical-align: top; - } +.question-page h1 { + padding-top: 0px; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.question-page h1 a { + color: #464646; + font-size: 30px; + font-weight: normal; + line-height: 1; +} +.question-page p.rss { + float: none; + clear: both; + padding: 3px 0 0 23px; + font-size: 15px; + width: 110px; + background-position: center left; + margin-left: 0px !important; +} +.question-page p.rss a { + font-family: 'Yanone Kaffeesatz', sans-serif; + vertical-align: top; +} +.question-page .question-content { + float: right; + width: 690px; + margin-bottom: 10px; +} +.question-page #question-table { + float: left; + border-top: #f0f0f0 1px solid; +} +.question-page #question-table, .question-page .answer-table { + margin: 6px 0 0px 0; + border-spacing: 0px; + width: 680px; + padding-right: 3px; +} +.question-page .answer-table { + margin-top: 0px; + border-bottom: 1px solid #D4D4D4; + float: left; +} +.question-page .answer-table td, .question-page #question-table td { + width: 20px; + vertical-align: top; +} +.question-page .question-body, .question-page .answer-body { + overflow: auto; + margin-top: 10px; + font-family: Arial; + color: #4b4b4b; +} +.question-page .question-body p, .question-page .answer-body p { + margin-bottom: 14px; + line-height: 1.4; + font-size: 14px; + padding: 0px 5px 5px 0px; +} +.question-page .question-body a, .question-page .answer-body a { + color: #1b79bd; +} +.question-page .question-body li, .question-page .answer-body li { + margin-bottom: 7px; +} +.question-page .question-body IMG, .question-page .answer-body IMG { + max-width: 600px; +} +.question-page .post-update-info-container { + float: right; + width: 175px; +} +.question-page .post-update-info { + background: #ffffff url(../images/background-user-info.png) repeat-x bottom; + float: right; + font-size: 9px; + font-family: Arial; + width: 158px; + padding: 4px; + margin: 0px 0px 5px 5px; + line-height: 14px; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + -webkit-box-shadow: 0px 2px 1px #bfbfbf; + -moz-box-shadow: 0px 2px 1px #bfbfbf; + box-shadow: 0px 2px 1px #bfbfbf; +} +.question-page .post-update-info p { + line-height: 13px; + font-size: 11px; + margin: 0 0 2px 1px; + padding: 0; +} +.question-page .post-update-info a { + color: #444; +} +.question-page .post-update-info .gravatar { + float: left; + margin-right: 4px; +} +.question-page .post-update-info p.tip { + color: #444; + line-height: 13px; + font-size: 10px; +} +.question-page .post-controls { + font-size: 11px; + line-height: 12px; + min-width: 200px; + padding-left: 5px; + text-align: right; + clear: left; + float: right; + margin-top: 10px; +} +.question-page .post-controls a { + color: #777; + padding: 0px 3px 3px 22px; + cursor: pointer; + border: none; + font-size: 12px; + font-family: Arial; + text-decoration: none; + height: 18px; + display: block; + float: right; + line-height: 18px; + margin-top: -2px; + margin-left: 4px; +} +.question-page .post-controls a:hover { + background-color: #f5f0c9; +} +.question-page .post-controls .sep { + color: #ccc; + float: right; + height: 18px; + font-size: 18px; +} +.question-page .post-controls .question-delete, .question-page .answer-controls .question-delete { + background: url(../images/delete.png) no-repeat center left; + padding-left: 16px; +} +.question-page .post-controls .question-flag, .question-page .answer-controls .question-flag { + background: url(../images/flag.png) no-repeat center left; +} +.question-page .post-controls .question-edit, .question-page .answer-controls .question-edit { + background: url(../images/edit2.png) no-repeat center left; +} +.question-page .post-controls .question-retag, .question-page .answer-controls .question-retag { + background: url(../images/retag.png) no-repeat center left; +} +.question-page .post-controls .question-close, .question-page .answer-controls .question-close { + background: url(../images/close.png) no-repeat center left; +} +.question-page .post-controls .permant-link, .question-page .answer-controls .permant-link { + background: url(../images/link.png) no-repeat center left; +} +.question-page .tabBar { + width: 100%; +} +.question-page #questionCount { + float: left; + font-family: 'Yanone Kaffeesatz', sans-serif; + line-height: 15px; +} +.question-page .question-img-upvote, +.question-page .question-img-downvote, +.question-page .answer-img-upvote, +.question-page .answer-img-downvote { + width: 25px; + height: 20px; + cursor: pointer; +} +.question-page .question-img-upvote, .question-page .answer-img-upvote { + background: url(../images/vote-arrow-up-new.png) no-repeat; +} +.question-page .question-img-downvote, .question-page .answer-img-downvote { + background: url(../images/vote-arrow-down-new.png) no-repeat; +} +.question-page .question-img-upvote:hover, +.question-page .question-img-upvote.on, +.question-page .answer-img-upvote:hover, +.question-page .answer-img-upvote.on { + background: url(../images/vote-arrow-up-on-new.png) no-repeat; +} +.question-page .question-img-downvote:hover, +.question-page .question-img-downvote.on, +.question-page .answer-img-downvote:hover, +.question-page .answer-img-downvote.on { + background: url(../images/vote-arrow-down-on-new.png) no-repeat; +} +.question-page .question-img-favorite:hover { + background: url(../images/vote-favorite-on.png); +} +.question-page div.comments { + padding: 0; +} +.question-page #comment-title { + font-weight: bold; + font-size: 23px; + color: #7ea9b3; + width: 200px; + float: left; + font-family: 'Yanone Kaffeesatz', sans-serif; +} +.question-page .comments { + font-size: 12px; + clear: both; +} +.question-page .comments div.controls { + clear: both; + float: left; + width: 100%; + margin: 3px 0 20px 5px; +} +.question-page .comments .controls a { + color: #988e4c; + padding: 0 3px 2px 22px; + font-family: Arial; + font-size: 13px; + background: url(../images/comment.png) no-repeat center left; +} +.question-page .comments .controls a:hover { + background-color: #f5f0c9; + text-decoration: none; +} +.question-page .comments .button { + color: #988e4c; + font-size: 11px; + padding: 3px; + cursor: pointer; +} +.question-page .comments a { + background-color: inherit; + color: #1b79bd; + padding: 0; +} +.question-page .comments form.post-comments { + margin: 3px 30px 4px 5px; +} +.question-page .comments textarea { + height: 42px; + width: 100%; + margin: 12px 0 5px 1px; + font-family: Arial; + outline: none; + overflow: auto; + font-size: 12px; + line-height: 140%; + padding-left: 2px; + padding-top: 4px; + border: #cce6ec 3px solid; +} +.question-page .comments input { + margin-left: 10px; + margin-top: 1px; + vertical-align: top; + width: 100px; +} +.question-page .comments button { + background: url(../images/small-button-blue.png) repeat-x top; + border: 0; + color: #4a757f; + font-size: 12px; + width: 95px; + font-weight: bold; + height: 24px; + margin-top: -2px; + cursor: pointer; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + text-shadow: 0px 1px 0px #e6f6fa; + -moz-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-box-shadow: 1px 1px 2px #808080; + -moz-box-shadow: 1px 1px 2px #808080; + box-shadow: 1px 1px 2px #808080; + float: left; +} +.question-page .comments button:hover { + background: url(../images/small-button-blue.png) bottom repeat-x; + text-shadow: 0px 1px 0px #c6d9dd; + -moz-text-shadow: 0px 1px 0px #c6d9dd; + -webkit-text-shadow: 0px 1px 0px #c6d9dd; +} +.question-page .comments .counter { + display: inline-block; + width: 245px; + float: right; + color: #b6a475 !important; + vertical-align: top; + font-family: Arial; + float: right; + text-align: right; +} +.question-page .comments .comment { + border-bottom: 1px solid #edeeeb; + margin: 0; + margin-top: 8px; + padding-bottom: 4px; + overflow: auto; + font-family: Arial; + font-size: 11px; + min-height: 25px; + background: url(../images/comment-background.png) bottom repeat-x; + border-radius: 5px; + -ms-border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -khtml-border-radius: 5px; +} +.question-page .comments div.comment:hover { + background-color: #efefef; +} +.question-page .comments a.author { + background-color: inherit; + color: #1b79bd; + padding: 0; +} +.question-page .comments a.author:hover { + text-decoration: underline; +} +.question-page .comments span.delete-icon { + background: url(../images/close-small.png) no-repeat; +} +.question-page .comments span.delete-icon:hover { + border: #BC564B 2px solid; + border-radius: 10px; + -ms-border-radius: 10px; + -moz-border-radius: 10px; + -webkit-border-radius: 10px; + -khtml-border-radius: 10px; +} +.question-page .comments .content { + margin-bottom: 7px; +} +.question-page .comments .comment-votes { + float: left; + width: 37px; + line-height: 130%; + padding: 6px 5px 6px 3px; +} +.question-page .comments .comment-body { + line-height: 1.3; + margin: 3px 26px 0 46px; + padding: 5px 3px; + color: #666; + font-size: 13px; +} +.question-page .comments .comment-body p { + font-size: 13px; + line-height: 1.3; + margin-bottom: 3px; + padding: 0; +} +.question-page .comments .comment-delete { + float: right; + width: 14px; + line-height: 130%; + padding: 8px 6px; +} +.question-page .comments .upvote { + margin: 0px; + padding-right: 17px; + padding-top: 2px; + text-align: right; + height: 20px; + font-size: 13px; + font-weight: bold; + color: #777; +} +.question-page .comments .upvote.upvoted { + color: #d64000; +} +.question-page .comments .upvote.hover { + background: url(../images/go-up-grey.png) no-repeat; + background-position: right 1px; +} +.question-page .comments .upvote:hover { + background: url(../images/go-up-orange.png) no-repeat; + background-position: right 1px; +} +.question-page .comments .help-text { + float: right; + text-align: right; + color: gray; + margin-bottom: 0px; + margin-top: 0px; + line-height: 50%; +} +.question-page #questionTools { + font-size: 22px; + margin-top: 11px; + text-align: left; +} +.question-page .question-status { + margin-top: 10px; + margin-bottom: 15px; + padding: 20px; + background-color: #fef7cc; + text-align: center; + border: #e1c04a 1px solid; +} +.question-page .question-status h3 { + font-size: 20px; + color: #707070; + font-weight: normal; +} +.question-page .vote-buttons { + float: left; + text-align: center; + padding-top: 2px; + margin: 3px 10px 0px 3px; +} +.question-page .vote-buttons IMG { + cursor: pointer; +} +.question-page .vote-number { + font-family: 'Yanone Kaffeesatz', sans-serif; + padding: 0px 0 5px 0; + font-size: 25px; + font-weight: bold; + color: #777; +} +.question-page .vote-buttons .notify-sidebar { + text-align: left; +} +.question-page .vote-buttons .notify-sidebar label { + vertical-align: top; +} +.question-page .tabBar-answer { + margin-bottom: 15px; + padding-left: 7px; + width: 723px; + margin-top: 10px; +} +.question-page .answer .vote-buttons { + float: left; +} +.question-page .accepted-answer { + background-color: #f7fecc; + border-bottom-color: #9BD59B; +} +.question-page .accepted-answer .vote-buttons { + width: 27px; + margin-right: 10px; +} +.question-page .answer .post-update-info a { + color: #444444; +} +.question-page .accepted-answer .comments { + background-color: #f1f6d4; +} +.question-page .answered { + background: #CCC; + color: #999; +} +.question-page .answered-accepted { + background: #DCDCDC; + color: #763333; +} +.question-page .answered-accepted strong { + color: #E1E818; +} +.question-page .answered-by-owner { + background: #F1F1FF; +} +.question-page .answered-by-owner .comments .button { + background-color: #E6ECFF; +} +.question-page .answered-by-owner .comments { + background-color: #E6ECFF; +} +.question-page .answered-by-owner .vote-buttons { + margin-right: 10px; +} +.question-page .answer-img-accept:hover { + background: url(../images/vote-accepted-on.png); +} +.question-page .answer-body a { + color: #1b79bd; +} +.question-page .answer-body li { + margin-bottom: 0.7em; +} +.question-page #fmanswer { + color: #707070; + line-height: 1.2; + margin-top: 10px; } - -.question-body, .answer-body { - min-height: 39px; - line-height: 20px; - overflow: auto; - width: 660px; - font-family:@trebuchet; - color:#4b4b4b; -} - -.question-body p, .answer-body p{ - font-size:13px; +.question-page #fmanswer p { + font-size: 13px; + line-height: 1.3; } -.question-body IMG, .answer-body IMG { - max-width: 600px; +.question-page #fmanswer h2 { + font-family: 'Yanone Kaffeesatz', sans-serif; + color: #7ea9b3; + font-size: 24px; } - - -#question-table, -.answer-table { - margin: 2px 0 10px 0; - border-spacing: 0px; - width: 100%; +.question-page #fmanswer label { + font-size: 13px; } - -.answer-table { - border-bottom: 1px solid #bbb; - clear: both; +.question-page .message { + padding: 5px; + margin: 0px 0 10px 0; } - -.answer-table td, -#question-table td { - width:30px; - vertical-align:top; -} - -#questionTools { - font-size: 22px; - margin-top: 11px; - text-align: left; -} - -/* ----- Footer links , check blocks/footer.html----- */ - -#ground { - width: 100%; - clear: both; - border-top: 1px solid #000; - padding: 6px 0 0 0; - background: @header-color; - font-size:16px; - - p { - margin-bottom:0; - } -} - -.footer-links { - color: #EEE; - text-align:left; - width:500px; - float:left; - a { - color: #e7e8a8; - } -} - -.powered-link{ - width:500px; - float:left; - text-align:left; - a{ - color:#8ebcc7; - } +.facebook-share.icon, +.twitter-share.icon, +.linkedin-share.icon, +.identica-share.icon { + background: url(../images/socialsprite.png) no-repeat; + display: block; + text-indent: -100em; + height: 25px; + width: 25px; + margin-bottom: 3px; +} +.facebook-share.icon:hover, +.twitter-share.icon:hover, +.linkedin-share.icon:hover, +.identica-share.icon:hover { + opacity: 0.8; + filter: alpha(opacity=80); } - -.copyright{ - color:#616161; - width:450px; - float:right; - text-align:right; - - a{ - color:#8ebcc7; - } - img.license-logo { - margin: 6px 0px 20px 10px; - float:right; - } +.facebook-share.icon { + background-position: -26px 0px; } - - -/* badges */ -a.medal { - font-size: 14px; - line-height: 250%; - font-weight: 800; - color: #333; - text-decoration: none; - background: url(../images/medala.gif) no-repeat; - border-left: 1px solid #EEE; - border-top: 1px solid #EEE; - border-bottom: 1px solid #CCC; - border-right: 1px solid #CCC; - padding: 4px 12px 4px 6px; +.identica-share.icon { + background-position: -78px 0px; } - -a:hover.medal { - color: #333; - text-decoration: none; - background: url(../images/medala_on.gif) no-repeat; - border-left: 1px solid #E7E296; - border-top: 1px solid #E7E296; - border-bottom: 1px solid #D1CA3D; - border-right: 1px solid #D1CA3D; +.twitter-share.icon { + margin-top: 10px; + background-position: 0px 0px; } - -.questions-related { - font-weight: 700; - word-wrap: break-word; +.linkedin-share.icon { + background-position: -52px 0px; +} +/* -----Content pages, Login, About, FAQ, Users----- */ +.openid-signin, .meta, .users-page { + font-size: 13px; + line-height: 1.3; + color: #525252; +} +.openid-signin p, .meta p, .users-page p { + font-size: 13px; + color: #707070; + line-height: 1.3; + font-family: Arial; + color: #525252; + margin-bottom: 12px; +} +.openid-signin h2, .meta h2, .users-page h2 { + color: #525252; + padding-left: 0px; + font-size: 16px; +} +.openid-signin #id_email, +.meta #id_email, +.users-page #id_email, +.openid-signin #id_name, +.meta #id_name, +.users-page #id_name { + border: #cce6ec 3px solid; + height: 25px; + padding-left: 5px; + width: 395px; + font-size: 14px; +} +.openid-signin textarea, .meta textarea, .users-page textarea { + border: #cce6ec 3px solid; + padding-left: 5px; + padding-top: 5px; + width: 395px; + font-size: 14px; +} +.openid-signin input.submit, .meta input.submit, .users-page input.submit { + background: url(../images/small-button-blue.png) repeat-x top; + border: 0; + color: #4a757f; + font-weight: bold; + font-size: 12px; + height: 24px; + margin-top: -2px; + cursor: pointer; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + text-shadow: 0px 1px 0px #e6f6fa; + -moz-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-box-shadow: 1px 1px 2px #808080; + -moz-box-shadow: 1px 1px 2px #808080; + box-shadow: 1px 1px 2px #808080; +} +.openid-signin input.submit:hover, .meta input.submit:hover, .users-page input.submit:hover { + background: url(../images/small-button-blue.png) repeat-x bottom; + text-decoration: none; +} +.openid-signin .cancel, .meta .cancel, .users-page .cancel { + background: url(../images/small-button-cancel.png) repeat-x top !important; + color: #525252 !important; +} +.openid-signin .cancel:hover, .meta .cancel:hover, .users-page .cancel:hover { + background: url(../images/small-button-cancel.png) repeat-x bottom !important; +} +#email-input-fs, +#local_login_buttons, +#password-fs, +#openid-fs { + margin-top: 10px; +} +#email-input-fs #id_email, +#local_login_buttons #id_email, +#password-fs #id_email, +#openid-fs #id_email, +#email-input-fs #id_username, +#local_login_buttons #id_username, +#password-fs #id_username, +#openid-fs #id_username, +#email-input-fs #id_password, +#local_login_buttons #id_password, +#password-fs #id_password, +#openid-fs #id_password, +#email-input-fs input, +#local_login_buttons input, +#password-fs input, +#openid-fs input { + font-size: 12px; + line-height: 20px; + height: 20px; + margin: 0px; + padding: 0px 0 0 5px; + border: #cce6ec 3px solid; + width: 200px; +} +#email-input-fs .submit-b, +#local_login_buttons .submit-b, +#password-fs .submit-b, +#openid-fs .submit-b { + background: url(../images/small-button-blue.png) repeat-x top; + border: 0; + color: #4a757f; + font-weight: bold; + font-size: 12px; + height: 24px; + margin-top: -2px; + cursor: pointer; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + text-shadow: 0px 1px 0px #e6f6fa; + -moz-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-box-shadow: 1px 1px 2px #808080; + -moz-box-shadow: 1px 1px 2px #808080; + box-shadow: 1px 1px 2px #808080; +} +#email-input-fs .submit-b:hover, +#local_login_buttons .submit-b:hover, +#password-fs .submit-b:hover, +#openid-fs .submit-b:hover { + background: url(../images/small-button-blue.png) repeat-x bottom; } - -.questions-related p { - line-height: 20px; - margin-bottom: 10px; - font-size: 100%; +.openid-input { + background: url(../images/openid.gif) no-repeat; + padding-left: 15px; + cursor: pointer; } - -.question-status { - margin-top: 10px; - margin-bottom:15px - padding: 20px; - background-color: #F5F5F5; - text-align: center; +.openid-login-input { + background-position: center left; + background: url(../images/openid.gif) no-repeat 0% 50%; + padding: 5px 5px 5px 15px; + cursor: pointer; + font-family: Trebuchet MS; + font-weight: 300; + font-size: 150%; + width: 500px; } - -.question-status h3 { - font-size: 125%; +.openid-login-submit { + height: 40px; + width: 80px; + line-height: 40px; + cursor: pointer; + border: 1px solid #777; + font-weight: bold; + font-size: 120%; +} +/* People page */ +.tabBar-user { + width: 375px; } - -.vote-buttons { - float: left; - text-align: center; - padding-top: 2px; +.user { + padding: 5px; + line-height: 140%; + width: 166px; + border: #eee 1px solid; + margin-bottom: 5px; + border-radius: 3px; + -ms-border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; +} +.user .user-micro-info { + color: #525252; } - -.vote-buttons IMG { - cursor: pointer; +.user ul { + margin: 0; + list-style-type: none; } - -.vote-buttons .button{ - -moz-border-radius: 10px; - margin-top: 20px; - border-radius: 10px; - height: 20px; - width: 80px; - border-style: solid; - border-width: 1px; - padding: 8px; - float:left; +.user .thumb { + clear: both; + float: left; + margin-right: 4px; + display: inline; } - -.vote-buttons .followed{ - font-color: #000; - font-style:normal; - background: #cccccc; +/* tags page */ +.tabBar-tags { + width: 270px; + margin-bottom: 15px; } - -.vote-buttons .followed div{ - font-weight: normal; +/* badges page */ +a.medal { + font-size: 17px; + line-height: 250%; + margin-right: 5px; + color: #333; + text-decoration: none; + background: url(../images/medala.gif) no-repeat; + border-left: 1px solid #EEE; + border-top: 1px solid #EEE; + border-bottom: 1px solid #CCC; + border-right: 1px solid #CCC; + padding: 4px 12px 4px 6px; } - -.vote-buttons .followed div.unfollow{ - display:none; +a:hover.medal { + color: #333; + text-decoration: none; + background: url(../images/medala_on.gif) no-repeat; + border-left: 1px solid #E7E296; + border-top: 1px solid #E7E296; + border-bottom: 1px solid #D1CA3D; + border-right: 1px solid #D1CA3D; +} +#award-list .user { + float: left; + margin: 5px; +} +/* profile page */ +.tabBar-profile { + width: 100%; + margin-bottom: 15px; + float: left; +} +.user-profile-page { + font-size: 13px; + color: #525252; +} +.user-profile-page p { + font-size: 13px; + line-height: 1.3; + color: #525252; +} +.user-profile-page .avatar img { + border: #eee 1px solid; + padding: 5px; +} +.user-profile-page h2 { + padding: 10px 0px 10px 0px; + font-family: 'Yanone Kaffeesatz', sans-serif; } - -.vote-buttons .followed:hover{ - color: #fff; - background: #8b0000; +.user-details { + font-size: 13px; } - -.vote-buttons .followed:hover div{ - display:none; +.user-details h3 { + font-size: 16px; } - -.vote-buttons .followed:hover div.unfollow{ - display:inline; - font-weight: bold; +.user-about { + background-color: #EEEEEE; + height: 200px; + line-height: 20px; + overflow: auto; + padding: 10px; + width: 90%; +} +.user-about p { + font-size: 13px; +} +.follow-toggle, .submit { + border: 0 !important; + color: #4a757f; + font-weight: bold; + font-size: 12px; + height: 26px; + line-height: 26px; + margin-top: -2px; + font-size: 15px; + cursor: pointer; + font-family: 'Yanone Kaffeesatz', sans-serif; + background: url(../images/small-button-blue.png) repeat-x top; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + text-shadow: 0px 1px 0px #e6f6fa; + -moz-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-text-shadow: 0px 1px 0px #e6f6fa; + -webkit-box-shadow: 1px 1px 2px #808080; + -moz-box-shadow: 1px 1px 2px #808080; + box-shadow: 1px 1px 2px #808080; +} +.follow-toggle:hover, .submit:hover { + background: url(../images/small-button-blue.png) repeat-x bottom; + text-decoration: none !important; +} +.follow-toggle .follow { + font-color: #000; + font-style: normal; +} +.follow-toggle .unfollow div.unfollow-red { + display: none; +} +.follow-toggle .unfollow:hover div.unfollow-red { + display: inline; + color: #fff; + font-weight: bold; + color: #A05736; +} +.follow-toggle .unfollow:hover div.unfollow-green { + display: none; } - -.vote-buttons .follow{ - background: #cccccc; +.count { + font-family: 'Yanone Kaffeesatz', sans-serif; + font-size: 200%; + font-weight: 700; + color: #777777; } +.scoreNumber { + font-family: 'Yanone Kaffeesatz', sans-serif; + font-size: 35px; + font-weight: 800; + color: #777; + line-height: 40px; + /*letter-spacing:0px*/ -.vote-buttons .follow:hover{ - background: #234f32; - color: #fff; - font-weight: bold; + margin-top: 3px; } - -.vote-number { - font-family: Arial; - padding: 0px 0 3px 0; - font-size: 140%; - font-weight: bold; - color: #777; +.vote-count { + font-family: Arial; + font-size: 160%; + font-weight: 700; + color: #777; } - -.vote-buttons .notify-sidebar { - text-align: left; +.answer-summary { + display: block; + clear: both; + padding: 3px; } -.vote-buttons .notify-sidebar label { - vertical-align: top; +.answer-votes { + background-color: #EEEEEE; + color: #555555; + float: left; + font-family: Arial; + font-size: 15px; + font-weight: bold; + height: 17px; + padding: 2px 4px 5px; + text-align: center; + text-decoration: none; + width: 20px; + margin-right: 10px; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; } - -.question-img-upvote:hover { - background: url(../images/vote-arrow-up-on.png) +.karma-summary { + padding: 5px; + font-size: 13px; } - -.question-img-downvote:hover { - background: url(../images/vote-arrow-down-on.png) +.karma-summary h3 { + text-align: center; + font-weight: bold; + padding: 5px; } - -.question-img-favorite:hover { - background: url(../images/vote-favorite-on.png) +.karma-diagram { + width: 477px; + height: 300px; + float: left; + margin-right: 10px; } - -.favorite-number { - padding: 5px 0 0 10px; - font-size: 100%; - font-family: Arial; - font-weight: bold; - color: #777; - text-align: left; +.karma-details { + float: right; + width: 450px; + height: 250px; + overflow-y: auto; + word-wrap: break-word; } - -.notify-me { - float: left; +.karma-details p { + margin-bottom: 10px; } - -.offensive-flag a { - color: #777; - padding: 3px; - cursor: pointer; +.karma-gained { + font-weight: bold; + background: #eee; + width: 25px; + margin-right: 5px; + color: green; + padding: 3px; + display: block; + float: left; + text-align: center; + border-radius: 3px; + -ms-border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; } - -.offensive-flag a:hover { - background-color: #777; - text-decoration: none; - color: #fff; +.karma-lost { + font-weight: bold; + background: #eee; + width: 25px; + color: red; + padding: 3px; + display: block; + margin-right: 5px; + float: left; + text-align: center; + border-radius: 3px; + -ms-border-radius: 3px; + -moz-border-radius: 3px; + -webkit-border-radius: 3px; + -khtml-border-radius: 3px; } - -.linksopt a { - color: #777; - padding: 3px; - cursor: pointer; +.submit-row { + margin-bottom: 10px; } - -.linksopt a:hover { - background-color: #777; - text-decoration: none; - color: #fff; +/*----- Revision pages ----- */ +.revision { + margin: 10px 0 10px 0; + font-size: 13px; + color: #525252; } - -.post-controls a { - color: #777; - padding: 3px; - cursor: pointer; - border: none; - background: none; - text-decoration: none; +.revision p { + font-size: 13px; + line-height: 1.3; + color: #525252; } - -.post-controls a:hover { - background-color: #777; - color: #fff; +.revision h3 { + font-family: 'Yanone Kaffeesatz', sans-serif; + font-size: 21px; + padding-left: 0px; } - -.post-controls .sep { - color: #ccc; +.revision .header { + background-color: #F5F5F5; + padding: 5px; + cursor: pointer; } - -.comments { - font-size: 12px; - width: 650px; - clear: both; +.revision .author { + background-color: #e9f3f5; } - -.comments .comment { - border-top: 1px dotted #cccccc; - margin: 0; - overflow: auto; +.revision .summary { + padding: 5px 0 10px 0; } - -.comments .content { - margin-bottom: 7px; +.revision .summary span { + background-color: #fde785; + padding: 6px; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; + display: inline; + -webkit-box-shadow: 1px 1px 4px #cfb852; + -moz-box-shadow: 1px 1px 4px #cfb852; + box-shadow: 1px 1px 4px #cfb852; } - -.comments div.comment { - min-height: 25px; +.revision .answerbody { + padding: 10px 0 5px 10px; } - -.comments div.comment:hover { - background-color: #eee; +.revision .revision-mark { + width: 150px; + text-align: left; + display: inline-block; + font-size: 11px; + overflow: hidden; } - -div.comment .comment-votes { - float: left; - width: 37px; - line-height: 130%; - padding: 6px 5px 6px 3px; +.revision .revision-mark .gravatar { + float: left; + margin-right: 4px; + padding-top: 5px; } - -div.comment .comment-body { - line-height: 140%; - margin: 3px 26px 0 46px; - padding: 5px 3px; - color: #666; +.revision .revision-number { + font-size: 300%; + font-weight: bold; + font-family: sans-serif; } - -div.comment .comment-body p{ - font-size:inherit; - margin-bottom: 3px; - padding: 0; +del, del .post-tag { + color: #C34719; } - -div.comment .comment-delete { - float: right; - width: 14px; - line-height: 130%; - padding: 8px 6px; +ins .post-tag, ins p, ins { + background-color: #E6F0A2; } - -div.comment .upvote { - margin: 0px; - padding-right: 17px; - padding-top: 2px; - text-align: right; - height: 20px; - font-size: 13px; - font-weight: bold; - color: #777; +/* ----- Red Popup notification ----- */ +.vote-notification { + z-index: 1; + cursor: pointer; + display: none; + position: absolute; + font-family: Arial; + font-size: 14px; + font-weight: normal; + color: white; + background-color: #8e0000; + text-align: center; + padding-bottom: 10px; + -webkit-box-shadow: 0px 2px 4px #370000; + -moz-box-shadow: 0px 2px 4px #370000; + box-shadow: 0px 2px 4px #370000; + border-radius: 4px; + -ms-border-radius: 4px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -khtml-border-radius: 4px; +} +.vote-notification h3 { + background: url(../images/notification.png) repeat-x top; + padding: 10px 10px 10px 10px; + font-size: 13px; + margin-bottom: 5px; + border-top: #8e0000 1px solid; + color: #fff; + font-weight: normal; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; } - -div.comment .upvote.upvoted { - color: #d64000; +.vote-notification a { + color: #fb7321; + text-decoration: underline; + font-weight: bold; } - -div.comment .upvote.hover { - background: url(../images/go-up-grey.png) no-repeat; - background-position: right 1px; +/* ----- Footer links , check blocks/footer.html----- */ +#ground { + width: 100%; + clear: both; + border-top: 1px solid #000; + padding: 6px 0 0 0; + background: #16160f; + font-size: 16px; + font-family: 'Yanone Kaffeesatz', sans-serif; } - -div.comment .upvote:hover { - background: url(../images/go-up-orange.png) no-repeat; - background-position: right 1px; +#ground p { + margin-bottom: 0; } - -.comments div.controls { - clear: both; - background: url(../images/gray-up-arrow-h18px.png) no-repeat; - width: 100%; - padding-left: 12px; - margin: 3px 0 20px 5px; +.footer-links { + color: #EEE; + text-align: left; + width: 500px; + float: left; } - -.comments form.post-comments { - width: 560px; - margin: 3px 30px 4px 45px; +.footer-links a { + color: #e7e8a8; } - -.comments textarea { - display: block; - height: 42px; - width: 572px; - margin: 6px 0 5px 1px; - font-family: sans-serif; - outline: none; - overflow:auto; - font-size: 12px; - line-height: 140%; - padding-left:2px; +.powered-link { + width: 500px; + float: left; + text-align: left; } - -.comments input { - margin-left: 10px; - margin-top: 1px; - vertical-align: top; - width: 100px; +.powered-link a { + color: #8ebcc7; } - -.comments .counter { - display: inline-block; - width: 245px; - vertical-align: top; +.copyright { + color: #616161; + width: 450px; + float: right; + text-align: right; } - -.comments .controls a { - color: #888888; - padding: 0 3px 2px; +.copyright a { + color: #8ebcc7; } - -.comments .controls a:hover { - background-color: #777777; - color: white; - text-decoration: none; +.copyright img.license-logo { + margin: 6px 0px 20px 10px; + float: right; } - -.comments .help-text{ - float: right; - text-align:right; - color: gray; - margin-bottom: 0px; - margin-top: 0px; - line-height: 50%; +.notify-me { + float: left; } - span.text-counter { - margin-right: 20px; + margin-right: 20px; } - span.form-error { - color: #990000; - font-weight: normal; - margin-left: 5px; + color: #990000; + font-weight: normal; + margin-left: 5px; } - p.form-item { - margin: 0px; -} - -div.comments { - padding: 0; -} - -.comments .button { - color: black; - font-size: 11px; - background: #eeeeee; - padding: 3px; - cursor: pointer; -} - -.comment a { - background-color: inherit; - color: blue; - padding: 0; -} - -.comment a.author, a.author:hover { - background-color: inherit; - color: blue; - padding: 0; -} - -.comment a.author:hover { - text-decoration: underline; + margin: 0px; } - -.accepted-answer { - background-color: #EBFFE6; - border-bottom-color: #9BD59B; -} - -.accepted-answer .comments .button { - background-color: #CCFFBF; -} - -.accepted-answer .comments { - background-color: #CCFFBF; -} - -.answered { - background: #CCC; - color: #999; -} - -.answered-accepted { - background: #CCC; - color: #763333; -} - -.answered-by-owner { - background: #E9E9FF; -} - -.answered-by-owner .comments .button { - background-color: #E6ECFF; -} - -.answered-by-owner .comments { - background-color: #E6ECFF; -} - -.answered-accepted strong { - color: #E1E818; -} - -.answer-img-accept:hover { - background: url(../images/vote-accepted-on.png) -} - .deleted { - background: #F4E7E7 none repeat scroll 0 0; + background: #F4E7E7 none repeat scroll 0 0; } - - - - /* openid styles */ .form-row { - line-height: 25px; + line-height: 25px; } - table.form-as-table { - margin-top: 5px; + margin-top: 5px; } - table.form-as-table ul { - list-style-type: none; - display: inline; + list-style-type: none; + display: inline; } - table.form-as-table li { - display: inline; + display: inline; } - table.form-as-table td { - text-align: right; + text-align: right; } - table.form-as-table th { - text-align: left; - font-weight: normal; + text-align: left; + font-weight: normal; } - table.ab-subscr-form { - width: 45em; + width: 45em; } - table.ab-tag-filter-form { - width: 45em; + width: 45em; } - .submit-row { - line-height: 30px; - padding-top: 10px; - display: block; - clear: both; + line-height: 30px; + padding-top: 10px; + display: block; + clear: both; } - .errors { - line-height: 20px; - color: red; + line-height: 20px; + color: red; } - .error { - color: darkred; - margin: 0; - font-size: 10px; + color: darkred; + margin: 0; + font-size: 10px; } - label.retag-error { - color: darkred; - padding-left: 5px; - font-size: 10px; + color: darkred; + padding-left: 5px; + font-size: 10px; } - .fieldset { - border: none; - margin-top: 10px; - padding: 10px; + border: none; + margin-top: 10px; + padding: 10px; } - -.openid-input { - background: url(../images/openid.gif) no-repeat; - padding-left: 15px; - cursor: pointer; -} - -.openid-login-input { - background-position: center left; - background: url(../images/openid.gif) no-repeat 0% 50%; - padding: 5px 5px 5px 15px; - cursor: pointer; - font-family: Trebuchet MS; - font-weight: 300; - font-size: 150%; - width: 500px; -} - -.openid-login-submit { - height: 40px; - width: 80px; - line-height: 40px; - cursor: pointer; - border: 1px solid #777; - font-weight: bold; - font-size: 120%; -} - span.form-error { - color: #990000; - font-size: 90%; - font-weight: normal; - margin-left: 5px; -} - -.revision { - margin: 10px 0 10px 0; - width: 100%; - font-size: 13px; -} - -.revision .header { - background-color: #eee; - padding: 5px; - cursor: pointer; -} - -.revision .author { - background-color: #E9E9FF; -} - -.revision .summary { - padding: 5px 0 10px 0; -} - -.revision .summary span { - background-color: yellow; - padding-left: 3px; - padding-right: 3px; - display: inline; -} - -.revision h1 { - font-size: 130%; - font-weight: 600; - padding: 15px 0 15px 0; + color: #990000; + font-size: 90%; + font-weight: normal; + margin-left: 5px; } - -.revision-mark { - width: 200px; - text-align: left; - display: inline-block; - font-size: 90%; - overflow: hidden; -} - -.revision-number { - font-size: 300%; - font-weight: bold; - font-family: sans-serif; -} - -.revision .answerbody { - padding: 10px 0 5px 10px; -} - -/* Revision pages */ -del { - color: #FF5F5F; -} - -del .post-tag { - color: #FF5F5F; -} - -ins { - background-color: #97ff97; -} - -ins p{ - background-color: #97ff97; -} - -ins .post-tag { - background-color: #97ff97; -} - -/*用户资料页面*/ -.count { - font-family: Arial; - font-size: 200%; - font-weight: 700; - color: #777 -} - -.scoreNumber { - font-family: Arial; - font-size: 35px; - font-weight: 800; - color: #777; - line-height: 40px; /*letter-spacing:0px*/ - margin-top: 3px; -} - -.user-details { - font-size: 13px; -} - -.user-about { - background-color: #EEEEEE; - height: 200px; - line-height: 20px; - overflow: auto; - padding: 10px; - width: 90%; -} - /* .favorites-count-off { color: #919191; @@ -2017,813 +2491,527 @@ ins .post-tag { text-align: center; } */ - /* todo: get rid of this in html */ .favorites-empty { - width: 32px; - height: 45px; - float: left; + width: 32px; + height: 45px; + float: left; } - .user-info-table { - margin-bottom: 10px; - border-spacing: 0; + margin-bottom: 10px; + border-spacing: 0; } - /* todo: remove this hack? */ .user-stats-table .narrow { - width: 660px; + width: 660px; } - .narrow .summary h3 { - padding: 0px; - margin: 0px; + padding: 0px; + margin: 0px; } - .relativetime { - font-weight: bold; - text-decoration: none; + font-weight: bold; + text-decoration: none; } - .narrow .tags { - float: left; + float: left; } - -.answer-summary { - display: block; - clear: both; - padding: 3px; -} - -.answer-votes { - background-color: #EEEEEE; - color: #555555; - float: left; - font-family: Arial; - font-size: 110%; - font-weight: bold; - height: 15px; - padding: 4px 4px 5px; - text-align: center; - text-decoration: none; - width: 20px; - margin-right: 10px; -} - -.vote-count { - font-family: Arial; - font-size: 160%; - font-weight: 700; - color: #777; -} - /* todo: make these more semantic */ .user-action-1 { - font-weight: bold; - color: #333; + font-weight: bold; + color: #333; } - .user-action-2 { - font-weight: bold; - color: #CCC; + font-weight: bold; + color: #CCC; } - .user-action-3 { - color: #333; + color: #333; } - .user-action-4 { - color: #333; + color: #333; } - .user-action-5 { - color: darkred; + color: darkred; } - .user-action-6 { - color: darkred; + color: darkred; } - .user-action-7 { - color: #333; + color: #333; } - .user-action-8 { - padding: 3px; - font-weight: bold; - background-color: #CCC; - color: #763333; + padding: 3px; + font-weight: bold; + background-color: #CCC; + color: #763333; } - .revision-summary { - background-color: #FFFE9B; - padding: 2px; + background-color: #FFFE9B; + padding: 2px; } - .question-title-link a { - font-weight: bold; - color: #0077CC; + font-weight: bold; + color: #0077CC; } - .answer-title-link a { - color: #333; + color: #333; } - /* todo: make these more semantic */ .post-type-1 a { - font-weight: bold; - + font-weight: bold; } - .post-type-3 a { - font-weight: bold; - + font-weight: bold; } - .post-type-5 a { - font-weight: bold; + font-weight: bold; } - .post-type-2 a { - color: #333; + color: #333; } - .post-type-4 a { - color: #333; + color: #333; } - .post-type-6 a { - color: #333; + color: #333; } - .post-type-8 a { - color: #333; + color: #333; } - .hilite { - background-color: #ff0; + background-color: #ff0; } - .hilite1 { - background-color: #ff0; + background-color: #ff0; } - .hilite2 { - background-color: #f0f; + background-color: #f0f; } - .hilite3 { - background-color: #0ff; + background-color: #0ff; } - .gold, .badge1 { - color: #FFCC00; + color: #FFCC00; } - .silver, .badge2 { - color: #CCCCCC; + color: #CCCCCC; } - .bronze, .badge3 { - color: #CC9933; + color: #CC9933; } - .score { - font-weight: 800; - color: #333; + font-weight: 800; + color: #333; } - - a.comment { - background: #EEE; - color: #993300; - padding: 5px; + background: #EEE; + color: #993300; + padding: 5px; } - a.offensive { - color: #999; -} - -.user { - padding: 5px; - line-height: 140%; - width: 170px; -} - -.user ul { - margin: 0; - list-style-type: none; -} - -.user .thumb { - clear: both; - float: left; - margin-right: 4px; - display: inline; -} - -.message { - padding: 5px; - margin: 10px 0 10px 0; - background-color: #eee; - border: 1px solid #aaaaaa; + color: #999; } - .message h1 { - padding-top: 0px; - font-size: 15px; + padding-top: 0px; + font-size: 15px; } - .message p { - margin-bottom: 0px; + margin-bottom: 0px; } - p.space-above { - margin-top: 10px; + margin-top: 10px; } - .warning { - color: red; + color: red; } - - - button::-moz-focus-inner { - padding:0; - border:none; + padding: 0; + border: none; } .submit { - cursor: pointer; /*letter-spacing:1px;*/ - background-color: #D4D0C8; - height: 30px; - border: 1px solid #777777; /* width:100px; */ - font-weight: bold; - font-size: 120%; -} + cursor: pointer; + /*letter-spacing:1px;*/ + + background-color: #D4D0C8; + height: 30px; + border: 1px solid #777777; + /* width:100px; */ + font-weight: bold; + font-size: 120%; +} .submit:hover { - text-decoration: underline; + text-decoration: underline; } - .submit.small { - margin-right:5px; - height:20px; - font-weight:normal; - font-size:12px; - padding:1px 5px; + margin-right: 5px; + height: 20px; + font-weight: normal; + font-size: 12px; + padding: 1px 5px; } .submit.small:hover { - text-decoration:none; + text-decoration: none; } .question-page a.submit { - display: -moz-inline-stack; - display: inline-block; - line-height: 30px; - padding: 0 5px; - *display: inline; + display: -moz-inline-stack; + display: inline-block; + line-height: 30px; + padding: 0 5px; + *display: inline; } - -.ask-body { - padding-right: 10px; -} - - .noscript { - position: fixed; - top: 0px; - left: 0px; - width: 100%; - z-index: 100; - padding: 5px 0; - text-align: center; - font-family: sans-serif; - font-size: 120%; - font-weight: Bold; - color: #FFFFFF; - background-color: #AE0000; + position: fixed; + top: 0px; + left: 0px; + width: 100%; + z-index: 100; + padding: 5px 0; + text-align: center; + font-family: sans-serif; + font-size: 120%; + font-weight: Bold; + color: #FFFFFF; + background-color: #AE0000; } - .big { - font-size: 15px; + font-size: 14px; } - .strong { - font-weight: bold; + font-weight: bold; } +.orange { + /* used in django.po */ -.orange {/* used in django.po */ - color: #d64000; - font-weight: bold; + color: #d64000; + font-weight: bold; } - .grey { - color: #808080; + color: #808080; } - .about div { - padding: 10px 5px 10px 5px; - border-top: 1px dashed #aaaaaa; + padding: 10px 5px 10px 5px; + border-top: 1px dashed #aaaaaa; } - .highlight { - background-color: #FFF8C6; + background-color: #FFF8C6; } - .nomargin { - margin: 0; + margin: 0; } - .margin-bottom { - margin-bottom: 10px; + margin-bottom: 10px; } - .margin-top { - margin-top: 10px; + margin-top: 10px; } - .inline-block { - display: inline-block; + display: inline-block; } - .action-status { - margin: 0; - border: none; - text-align: center; - line-height: 10px; - font-size: 12px; - padding: 0; + margin: 0; + border: none; + text-align: center; + line-height: 10px; + font-size: 12px; + padding: 0; } - .action-status span { - padding: 3px 5px 3px 5px; - background-color: #fff380; /* nice yellow */ - font-weight: normal; - -moz-border-radius: 5px; - -khtml-border-radius: 5px; - -webkit-border-radius: 5px; -} + padding: 3px 5px 3px 5px; + background-color: #fff380; + /* nice yellow */ + font-weight: normal; + -moz-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-border-radius: 5px; +} .list-table td { - vertical-align: top; + vertical-align: top; } - /* these need to go */ table.form-as-table .errorlist { - display: block; - margin: 0; - padding: 0 0 0 5px; - text-align: left; - font-size: 10px; - color: darkred; + display: block; + margin: 0; + padding: 0 0 0 5px; + text-align: left; + font-size: 10px; + color: darkred; } - table.form-as-table input { - display: inline; - margin-left: 4px; + display: inline; + margin-left: 4px; } - table.form-as-table th { - vertical-align: bottom; - padding-bottom: 4px; + vertical-align: bottom; + padding-bottom: 4px; } - .form-row-vertical { - margin-top: 8px; - display: block; + margin-top: 8px; + display: block; } - .form-row-vertical label { - margin-bottom: 3px; - display: block; + margin-bottom: 3px; + display: block; } - /* above stuff needs to go */ .text-align-right { - text-align: center; + text-align: center; } - ul.form-horizontal-rows { - list-style: none; - margin: 0; + list-style: none; + margin: 0; } - ul.form-horizontal-rows li { - position: relative; - height: 40px; + position: relative; + height: 40px; } - ul.form-horizontal-rows label { - display: inline-block; + display: inline-block; } - ul.form-horizontal-rows ul.errorlist { - list-style: none; - color: darkred; - font-size: 10px; - line-height: 10px; - position: absolute; - top: 2px; - left: 180px; - text-align: left; - margin: 0; + list-style: none; + color: darkred; + font-size: 10px; + line-height: 10px; + position: absolute; + top: 2px; + left: 180px; + text-align: left; + margin: 0; } - ul.form-horizontal-rows ul.errorlist li { - height: 10px; + height: 10px; } - ul.form-horizontal-rows label { - position: absolute; - left: 0px; - bottom: 6px; - margin: 0px; - line-height: 12px; - font-size: 12px; + position: absolute; + left: 0px; + bottom: 6px; + margin: 0px; + line-height: 12px; + font-size: 12px; } - ul.form-horizontal-rows li input { - position: absolute; - bottom: 0px; - left: 180px; - margin: 0px; + position: absolute; + bottom: 0px; + left: 180px; + margin: 0px; } - .narrow .summary { - float: left; + float: left; } - .user-profile-tool-links { - font-weight: bold; - vertical-align: top; -} - -.post-controls, .post-tags { - font-size: 11px; - line-height: 12px; - min-width: 200px; - padding-left: 5px; - margin-bottom: 5px; -} - -.post-controls { - clear: left; - float: left; + font-weight: bold; + vertical-align: top; } - ul.post-tags { - margin-left: 7px; + margin-left: 7px; } ul.post-tags li { - margin-top: 4px; - margin-bottom: 3px; + margin-top: 4px; + margin-bottom: 3px; } - ul.post-retag { - margin-bottom:0px; - margin-left:5px; + margin-bottom: 0px; + margin-left: 5px; } - #question-controls .tags { - margin: 0 0 3px 0; -} - -.post-update-info-container { - float: right; - min-width: 85px; -} - -.post-update-info { - display: inline-block; - float: right; - font-size: 11px; - width: 190px; - margin-bottom: 5px; - line-height: 14px -} - -.post-update-info p { - line-height: 13px; - font-size: 11px; - margin: 0 0 2px 1px; - padding: 0; -} - -.post-update-info .gravatar { - float: left; - margin-right: 4px; -} - - -.post-update-info p.tip { - color: #444; + margin: 0 0 3px 0; } - #tagSelector { - padding-bottom: 2px; - margin-bottom: 0; + padding-bottom: 2px; + margin-bottom: 0; } - #related-tags { - padding-left: 3px; + padding-left: 3px; } - #hideIgnoredTagsControl { - margin: 5px 0 0 0; + margin: 5px 0 0 0; } - #hideIgnoredTagsControl label { - font-size: 12px; - color: #666; + font-size: 12px; + color: #666; } - #hideIgnoredTagsCb { - margin: 0 2px 0 1px; + margin: 0 2px 0 1px; } - #recaptcha_widget_div { - width: 318px; - float: left; - clear: both; + width: 318px; + float: left; + clear: both; } - p.signup_p { - margin: 20px 0px 0px 0px; + margin: 20px 0px 0px 0px; } - .simple-subscribe-options ul { - list-style: none; - list-style-position: outside; - margin: 0; + list-style: none; + list-style-position: outside; + margin: 0; } - /* a workaround to set link colors correctly */ -.answer-body a { - color:#0000ff; -} -.question-body a { - color:#0000ff; -} -.question-body li { - margin-bottom:0.7em; -} -.answer-body li { - margin-bottom:0.7em; -} .wmd-preview a { - color:#0000ff; + color: #1b79bd; } .wmd-preview li { - margin-bottom:0.7em; -} - -.karma-summary { - padding:5px; - font-size:13px; -} - -.karma-summary h3 { - text-align: center; - font-weight: bold; - padding:5px; + margin-bottom: 7px; + font-size: 14px; } - -.karma-diagram { - width:377px; - height:300px; - float:left; - margin-right:10px; -} - -.karma-details { - float:right; - width:300px; - height:250px; - overflow-y:auto; - word-wrap:break-word; -} - -.karma-gained { - font-weight:bold; - background:#eee; - width:20px; - color:green; - padding:5px; -} - -.karma-lost { - font-weight:bold; - background:#eee; - width:20px; - color:red; - padding:5px; -} - .search-result-summary { - font-weight: bold; - font-size:18px; - line-height:22px; - margin:0px 0px 0px 0px; - padding:2px 0 0 0; - float: left; + font-weight: bold; + font-size: 18px; + line-height: 22px; + margin: 0px 0px 0px 0px; + padding: 2px 0 0 0; + float: left; } - -.faq-rep-item { - text-align:right; - padding-right:5px; +.faq-rep-item { + text-align: right; + padding-right: 5px; } - - .user-info-table .gravatar { - margin:0; -} - -.vote-notification { - z-index: 1; - cursor: pointer; - display: none; - position: absolute; - padding: 15px; - color: white; - background-color: darkred; - text-align: center; + margin: 0; } - -.vote-notification a { - color: white; - text-decoration: underline; -} - #responses { - clear:both; - line-height:18px; - margin-bottom:15px; + clear: both; + line-height: 18px; + margin-bottom: 15px; } - #responses div.face { - float:left; - text-align: center; - width: 54px; - padding: 3px; - overflow:hidden; + float: left; + text-align: center; + width: 54px; + padding: 3px; + overflow: hidden; } - .response-parent { - margin-top: 18px; + margin-top: 18px; } - -.response-parent strong{ - font-size: 20px; +.response-parent strong { + font-size: 20px; } - .re { - min-height: 57px; - clear: both; - margin-top: 10px; + min-height: 57px; + clear: both; + margin-top: 10px; } - #responses input { - float:left; + float: left; } #re_tools { - margin-bottom:10px; + margin-bottom: 10px; } #re_sections { - margin-bottom:6px; + margin-bottom: 6px; } #re_sections .on { - font-weight:bold; + font-weight: bold; } - .avatar-page ul { - list-style: none; + list-style: none; } .avatar-page li { - display: inline; + display: inline; } .user-profile-page .avatar p { - margin-bottom: 0px; + margin-bottom: 0px; } .user-profile-page .tabBar a#stats { - margin-left: 0; + margin-left: 0; } .user-profile-page img.gravatar { - margin: 2px 0 3px 0; + margin: 2px 0 3px 0; } .user-profile-page h3 { - padding: 0; - margin-top: -3px; + padding: 0; + margin-top: -3px; } .userList { - font-size: 13px; + font-size: 13px; } - img.flag { - border: 1px solid #eee; - vertical-align: text-top; + border: 1px solid #eee; + vertical-align: text-top; } - .main-page img.flag { - vertical-align: text-bottom; + vertical-align: text-bottom; } - -.facebook-share.icon, .twitter-share.icon, .linkedin-share.icon, .identica-share.icon { - background: url(../images/sprite.png) no-repeat; - display:block; - text-indent:-100em; - height:25px; - width:25px; +/* Pretty printing styles. Used with prettify.js. */ +a.edit { + padding-left: 3px; + color: #145bff; } -.facebook-share.icon { - background-position: -25px 0px; +.str { + color: #080; } -.identica-share.icon { - background-position: -85px 0px; +.kwd { + color: #008; } -.twitter-share.icon { - margin-top:10px; - background-position: 0px 0px; +.com { + color: #800; } -.linkedin-share.icon { - background-position: -55px 0px; +.typ { + color: #606; } -/* Pretty printing styles. Used with prettify.js. */ - -a.edit { - padding-left:3px; - color: #145bff; +.lit { + color: #066; } - -.str { color: #080; } -.kwd { color: #008; } -.com { color: #800; } -.typ { color: #606; } -.lit { color: #066; } -.pun { color: #660; } -.pln { color: #000; } -.tag { color: #008; }/* name conflict here */ -.atn { color: #606; } -.atv { color: #080; } -.dec { color: #606; } -pre.prettyprint { padding: 3px; border: 0px solid #888; } - -@media print { - .str { color: #060; } - .kwd { color: #006; font-weight: bold; } - .com { color: #600; font-style: italic; } - .typ { color: #404; font-weight: bold; } - .lit { color: #044; } - .pun { color: #440; } - .pln { color: #000; } - .tag { color: #006; font-weight: bold; } - .atn { color: #404; } - .atv { color: #060; } +.pun { + color: #660; } - -.follow-toggle { - border: 2px solid; - -moz-border-radius:5px; - -webkit-border-radius:5px; - border-radius: 5px; - height: auto; - width: 200px; - float:left; - padding: 0; - margin-right:100%; - margin-bottom: 10px; +.pln { + color: #000; } - -.follow-toggle .follow{ - font-color: #000; - font-style:normal; - background: #4cd46f; +.tag { + color: #008; } - -.follow-toggle .follow:hover{ - font-weight: bold; +/* name conflict here */ +.atn { + color: #606; } - -.follow-toggle .unfollow{ - background: #4cd46f; +.atv { + color: #080; } - -.follow-toggle .unfollow:hover{ - background: #d94849; +.dec { + color: #606; } - -.follow-toggle .unfollow div.unfollow-red{ - display:none; +pre.prettyprint { + padding: 3px; + border: 0px solid #888; } - -.follow-toggle .unfollow div.unfollow-green{ - background: #4cd46f; -} - -.follow-toggle .unfollow:hover div.unfollow-red{ - display:inline; - color:#fff; - font-weight:bold; -} - -.follow-toggle .unfollow:hover div.unfollow-green{ - display:none; +@media print { + .str { + color: #060; + } + .kwd { + color: #006; + font-weight: bold; + } + .com { + color: #600; + font-style: italic; + } + .typ { + color: #404; + font-weight: bold; + } + .lit { + color: #044; + } + .pun { + color: #440; + } + .pln { + color: #000; + } + .tag { + color: #006; + font-weight: bold; + } + .atn { + color: #404; + } + .atv { + color: #060; + } } diff --git a/askbot/skins/default/media/style/style.less b/askbot/skins/default/media/style/style.less new file mode 100644 index 00000000..c2d366dd --- /dev/null +++ b/askbot/skins/default/media/style/style.less @@ -0,0 +1,3257 @@ +@import url(jquery.autocomplete.css); +@import "lib_style.less"; /* Library of predifined less functions styles */ + +/* ----- General HTML Styles----- */ + +body { + background: #FFF; + font-size: 14px; + line-height: 150%; + margin: 0; + padding: 0; + color: #000; + font-family:@body-font; +} + +div { + margin: 0 auto; + padding: 0; +} + +h1, h2, h3, h4, h5, h6, ul, li, dl, dt, dd, form, img, p { + margin: 0; + padding: 0; + border: none; +} + +label { + vertical-align: middle; +} + +hr { + border: none; + border-top: 1px dashed #ccccce; +} + +input, select { + vertical-align: middle; + font-family: Trebuchet MS, "segoe ui", Helvetica, Tahoma, Verdana, MingLiu, PMingLiu, Arial, sans-serif; + margin-left:0px; +} + +p { + font-size: 14px; + line-height: 140%; + margin-bottom: 6px; +} + +a { + color:@link; + text-decoration: none; + cursor: pointer; +} + +h2 { + font-size: 21px; + padding: 3px 0 3px 5px; +} + +h3 { + font-size: 19px; + padding: 3px 0 3px 5px; +} + +ul { + list-style: disc; + margin-left: 20px; + padding-left: 0px; + margin-bottom: 1em; +} + +ol { + list-style: decimal; + margin-left: 30px; + margin-bottom: 1em; + padding-left: 0px; +} + +td ul { + vertical-align: middle; +} + +li input { + margin: 3px 3px 4px 3px; +} + +pre { + font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace; + font-size: 100%; + margin-bottom: 10px; + /*overflow: auto;*/ + background-color: #F5F5F5; + padding-left: 5px; + padding-top: 5px; + /*width: 671px;*/ + padding-bottom: 20px ! ie7; +} + +code { + font-family: Consolas, Monaco, Liberation Mono, Lucida Console, Monospace; + font-size: 100%; + +} + +blockquote { + margin-bottom: 10px; + margin-right: 15px; + padding: 10px 0px 1px 10px; + background-color: #F5F5F5; +} + +/* http://pathfindersoftware.com/2007/09/developers-note-2/ */ +* html .clearfix, +* html .paginator { + height: 1; + overflow: visible; +} ++ html .clearfix, ++ html .paginator { + min-height: 1%; +} +.clearfix:after, +.paginator:after { + clear: both; + content:"."; + display:block; + height: 0; + visibility: hidden; +} + +.badges a { + color: #763333; + text-decoration: underline; +} + +a:hover { + text-decoration: underline; +} + +.badge-context-toggle.active { + cursor: pointer; + text-decoration: underline; +} + +h1 { + font-size: 24px; + padding: 10px 0 5px 0px; +} + +/* ----- Extra space above for messages ----- */ + +body.user-messages { + margin-top: 2.4em; +} + +/* ----- Custom positions ----- */ + +.left{float:left} +.right{float:right} +.clean{clear:both} +.center{ + margin: 0 auto; + padding: 0; +} + + +/* ----- Notify message bar , check blocks/system_messages.html ----- */ + +.notify { + position: fixed; + top: 0px; + left: 0px; + width: 100%; + z-index: 100; + padding: 0; + text-align: center; + background-color: #f5dd69; + border-top:#fff 1px solid; + font-family:@main-font; + + p { + margin-top: 6px; + margin-bottom: 6px; + font-size: 16px; + color:#424242 + } +} + +#closeNotify { + position: absolute; + right: 5px; + top: 7px; + color: #735005; + text-decoration: none; + line-height: 18px; + .sprites(-6px,-5px); + cursor: pointer; + width:20px; + height:20px; +} + +#closeNotify:hover { + .sprites(-26px,-5px); +} + +/* ----- Header, check blocks/header.html ----- */ + +#header { + margin-top: 0px; + background: @header-color; + font-family:@main-font; +} + +.content-wrapper {/* wrapper positioning class */ + width: 960px; + margin: auto; + position:relative; +} + +#logo img{ + padding: 5px 0px 5px 0px; + height: 75px; + width: auto; +} + +#userToolsNav {/* Navigation bar containing login link or user information, check widgets/user_navigation.html*/ + height: 20px; + position:absolute; + bottom: 0; + right:0px; + padding-bottom:5px; + + a { + height: 35px; + text-align: right; + margin-left: 20px; + text-decoration: underline; + color:#d0e296; + font-size:16px; + } + + a:first-child { + margin-left: 0; + } + + a#ab-responses { + margin-left: 3px; + } + + .user-info,.user-micro-info{ + color:#b5b593; + } + + a img { + vertical-align:middle; + margin-bottom:2px; + } + + .user-info a { + margin: 0; + text-decoration: none; + } +} + +#metaNav {/* Top Navigation bar containing links for tags, people and badges, check widgets/header.html */ + float:right; + + a { + color: #e2e2ae; + padding: 0px 0px 0px 35px; + height: 25px; + line-height: 30px; + margin:5px 0px 0px 10px; + font-size: 18px; + font-weight: 100; + text-decoration: none; + display: block; + float: left; + } + + a:hover { + text-decoration: underline; + } + + a.on { + font-weight:bold; + color: #FFF; + text-decoration: none; + } + + a.special { + font-size: 18px; + color: #B02B2C; + font-weight: bold; + text-decoration: none; + } + + a.special:hover { + text-decoration: underline; + } + + #navTags{ + .sprites(-50px,-5px) + } + + #navUsers{ + .sprites(-125px,-5px) + } + + #navBadges{ + .sprites(-210px,-5px) + } +} + +#secondaryHeader{ /* Div containing Home button, scope navigation, search form and ask button, check blocks/secondary_header.html */ + height:55px; + background:#e9e9e1; + border-bottom:#d3d3c2 1px solid; + border-top:#fcfcfc 1px solid; + margin-bottom:10px; + font-family:@main-font; + + #homeButton{ + border-right:#afaf9e 1px solid; + .sprites(-6px,-36px); + height:55px; + width:43px; + display:block; + float:left; + } + + #homeButton:hover{ + .sprites(-6px-45,-36px); + } + + #scopeWrapper{ + width:688px; + float:left; + + a{ + display:block; + float:left; + } + + .scope-selector{ + font-size:21px; + color:#5a5a4b; + height:55px; + line-height:55px; + margin-left:24px + } + .on{ + background:url(../images/scopearrow.png) no-repeat center bottom; + } + + .ask-message{ + font-size:24px; + } + } +} + +#searchBar { /* Main search form , check widgets/search_bar.html */ + display:inline-block; + background-color: #fff; + width:412px; + border: 1px solid #c9c9b5; + float:right; + height:42px; + margin:6px 0px 0px 15px; + + .searchInput, .searchInputCancelable, + .searchInputAuth, .searchInputCancelableAuth { + font-size: 30px; + height: 40px; + font-weight:300; + background:#FFF; + border:0px; + color:#484848; + padding-left:10px; + font-family:@body-font; + vertical-align: middle; + } + + .searchInput, .searchInputCancelable { + width: 352px; + } + + .searchInputCancelable { + width: 317px; + } + + .searchInputAuth{ + width: 340px; + } + + .searchInputCancelableAuth { + width: 310px; /*FIXME byron */ + } + + .logoutsearch { + width: 337px; + } + + .searchBtn { + font-size: 10px; + color: #666; + background-color: #eee; + height: 42px; + border:#FFF 1px solid; + line-height: 22px; + text-align: center; + float:right; + margin: 0px; + width:48px; + .sprites(-98px,-36px); + cursor:pointer; + } + + .searchBtn:hover { + .sprites(-98px-48,-36px); + } + + .cancelSearchBtn { + font-size: 30px; + color: #ce8888; + background:#fff; + height: 42px; + border:0px; + border-left:#deded0 1px solid; + text-align: center; + width: 35px; + cursor:pointer; + } + + .cancelSearchBtn:hover { + color: #d84040; + } +} + +#askButton{ /* check blocks/secondary_header.html and widgets/ask_button.html*/ + background: url(../images/bigbutton.png) repeat-x bottom; + line-height:44px; + text-align:center; + width:200px; + height:42px; + font-size:23px; + color:@button-label; + margin-top:7px; + float:right; + text-transform:uppercase; + .rounded-corners(5px); + .box-shadow(1px, 1px, 2px, #636363) +} + +#askButton:hover{ + text-decoration:none; + background: url(../images/bigbutton.png) repeat-x top; + .text-shadow(0px, 1px, 0px, #c6d9dd) +} + +/* ----- Content layout, check two_column_body.html or one_column_body.html ----- */ + +#ContentLeft { + width: 730px; + float: left; + position: relative; + padding-bottom:10px; +} + +#ContentRight { + width: 200px; + float: right; + padding: 0 0px 10px 0px; +} + +#ContentFull { + float: left; + width: 960px; +} + +/* ----- Sidebar Widgets Box, check main_page/sidebar.html or question/sidebar.html ----- */ + +.box { + background: #fff; + padding: 4px 0px 10px 0px; + width:200px; + + p { + margin-bottom: 4px; + } + + p.info-box-follow-up-links { + text-align: right; + margin: 0; + } + + h2 { + padding-left: 0; + background:#eceeeb; + height:30px; + line-height:30px; + text-align:right; + font-size:18px !important; + font-weight:normal; + color:#656565; + padding-right:10px; + margin-bottom:10px; + font-family:@main-font; + } + h3{ + color:#4a757f; + font-size:18px; + text-align:left; + font-weight:normal; + font-family:@main-font; + } + .contributorback{ + background: #eceeeb url(../images/contributorsback.png) no-repeat center left; + } + + label { + color: @info-text; + font-size:15px; + display: block; + float: right; + width: 177px; + font-family:@main-font; + } + + ul { + margin-left: 22px; + } + + li { + list-style-type: disc; + font-size: 13px; + line-height: 20px; + margin-bottom: 10px; + color:@info-text; + } + ul.tags { + list-style: none; + margin: 0; + padding: 0; + line-height: 170%; + display: block; + } + #displayTagFilterControl p label{ + color:@info-text; + font-size:15px; + } + + .inputs{ + #interestingTagInput, #ignoredTagInput{ + width:158px; + border:#c9c9b5 1px solid; + height:25px; + } + #interestingTagAdd, #ignoredTagAdd{ + background:url(../images/small-button-blue.png) repeat-x top; + border:0; + color:@button-label; + font-weight:bold; + font-size:12px; + width:30px; + height:27px; + margin-top:-2px; + cursor:pointer; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080); + + + } + #interestingTagAdd:hover, #ignoredTagAdd:hover{ + background:url(../images/small-button-blue.png) repeat-x bottom; + } + } + + img.gravatar { + margin:1px; + } + +/* widgets for question template */ + + a.followed, a.follow{ + background: url(../images/medium-button.png) top repeat-x; + height:34px; + line-height:34px; + text-align:center; + border:0; + font-family:@main-font; + color:@button-label; + font-weight:normal; + font-size:21px; + margin-top:3px; + display:block; + width:120px; + text-decoration:none; + .rounded-corners(4px); + .box-shadow(1px, 1px, 2px, #636363); + .center; + } + + a.followed:hover, a.follow:hover{ + text-decoration:none; + background: url(../images/medium-button.png) bottom repeat-x; + .text-shadow(0px, 1px, 0px, #c6d9dd); + } + + a.followed div.unfollow{ + display:none; + } + + a.followed:hover div{ + display:none; + } + a.followed:hover div.unfollow{ + display:inline; + color:#a05736; + } + + .favorite-number { + padding: 5px 0 0 5px; + font-size: 100%; + font-family: Arial; + font-weight: bold; + color: #777; + text-align:center; + } +} + +.statsWidget p{ + color:@info-text; + font-size:16px; + border-bottom:#cccccc 1px solid; + font-size:13px; + + strong{ + float:right; + padding-right:10px; + } +} +.questions-related { + word-wrap: break-word; + + p { + line-height: 20px; + padding: 4px 0px 4px 0px; + font-size: 16px; + font-weight:normal; + border-bottom:#cccccc 1px solid; + } + a{ + font-size:13px; + } +} +/* tips and markdown help are widgets for ask template */ + +#tips{ + li{ + color:@info-text; + font-size:13px; + list-style-image: url(../images/tips.png); + } + a{ + font-size:16px; + } +} + +#markdownHelp{ + li{ + color:@info-text; + font-size:13px; + } + a{ + font-size:16px; + } +} + + +/* ----- Sorting top Tab, check main_page/tab_bar.html ------*/ + +.tabBar { + background-color: #eff5f6; + height: 30px; + margin-bottom: 3px; + margin-top: 3px; + float:right; + font-family:@sort-font; + font-size:16px; + .rounded-corners(5px); +} + +.tabBar h2 { + float: left; +} + +.tabsA, .tabsC { + float: right; + position: relative; + display: block; + height: 20px; +} + +/* tabsA - used for sorting */ +.tabsA { float: right; } +.tabsC { float: left; } + +.tabsA a, .tabsC a{ + + border-left: 1px solid #d0e1e4; + color: @section-title; + display: block; + float: left; + height: 20px; + line-height: 20px; + padding:4px 7px 4px 7px; + text-decoration: none; +} + +.tabsA a.on, .tabsC a.on, .tabsA a:hover, .tabsC a:hover { + color: @button-label; +} + +.tabsA a.rev.on, tabsA a.rev.on:hover { +} + +.tabsA .label, .tabsC .label { + float: left; + color: #646464; + margin-top:4px; + margin-right:5px; +} + +.tabsB a { + background: #eee; + border: 1px solid #eee; + color: #777; + display: block; + float: left; + height: 22px; + line-height: 28px; + margin: 5px 0px 0 4px; + padding: 0 11px 0 11px; + text-decoration: none; +} + +.rss { + float: right; + font-size: 16px; + color: #f57900; + margin: 5px 0px 3px 7px; + width:52px; + padding-left: 16px; + padding-top:3px; + background:#fff url(../images/feed-icon-small.png) no-repeat center right; + float:right; + font-family:@sort-font; + font-size:16px; +} + +.rss:hover { + color: #F4A731 !important; +} + +/* ----- Headline, containing number of questions and tags selected, check main_page/headline.html ----- */ + +#questionCount{ + font-weight:bold; + font-size:23px; + color:@section-title; + width:200px; + float:left; + margin-bottom:8px; + padding-top:6px; + font-family:@main-font; +} + +#listSearchTags{ + float:left; + margin-top:3px; + color:@info-text; + font-size:16px; + font-family:@main-font; +} + +ul#searchTags { + margin-left:10px; + float:right; + padding-top:2px; +} + +.search-tips { + font-size:16px; + line-height:17px; + color: @info-text; + margin:5px 0 10px 0; + padding:0px; + float:left; + font-family:@main-font; + + a { + text-decoration: underline; + color: @link; + } +} + +/* ----- Question list , check main_page/content.html and macros/macros.html----- */ + +#question-list { + float: left; + position: relative; + background-color: #FFF; + padding: 0; + width: 100%; +} + +.short-summary { + position: relative; + filter: inherit; + padding: 10px; + border-bottom: 1px solid #DDDBCE; + margin-bottom:1px; + overflow: hidden; + width: 710px; + float: left; + background: url(../images/summary-background.png) repeat-x; + + h2 { + font-size: 24px; + font-weight:normal; + line-height: 26px; + padding-left: 0; + margin-bottom:8px; + display:block; + font-family:@main-font; + } + + a { + color:@question-link; + } + + .userinfo { + text-align:right; + line-height:16px; + font-family:@body-font; + padding-right:4px; + } + + + .userinfo .relativetime, span.anonymous + { + font-size: 11px; + clear:both; + font-weight: normal; + color: #555; + } + + .userinfo a{ + font-weight:bold; + font-size:11px; + } + + .counts { + float: right; + margin: 4px 0 0 5px; + font-family:@main-font; + } + + .counts .item-count { + padding:0px 5px 0px 5px; + font-size: 25px; + font-family:@main-font; + } + + .counts .votes div, + .counts .views div, + .counts .answers div, + .counts .favorites div + { + margin-top:3px; + font-size: 14px; + line-height:14px; + color: #646464; + } + + .tags { + margin-top: 0; + } + + .votes, .answers, .favorites, .views { + text-align: center; + margin: 0 3px; + padding: 8px 2px 0px 2px; + width: 51px; + float: right; + height:44px; + border:#dbdbd4 1px solid; + } + + .votes{ + background: url(../images/vote-background.png) repeat-x; + } + + .answers{ + background:url(../images/answers-background.png) repeat-x; + } + + .views { + background:url(../images/view-background.png) repeat-x; + } + + .no-votes .item-count { + color: #b1b5b6; + } + .some-votes .item-count { + color: #4a757f; + } + + .no-answers .item-count { + color: #b1b5b6; + } + .some-answers .item-count { + color: #eab243; + } + + .no-views .item-count { + color: #b1b5b6; + } + .some-views .item-count { + color: #d33f00; + } + + .accepted .item-count { + background:url(../images/accept.png) no-repeat top right; + display: block; + text-align: center; + width: 40px; + color: #eab243; + } + + .some-favorites .item-count { + background:#338333; + color:#d0f5a9; + } + .no-favorites .item-count { + background: #eab243; + color: yellow; + } + +} + +/* ----- Question list Paginator , check main_content/pager.html and macros/utils_macros.html----- */ + +.evenMore { + font-size: 13px; + color:@info-text; + padding:15px 0px 10px 0px; + clear:both; +} + +.evenMore a { + text-decoration: underline; + color:@link; +} + +.pager { + margin-top: 10px; + margin-bottom: 16px; +} + +.pagesize { + margin-top: 10px; + margin-bottom: 16px; + float: right; +} + +.paginator { + padding: 5px 0 10px 0; + font-size:13px; + + .prev a, .prev a:visited, + .next a, .next a:visited { + background-color: #fff; + color: #777; + padding: 2px 4px 3px 4px; + } + a{ + color:@section-title; + } + .prev { + margin-right: .5em; + } + + .next { + margin-left: .5em; + } + + .page a, .page a:visited, .curr { + padding: .25em; + background-color: #fff; + margin: 0em .25em; + color: #ff; + } + + .curr { + background-color: #8ebcc7; + color: #fff; + font-weight: bold; + } + .next a, .prev a{ + color:@section-title + } + .page a:hover, + .curr a:hover, + .prev a:hover, + .next a:hover { + color: #8C8C8C; + background-color: #E1E1E1; + text-decoration: none; + } + + .text { + color: #777; + padding: .3em; + } + + .paginator-container-left { + padding: 5px 0 10px 0; + } + +} + +/* ----- Tags Styles ----- */ + +/* tag formatting is also copy-pasted in template + because it must be the same in the emails + askbot/models/__init__.py:format_instant_notification_email() +*/ + +/* tag cloud */ + +.tag-size-1 { + font-size:12px; +} +.tag-size-2 { + font-size:13px; +} +.tag-size-3 { + font-size:14px; +} +.tag-size-4 { + font-size:15px; +} +.tag-size-5 { + font-size:16px; +} +.tag-size-6 { + font-size:17px; +} +.tag-size-7 { + font-size:18px; +} +.tag-size-8 { + font-size:19px; +} +.tag-size-9 { + font-size:20px; +} +.tag-size-10 { + font-size:21px; +} + +ul.tags, +ul.tags.marked-tags, +ul#related-tags { + list-style: none; + margin: 0; + padding: 0; + line-height: 170%; + display: block; +} + +ul.tags li { + float:left; + display: block; + margin: 0 5px 0 0; + padding: 0; + height:20px; +} + +.wildcard-tags { + clear: both; +} + +ul.tags.marked-tags li, +.wildcard-tags ul.tags li { + margin-bottom: 5px; +} + +#tagSelector div.inputs { + clear: both; + float: none; + margin-bottom:10px; +} + +.tags-page ul.tags li, +ul#ab-user-tags li { + width: 160px; + margin:5px; +} + +ul#related-tags li { + margin: 0 5px 5px 0; + float: left; + clear: left; +} + +/* .tag-left and .tag-right are for the sliding doors decoration of tags */ + +.tag-left { + background: url(../images/tag-right.png) no-repeat right center; + border: none; + cursor: pointer; + display: block; + float: left; + height: 20px; + margin: 0 5px 0 0; + padding: 0; +} + +.tag-right { + background:url(../images/tag-left.png) no-repeat left center; + border: none; + display: block; + float: left; + height: 20px; + line-height: 20px; + font-weight: normal; + font-size: 11px; + padding: 0px 10px 0px 15px; + text-decoration: none; + text-align: center; + white-space: nowrap; + vertical-align: middle; + font-family:@body-font; + color:#717179; +} +.deletable-tag { + margin-right: 3px; + white-space: nowrap; +} + +.deletable-tag .tag-right { + padding-right: 0px; + float: left; +} +.deletable-tag.tag-left { + padding-right: 0px; +} + +.tags a.tag-right, +.tags span.tag-right { + color: #585858; + text-decoration: none; + +} +.tags a:hover{ + color: #1A1A1A; +} + +.users-page h1, .tags-page h1 { + float: left; +} + +.main-page h1 { + margin-right: 5px; +} + +span.delete-icon { + padding-left: 13px; + vertical-align: bottom; + background: url(../images/close-small-dark.png) bottom no-repeat; + cursor: default; +} +span.delete-icon:hover { + background: url(../images/close-small-dark.png) top no-repeat; +} + +.tags span.delete-icon { + float: left; + height: 20px; + width:8px; + margin: 0px 0 0 10px; + display: block; +} + +.tag-number { + font-weight: normal; + float: left; + font-size:16px; + color:#5d5d5d; +} + +.badges .tag-number { + float: none; + display: inline; + padding-right: 15px; +} + +/* ----- Ask and Edit Question Form template----- */ + +.section-title{ + color:@section-title; + font-family:@main-font; + font-weight:bold; + font-size:24px; +} + +.ask-body { + padding-right: 10px; +} + +#fmask{ + margin-bottom:30px; + width:100%; +} + +#askFormBar { + display:inline-block; + padding: 4px 7px 5px 0px; + margin-top:0px; + + p{ + margin:0 0 5px 0; + font-size:14px; + color:@info-text-dark; + line-height:1.4; + } + .questionTitleInput { + font-size: 24px; + line-height: 24px; + height: 36px; + margin: 0px; + padding: 0px 0 0 5px; + border:#cce6ec 3px solid; + width:725px; + } +} + +.ask-page, .edit-question-page{ + + div#question-list { + float: none; + border-bottom:#f0f0ec 1px solid; + float:left; + margin-bottom:10px; + a{ + line-height:30px; + } + + } + + div#question-list h2 { + font-size: 13px; + padding-bottom: 0; + color:@link; + border-top:#f0f0ec 1px solid; + border-left:#f0f0ec 1px solid; + height:30px; + line-height:30px; + font-weight:normal; + } + + div#question-list span { + width:28px; + height:26px; + line-height:26px; + text-align:center; + margin-right: 10px; + float:left; + display:block; + color:#fff; + background: #b8d0d5; + .rounded-corners(3px); + } + label{ + color:@info-text-dark; + font-size:13px; + } + + #id_tags{ + border:#cce6ec 3px solid; + height:25px; + padding-left:5px; + width:395px; + font-size:14px; + } +} + +.title-desc { + color: @info-text; + font-size: 13px; +} + +#fmanswer input.submit, +.ask-page input.submit, +.edit-question-page input.submit { + float: left; + background: url(../images/medium-button.png) top repeat-x; + height:34px; + border:0; + font-family:@main-font; + color:@button-label; + font-weight:normal; + font-size:21px; + margin-top:3px; + .rounded-corners(4px); + .box-shadow(1px, 1px, 2px, #636363); + margin-right:7px; +} + +#fmanswer input.submit:hover, +.ask-page input.submit:hover, +.edit-question-page input.submit:hover{ + text-decoration:none; + background: url(../images/medium-button.png) bottom repeat-x; + .text-shadow(0px, 1px, 0px, #c6d9dd) +} +#editor { /*adjustment for editor preview*/ + font-size: 100%; + min-height: 200px; + line-height: 18px; + margin:0; + border-left:#cce6ec 3px solid; + border-bottom:#cce6ec 3px solid; + border-right:#cce6ec 3px solid; + border-top:0; + padding:10px; + margin-bottom:10px; + width:710px; +} + +#id_title { + width: 100%; +} + +.wmd-preview { + margin: 3px 0 5px 0; + padding: 6px; + background-color: #F5F5F5; + min-height: 20px; + overflow: auto; + font-size:13px; + font-family:@body-font; + + p{ + margin-bottom:14px; + line-height:1.4; + font-size:14px; + } +} + +.wmd-preview pre { + background-color: #E7F1F8; + +} + +.wmd-preview blockquote { + background-color: #eee; +} + +.wmd-preview IMG { + max-width: 600px; +} + +.preview-toggle { + width: 100%; + color: #b6a475; /*letter-spacing:1px;*/ + text-align: left; +} + +.preview-toggle span:hover { + cursor: pointer; +} + +.after-editor { + margin-top: 10px; +} + +.checkbox { + margin-left:5px; + font-weight:normal; + cursor:help +} + +.question-options { + margin-top: 1px; + color: #666; + line-height: 13px; + margin-bottom:5px; +} +.question-options label { + vertical-align: text-bottom; +} + +.edit-content-html { + border-top: 1px dotted #D8D2A9; + border-bottom: 1px dotted #D8D2A9; + margin: 5px 0 5px 0; +} + +.edit-question-page, #fmedit{ + color:@info-text-dark; + + #id_revision{ + font-size:14px; + margin-top:5px; + margin-bottom:5px; + } + #id_title{ + font-size: 24px; + line-height: 24px; + height: 36px; + margin: 0px; + padding: 0px 0 0 5px; + border:#cce6ec 3px solid; + width:725px; + margin-bottom:10px; + } + #id_summary{ + border:#cce6ec 3px solid; + height:25px; + padding-left:5px; + width:395px; + font-size:14px; + } + .title-desc{ + margin-bottom:10px; + } +} + +/* ----- Question template ----- */ + +.question-page{ + + h1{ + padding-top:0px; + font-family:@main-font; + } + + h1 a{ + color:@question-link; + font-size:30px; + font-weight:normal; + line-height:1; + } + + p.rss { + float:none; + clear:both; + padding: 3px 0 0 23px; + font-size: 15px; + width:110px; + background-position:center left; + margin-left:0px !important; + } + + p.rss a { + font-family:@main-font; + vertical-align: top; + } + + .question-content{ + float:right; + width:690px; + margin-bottom:10px; + } + + #question-table{ + float:left; + border-top:#f0f0f0 1px solid; + } + + #question-table, + .answer-table { + margin: 6px 0 0px 0; + border-spacing: 0px; + width: 680px; + padding-right:3px; + } + + .answer-table { + margin-top:0px; + border-bottom: 1px solid #D4D4D4; + float:left; + } + + .answer-table td, + #question-table td { + width:20px; + vertical-align:top; + } + .question-body, .answer-body { + overflow: auto; + margin-top:10px; + font-family:@body-font; + color:#4b4b4b; + + p{ + margin-bottom:14px; + line-height:1.4; + font-size:14px; + padding:0px 5px 5px 0px; + } + + a { + color:@link; + } + + li { + margin-bottom:7px; + } + } + + .question-body IMG, .answer-body IMG { + max-width: 600px; + } + + .post-update-info-container { + float: right; + width: 175px; + } + + .post-update-info { + background: #fff url(../images/background-user-info.png) repeat-x bottom; + float: right; + font-size: 9px; + font-family:@secondary-font; + width: 158px; + padding:4px; + margin:0px 0px 5px 5px; + line-height: 14px; + .rounded-corners(4px); + .box-shadow (0px, 2px,1px,#bfbfbf); + + p { + line-height: 13px; + font-size: 11px; + margin: 0 0 2px 1px; + padding: 0; + } + a{ + color:#444; + } + .gravatar { + float: left; + margin-right: 4px; + } + + p.tip { + color: #444; + line-height: 13px; + font-size: 10px; + } + } + + .post-controls{ + font-size: 11px; + line-height: 12px; + min-width: 200px; + padding-left: 5px; + text-align:right; + clear: left; + float: right; + margin-top:10px; + + a { + color: #777; + padding: 0px 3px 3px 22px; + cursor: pointer; + border: none; + font-size:12px; + font-family:@body-font; + text-decoration: none; + height:18px; + display:block; + float:right; + line-height:18px; + margin-top:-2px; + margin-left:4px; + } + + a:hover { + background-color: #f5f0c9; + + } + .sep { + color: #ccc; + float:right; + height:18px; + font-size:18px; + } + } + .post-controls, .answer-controls{ + .question-delete{ + background: url(../images/delete.png) no-repeat center left; + padding-left:16px; + } + .question-flag{ + background: url(../images/flag.png) no-repeat center left; + } + .question-edit{ + background: url(../images/edit2.png) no-repeat center left; + } + .question-retag{ + background: url(../images/retag.png) no-repeat center left; + } + .question-close{ + background: url(../images/close.png) no-repeat center left; + } + .permant-link{ + background: url(../images/link.png) no-repeat center left; + } + } + .tabBar{ + width:100%; + } + + #questionCount{ + float:left; + font-family:@main-font; + line-height:15px; + } + + .question-img-upvote, .question-img-downvote, + .answer-img-upvote, .answer-img-downvote { + width: 25px; + height: 20px; + cursor:pointer; + } + + .question-img-upvote, .answer-img-upvote { + background: url(../images/vote-arrow-up-new.png) no-repeat; + } + + .question-img-downvote, .answer-img-downvote { + background: url(../images/vote-arrow-down-new.png) no-repeat; + } + + .question-img-upvote:hover, .question-img-upvote.on, + .answer-img-upvote:hover, .answer-img-upvote.on { + background: url(../images/vote-arrow-up-on-new.png) no-repeat; + } + + .question-img-downvote:hover, .question-img-downvote.on, + .answer-img-downvote:hover, .answer-img-downvote.on { + background: url(../images/vote-arrow-down-on-new.png) no-repeat; + } + + .question-img-favorite:hover { + background: url(../images/vote-favorite-on.png) + } + div.comments { + padding: 0; + } + #comment-title{ + font-weight:bold; + font-size:23px; + color:@section-title; + width:200px; + float:left; + font-family:@main-font; + } + .comments { + font-size: 12px; + clear: both; + + div.controls { + clear: both; + float:left; + width: 100%; + margin: 3px 0 20px 5px; + } + + .controls a { + color: #988e4c; + padding: 0 3px 2px 22px; + font-family:@body-font; + font-size:13px; + background:url(../images/comment.png) no-repeat center left; + } + + .controls a:hover { + background-color: #f5f0c9; + text-decoration: none; + } + + .button { + color: #988e4c; + font-size: 11px; + padding: 3px; + cursor: pointer; + } + a { + background-color: inherit; + color: @link; + padding: 0; + } + + form.post-comments { + margin: 3px 30px 4px 5px; + } + + textarea { + height: 42px; + width:100%; + margin: 12px 0 5px 1px; + font-family: @body-font; + outline: none; + overflow:auto; + font-size: 12px; + line-height: 140%; + padding-left:2px; + padding-top:4px; + border:#cce6ec 3px solid; + } + + input { + margin-left: 10px; + margin-top: 1px; + vertical-align: top; + width: 100px; + } + button{ + background:url(../images/small-button-blue.png) repeat-x top; + border:0; + color:@button-label; + font-size:12px; + width:95px; + font-weight:bold; + height:24px; + margin-top:-2px; + cursor:pointer; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080); + float:left; + } + button:hover{ + background: url(../images/small-button-blue.png) bottom repeat-x; + .text-shadow(0px, 1px, 0px, #c6d9dd); + } + .counter { + display: inline-block; + width: 245px; + float:right; + color:#b6a475 !important; + vertical-align: top; + font-family:@body-font; + float:right; + text-align:right; + } + .comment { + border-bottom: 1px solid #edeeeb; + margin: 0; + margin-top:8px; + padding-bottom:4px; + overflow: auto; + font-family:@body-font; + font-size:11px; + min-height: 25px; + background:url(../images/comment-background.png) bottom repeat-x; + .rounded-corners(5px); + } + div.comment:hover { + background-color: #efefef; + } + a.author{ + background-color: inherit; + color: @link; + padding: 0; + } + + a.author:hover { + text-decoration: underline; + } + span.delete-icon{ + background:url(../images/close-small.png) no-repeat; + } + span.delete-icon:hover{ + border:#BC564B 2px solid; + .rounded-corners(10px); + + } + .content { + margin-bottom: 7px; + } + + .comment-votes { + float: left; + width: 37px; + line-height: 130%; + padding: 6px 5px 6px 3px; + } + + .comment-body { + line-height: 1.3; + margin: 3px 26px 0 46px; + padding: 5px 3px; + color: #666; + font-size:13px; + } + + .comment-body p{ + font-size:13px; + line-height:1.3; + margin-bottom: 3px; + padding: 0; + } + + .comment-delete { + float: right; + width: 14px; + line-height: 130%; + padding: 8px 6px; + } + + .upvote { + margin: 0px; + padding-right: 17px; + padding-top: 2px; + text-align: right; + height: 20px; + font-size: 13px; + font-weight: bold; + color: #777; + } + + .upvote.upvoted { + color: #d64000; + } + + .upvote.hover { + background: url(../images/go-up-grey.png) no-repeat; + background-position: right 1px; + } + + .upvote:hover { + background: url(../images/go-up-orange.png) no-repeat; + background-position: right 1px; + } + + .help-text{ + float: right; + text-align:right; + color: gray; + margin-bottom: 0px; + margin-top: 0px; + line-height: 50%; + } + } + #questionTools { + font-size: 22px; + margin-top: 11px; + text-align: left; + } + + .question-status { + margin-top: 10px; + margin-bottom:15px; + padding: 20px; + background-color: #fef7cc; + text-align: center; + border:#e1c04a 1px solid; + } + + .question-status h3 { + font-size: 20px; + color:@info-text; + font-weight:normal; + } + + .vote-buttons { + float: left; + text-align: center; + padding-top: 2px; + margin:3px 10px 0px 3px; + } + + .vote-buttons IMG { + cursor: pointer; + } + + .vote-number { + font-family: @main-font; + padding: 0px 0 5px 0; + font-size: 25px; + font-weight: bold; + color: #777; + } + + .vote-buttons .notify-sidebar { + text-align: left; + } + .vote-buttons .notify-sidebar label { + vertical-align: top; + } + + .tabBar-answer{ + margin-bottom:15px; + padding-left:7px; + width:723px; + margin-top:10px; + } + .answer{ + .vote-buttons { + float:left; + } + } + .accepted-answer { + background-color: #f7fecc; + border-bottom-color: #9BD59B; + + .vote-buttons { + width:27px; + margin-right:10px; + } + } + + .answer .post-update-info a{ + color:#444444; + } + + .accepted-answer .comments { + background-color: #f1f6d4; + } + + .answered { + background: #CCC; + color: #999; + } + + .answered-accepted { + background: #DCDCDC; + color: #763333; + + strong { + color: #E1E818; + } + } + + .answered-by-owner { + background: #F1F1FF; + + .comments .button { + background-color: #E6ECFF; + } + .comments { + background-color: #E6ECFF; + } + .vote-buttons { + margin-right:10px; + } + } + + .answer-img-accept:hover { + background: url(../images/vote-accepted-on.png) + } + .answer-body a { + color:@link; + } + .answer-body li { + margin-bottom:0.7em; + } + + #fmanswer{ + color:@info-text; + line-height:1.2; + margin-top:10px; + p{ + font-size:13px; + line-height:1.3; + } + h2{ + font-family:@main-font; + color:@section-title; + font-size:24px; + } + label{ + font-size:13px; + } + } + .message { + padding: 5px; + margin: 0px 0 10px 0; + + } + +} + +.facebook-share.icon, .twitter-share.icon, .linkedin-share.icon, .identica-share.icon { + background: url(../images/socialsprite.png) no-repeat; + display:block; + text-indent:-100em; + height:25px; + width:25px; + margin-bottom:3px; +} + +.facebook-share.icon:hover, .twitter-share.icon:hover, .linkedin-share.icon:hover, .identica-share.icon:hover{ + opacity:0.8; + filter: alpha(opacity=80); +} + +.facebook-share.icon { + background-position: -26px 0px; +} +.identica-share.icon { + background-position: -78px 0px; +} +.twitter-share.icon { + margin-top:10px; + background-position: 0px 0px; +} +.linkedin-share.icon { + background-position: -52px 0px; +} + +/* -----Content pages, Login, About, FAQ, Users----- */ + +.openid-signin, +.meta, +.users-page, +{ + font-size:13px; + line-height:1.3; + color:@info-text-dark; + p{ + font-size:13px; + color:@info-text; + line-height:1.3; + font-family:@body-font; + color:@info-text-dark; + margin-bottom:12px; + } + h2{ + color:@info-text-dark; + padding-left:0px; + font-size:16px; + } + #id_email,#id_name{ + border:#cce6ec 3px solid; + height:25px; + padding-left:5px; + width:395px; + font-size:14px; + } + textarea{ + border:#cce6ec 3px solid; + padding-left:5px; + padding-top:5px; + width:395px; + font-size:14px; + } + input.submit{ + background:url(../images/small-button-blue.png) repeat-x top; + border:0; + color:@button-label; + font-weight:bold; + font-size:12px; + height:24px; + margin-top:-2px; + cursor:pointer; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080); + } + input.submit:hover{ + background:url(../images/small-button-blue.png) repeat-x bottom; + text-decoration:none; + } + .cancel{ + background:url(../images/small-button-cancel.png) repeat-x top !important; + color:#525252 !important; + } + .cancel:hover{ + background:url(../images/small-button-cancel.png) repeat-x bottom !important; + } +} + +#email-input-fs,#local_login_buttons,#password-fs,#openid-fs{ + margin-top:10px; + #id_email,#id_username,#id_password,input{ + font-size: 12px; + line-height: 20px; + height: 20px; + margin: 0px; + padding: 0px 0 0 5px; + border:#cce6ec 3px solid; + width:200px; + } + .submit-b{ + background:url(../images/small-button-blue.png) repeat-x top; + border:0; + color:@button-label; + font-weight:bold; + font-size:12px; + height:24px; + margin-top:-2px; + cursor:pointer; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080) + } + .submit-b:hover{ + background:url(../images/small-button-blue.png) repeat-x bottom; + } +} +.openid-input { + background: url(../images/openid.gif) no-repeat; + padding-left: 15px; + cursor: pointer; +} + +.openid-login-input { + background-position: center left; + background: url(../images/openid.gif) no-repeat 0% 50%; + padding: 5px 5px 5px 15px; + cursor: pointer; + font-family: Trebuchet MS; + font-weight: 300; + font-size: 150%; + width: 500px; +} + +.openid-login-submit { + height: 40px; + width: 80px; + line-height: 40px; + cursor: pointer; + border: 1px solid #777; + font-weight: bold; + font-size: 120%; +} + +/* People page */ + +.tabBar-user{ + width:375px; +} + +.user { + padding: 5px; + line-height: 140%; + width: 166px; + border:#eee 1px solid; + margin-bottom:5px; + .rounded-corners(3px); + .user-micro-info{ + color:@info-text-dark; + } + +} + +.user ul { + margin: 0; + list-style-type: none; +} + +.user .thumb { + clear: both; + float: left; + margin-right: 4px; + display: inline; +} + +/* tags page */ + +.tabBar-tags{ + width:270px; + margin-bottom:15px; +} + +/* badges page */ + +a.medal { + font-size: 17px; + line-height: 250%; + margin-right:5px; + color: #333; + text-decoration: none; + background: url(../images/medala.gif) no-repeat; + border-left: 1px solid #EEE; + border-top: 1px solid #EEE; + border-bottom: 1px solid #CCC; + border-right: 1px solid #CCC; + padding: 4px 12px 4px 6px; +} + +a:hover.medal { + color: #333; + text-decoration: none; + background: url(../images/medala_on.gif) no-repeat; + border-left: 1px solid #E7E296; + border-top: 1px solid #E7E296; + border-bottom: 1px solid #D1CA3D; + border-right: 1px solid #D1CA3D; +} + +#award-list{ + .user{ + float:left; + margin:5px; + } +} + +/* profile page */ + +.tabBar-profile{ + width:100%; + margin-bottom:15px; + float:left; +} + +.user-profile-page{ + font-size:13px; + color:@info-text-dark; + + p{ + font-size:13px; + line-height:1.3; + color:@info-text-dark; + } + .avatar img{ + border:#eee 1px solid; + padding:5px; + } + h2{ + padding:10px 0px 10px 0px; + font-family:@main-font; + } +} + +.user-details { + font-size: 13px; + h3{ + font-size:16px; + } +} + +.user-about { + background-color: #EEEEEE; + height: 200px; + line-height: 20px; + overflow: auto; + padding: 10px; + width: 90%; + p{font-size:13px;} +} + +.follow-toggle,.submit { + border:0 !important; + color:@button-label; + font-weight:bold; + font-size:12px; + height:26px; + line-height:26px; + margin-top:-2px; + font-size:15px; + cursor:pointer; + font-family:@main-font; + background:url(../images/small-button-blue.png) repeat-x top; + .rounded-corners(4px); + .text-shadow(0px,1px,0px,#E6F6FA); + .box-shadow(1px, 1px, 2px, #808080) +} + +.follow-toggle:hover, .submit:hover { + background:url(../images/small-button-blue.png) repeat-x bottom; + text-decoration:none !important; +} + +.follow-toggle .follow{ + font-color: #000; + font-style:normal; +} + +.follow-toggle .unfollow div.unfollow-red{ + display:none; +} + +.follow-toggle .unfollow:hover div.unfollow-red{ + display:inline; + color:#fff; + font-weight:bold; + color:#A05736; +} + +.follow-toggle .unfollow:hover div.unfollow-green{ + display:none; +} + +.count { + font-family: @main-font; + font-size: 200%; + font-weight: 700; + color: #777 +} + +.scoreNumber { + font-family: @main-font; + font-size: 35px; + font-weight: 800; + color: #777; + line-height: 40px; /*letter-spacing:0px*/ + margin-top: 3px; +} + +.vote-count { + font-family: Arial; + font-size: 160%; + font-weight: 700; + color: #777; +} + +.answer-summary { + display: block; + clear: both; + padding: 3px; +} + +.answer-votes { + background-color: #EEEEEE; + color: #555555; + float: left; + font-family: Arial; + font-size: 15px; + font-weight: bold; + height: 17px; + padding: 2px 4px 5px; + text-align: center; + text-decoration: none; + width: 20px; + margin-right: 10px; + .rounded-corners(4px); +} + +.karma-summary { + padding:5px; + font-size:13px; +} + +.karma-summary h3 { + text-align: center; + font-weight: bold; + padding:5px; +} + +.karma-diagram { + width:477px; + height:300px; + float:left; + margin-right:10px; +} + +.karma-details { + float:right; + width:450px; + height:250px; + overflow-y:auto; + word-wrap:break-word; + p{margin-bottom:10px;} +} + +.karma-gained { + font-weight:bold; + background:#eee; + width:25px; + margin-right:5px; + color:green; + padding:3px; + display:block; + float:left; + text-align:center; + .rounded-corners(3px); +} + +.karma-lost { + font-weight:bold; + background:#eee; + width:25px; + color:red; + padding:3px; + display:block; + margin-right:5px; + float:left; + text-align:center; + .rounded-corners(3px); +} + +.submit-row{ + margin-bottom:10px; +} + +/*----- Revision pages ----- */ + +.revision { + margin: 10px 0 10px 0; + font-size: 13px; + color:@info-text-dark; + + p{ + font-size:13px; + line-height:1.3; + color:@info-text-dark; + } + + h3{ + font-family:@main-font; + font-size:21px; + padding-left:0px; + } + + .header { + background-color: #F5F5F5; + padding: 5px; + cursor: pointer; + } + + .author { + background-color: #e9f3f5; + } + + .summary { + padding: 5px 0 10px 0; + } + + .summary span { + background-color:#fde785; + padding:6px; + .rounded-corners(4px); + display: inline; + .box-shadow(1px, 1px, 4px, #cfb852); + } + + .answerbody { + padding: 10px 0 5px 10px; + } + + .revision-mark { + width: 150px; + text-align: left; + display: inline-block; + font-size: 11px; + overflow: hidden; + + .gravatar{ + float:left; + margin-right:4px; + padding-top:5px; + } + } + + .revision-number { + font-size: 300%; + font-weight: bold; + font-family: sans-serif; + } +} + +del, del .post-tag { + color: #C34719; +} + +ins .post-tag, ins p, ins { + background-color: #E6F0A2; +} + +/* ----- Red Popup notification ----- */ + +.vote-notification { + z-index: 1; + cursor: pointer; + display: none; + position: absolute; + font-family:@secondary-font; + font-size:14px; + font-weight:normal; + color: white; + background-color: #8e0000; + text-align: center; + padding-bottom:10px; + .box-shadow(0px, 2px, 4px, #370000); + .rounded-corners(4px); + + h3{ + background:url(../images/notification.png) repeat-x top; + padding:10px 10px 10px 10px; + font-size:13px; + margin-bottom:5px; + border-top:#8e0000 1px solid; + color:#fff; + font-weight:normal; + .rounded-corners-top(4px); + } + a { + color: #fb7321; + text-decoration: underline; + font-weight:bold; + } + +} + + +/* ----- Footer links , check blocks/footer.html----- */ + +#ground { + width: 100%; + clear: both; + border-top: 1px solid #000; + padding: 6px 0 0 0; + background: @header-color; + font-size:16px; + font-family:@main-font; + + p { + margin-bottom:0; + } +} + +.footer-links { + color: #EEE; + text-align:left; + width:500px; + float:left; + a { + color: #e7e8a8; + } +} + +.powered-link{ + width:500px; + float:left; + text-align:left; + a{ + color:#8ebcc7; + } +} + +.copyright{ + color:#616161; + width:450px; + float:right; + text-align:right; + + a{ + color:#8ebcc7; + } + img.license-logo { + margin: 6px 0px 20px 10px; + float:right; + } +} + + +.notify-me { + float: left; +} + + +span.text-counter { + margin-right: 20px; +} + +span.form-error { + color: #990000; + font-weight: normal; + margin-left: 5px; +} + +p.form-item { + margin: 0px; +} + + + + +.deleted { + background: #F4E7E7 none repeat scroll 0 0; +} + + +/* openid styles */ +.form-row { + line-height: 25px; +} + +table.form-as-table { + margin-top: 5px; +} + +table.form-as-table ul { + list-style-type: none; + display: inline; +} + +table.form-as-table li { + display: inline; +} + +table.form-as-table td { + text-align: right; +} + +table.form-as-table th { + text-align: left; + font-weight: normal; +} + +table.ab-subscr-form { + width: 45em; +} + +table.ab-tag-filter-form { + width: 45em; +} + +.submit-row { + line-height: 30px; + padding-top: 10px; + display: block; + clear: both; +} + +.errors { + line-height: 20px; + color: red; +} + +.error { + color: darkred; + margin: 0; + font-size: 10px; +} + +label.retag-error { + color: darkred; + padding-left: 5px; + font-size: 10px; +} + +.fieldset { + border: none; + margin-top: 10px; + padding: 10px; +} + + +span.form-error { + color: #990000; + font-size: 90%; + font-weight: normal; + margin-left: 5px; +} + + +/* +.favorites-count-off { + color: #919191; + float: left; + text-align: center; +} + +.favorites-count { + color: #D4A849; + float: left; + text-align: center; +} +*/ + +/* todo: get rid of this in html */ +.favorites-empty { + width: 32px; + height: 45px; + float: left; +} + +.user-info-table { + margin-bottom: 10px; + border-spacing: 0; +} + +/* todo: remove this hack? */ +.user-stats-table .narrow { + width: 660px; +} + +.narrow .summary h3 { + padding: 0px; + margin: 0px; +} + +.relativetime { + font-weight: bold; + text-decoration: none; +} + +.narrow .tags { + float: left; +} + + + + +/* todo: make these more semantic */ +.user-action-1 { + font-weight: bold; + color: #333; +} + +.user-action-2 { + font-weight: bold; + color: #CCC; +} + +.user-action-3 { + color: #333; +} + +.user-action-4 { + color: #333; +} + +.user-action-5 { + color: darkred; +} + +.user-action-6 { + color: darkred; +} + +.user-action-7 { + color: #333; +} + +.user-action-8 { + padding: 3px; + font-weight: bold; + background-color: #CCC; + color: #763333; +} + +.revision-summary { + background-color: #FFFE9B; + padding: 2px; +} + +.question-title-link a { + font-weight: bold; + color: #0077CC; +} + +.answer-title-link a { + color: #333; +} + +/* todo: make these more semantic */ +.post-type-1 a { + font-weight: bold; + +} + +.post-type-3 a { + font-weight: bold; + +} + +.post-type-5 a { + font-weight: bold; +} + +.post-type-2 a { + color: #333; +} + +.post-type-4 a { + color: #333; +} + +.post-type-6 a { + color: #333; +} + +.post-type-8 a { + color: #333; +} + +.hilite { + background-color: #ff0; +} + +.hilite1 { + background-color: #ff0; +} + +.hilite2 { + background-color: #f0f; +} + +.hilite3 { + background-color: #0ff; +} + +.gold, .badge1 { + color: #FFCC00; +} + +.silver, .badge2 { + color: #CCCCCC; +} + +.bronze, .badge3 { + color: #CC9933; +} + +.score { + font-weight: 800; + color: #333; +} + + +a.comment { + background: #EEE; + color: #993300; + padding: 5px; +} + +a.offensive { + color: #999; +} + +.message h1 { + padding-top: 0px; + font-size: 15px; +} + +.message p { + margin-bottom: 0px; +} + +p.space-above { + margin-top: 10px; +} + +.warning { + color: red; +} + + + +button::-moz-focus-inner { + padding:0; + border:none; +} +.submit { + cursor: pointer; /*letter-spacing:1px;*/ + background-color: #D4D0C8; + height: 30px; + border: 1px solid #777777; /* width:100px; */ + font-weight: bold; + font-size: 120%; +} + +.submit:hover { + text-decoration: underline; +} + +.submit.small { + margin-right:5px; + height:20px; + font-weight:normal; + font-size:12px; + padding:1px 5px; +} +.submit.small:hover { + text-decoration:none; +} +.question-page a.submit { + display: -moz-inline-stack; + display: inline-block; + line-height: 30px; + padding: 0 5px; + *display: inline; +} + +.noscript { + position: fixed; + top: 0px; + left: 0px; + width: 100%; + z-index: 100; + padding: 5px 0; + text-align: center; + font-family: sans-serif; + font-size: 120%; + font-weight: Bold; + color: #FFFFFF; + background-color: #AE0000; +} + +.big { + font-size: 14px; +} + +.strong { + font-weight: bold; +} + +.orange {/* used in django.po */ + color: #d64000; + font-weight: bold; +} + +.grey { + color: #808080; +} + +.about div { + padding: 10px 5px 10px 5px; + border-top: 1px dashed #aaaaaa; +} + +.highlight { + background-color: #FFF8C6; +} + +.nomargin { + margin: 0; +} + +.margin-bottom { + margin-bottom: 10px; +} + +.margin-top { + margin-top: 10px; +} + +.inline-block { + display: inline-block; +} + +.action-status { + margin: 0; + border: none; + text-align: center; + line-height: 10px; + font-size: 12px; + padding: 0; +} + +.action-status span { + padding: 3px 5px 3px 5px; + background-color: #fff380; /* nice yellow */ + font-weight: normal; + -moz-border-radius: 5px; + -khtml-border-radius: 5px; + -webkit-border-radius: 5px; +} + +.list-table td { + vertical-align: top; +} + +/* these need to go */ +table.form-as-table .errorlist { + display: block; + margin: 0; + padding: 0 0 0 5px; + text-align: left; + font-size: 10px; + color: darkred; +} + +table.form-as-table input { + display: inline; + margin-left: 4px; +} + +table.form-as-table th { + vertical-align: bottom; + padding-bottom: 4px; +} + +.form-row-vertical { + margin-top: 8px; + display: block; +} + +.form-row-vertical label { + margin-bottom: 3px; + display: block; +} + +/* above stuff needs to go */ +.text-align-right { + text-align: center; +} + +ul.form-horizontal-rows { + list-style: none; + margin: 0; +} + +ul.form-horizontal-rows li { + position: relative; + height: 40px; +} + +ul.form-horizontal-rows label { + display: inline-block; +} + +ul.form-horizontal-rows ul.errorlist { + list-style: none; + color: darkred; + font-size: 10px; + line-height: 10px; + position: absolute; + top: 2px; + left: 180px; + text-align: left; + margin: 0; +} + +ul.form-horizontal-rows ul.errorlist li { + height: 10px; +} + +ul.form-horizontal-rows label { + position: absolute; + left: 0px; + bottom: 6px; + margin: 0px; + line-height: 12px; + font-size: 12px; +} + +ul.form-horizontal-rows li input { + position: absolute; + bottom: 0px; + left: 180px; + margin: 0px; +} + +.narrow .summary { + float: left; +} + +.user-profile-tool-links { + font-weight: bold; + vertical-align: top; +} + + +ul.post-tags { + margin-left: 7px; +} +ul.post-tags li { + margin-top: 4px; + margin-bottom: 3px; +} + +ul.post-retag { + margin-bottom:0px; + margin-left:5px; +} + +#question-controls .tags { + margin: 0 0 3px 0; +} + +#tagSelector { + padding-bottom: 2px; + margin-bottom: 0; +} + +#related-tags { + padding-left: 3px; +} + +#hideIgnoredTagsControl { + margin: 5px 0 0 0; +} + +#hideIgnoredTagsControl label { + font-size: 12px; + color: #666; +} + +#hideIgnoredTagsCb { + margin: 0 2px 0 1px; +} + +#recaptcha_widget_div { + width: 318px; + float: left; + clear: both; +} + +p.signup_p { + margin: 20px 0px 0px 0px; +} + +.simple-subscribe-options ul { + list-style: none; + list-style-position: outside; + margin: 0; +} + +/* a workaround to set link colors correctly */ + +.wmd-preview a { + color:@link; +} + +.wmd-preview li { + margin-bottom:7px; + font-size:14px; +} + +.search-result-summary { + font-weight: bold; + font-size:18px; + line-height:22px; + margin:0px 0px 0px 0px; + padding:2px 0 0 0; + float: left; +} + +.faq-rep-item { + text-align:right; + padding-right:5px; +} + + +.user-info-table .gravatar { + margin:0; +} + +#responses { + clear:both; + line-height:18px; + margin-bottom:15px; +} + +#responses div.face { + float:left; + text-align: center; + width: 54px; + padding: 3px; + overflow:hidden; +} + +.response-parent { + margin-top: 18px; +} + +.response-parent strong{ + font-size: 20px; +} + +.re { + min-height: 57px; + clear: both; + margin-top: 10px; +} + +#responses input { + float:left; +} +#re_tools { + margin-bottom:10px; +} +#re_sections { + margin-bottom:6px; +} +#re_sections .on { + font-weight:bold; +} + +.avatar-page ul { + list-style: none; +} +.avatar-page li { + display: inline; +} +.user-profile-page .avatar p { + margin-bottom: 0px; +} +.user-profile-page .tabBar a#stats { + margin-left: 0; +} +.user-profile-page img.gravatar { + margin: 2px 0 3px 0; +} +.user-profile-page h3 { + padding: 0; + margin-top: -3px; +} +.userList { + font-size: 13px; +} + +img.flag { + border: 1px solid #eee; + vertical-align: text-top; +} + +.main-page img.flag { + vertical-align: text-bottom; +} + + +/* Pretty printing styles. Used with prettify.js. */ + +a.edit { + padding-left:3px; + color: #145bff; +} + +.str { color: #080; } +.kwd { color: #008; } +.com { color: #800; } +.typ { color: #606; } +.lit { color: #066; } +.pun { color: #660; } +.pln { color: #000; } +.tag { color: #008; }/* name conflict here */ +.atn { color: #606; } +.atv { color: #080; } +.dec { color: #606; } +pre.prettyprint { padding: 3px; border: 0px solid #888; } + +@media print { + .str { color: #060; } + .kwd { color: #006; font-weight: bold; } + .com { color: #600; font-style: italic; } + .typ { color: #404; font-weight: bold; } + .lit { color: #044; } + .pun { color: #440; } + .pln { color: #000; } + .tag { color: #006; font-weight: bold; } + .atn { color: #404; } + .atv { color: #060; } +} diff --git a/askbot/skins/default/templates/about.html b/askbot/skins/default/templates/about.html index fce4223e..d5d1b949 100644 --- a/askbot/skins/default/templates/about.html +++ b/askbot/skins/default/templates/about.html @@ -2,7 +2,7 @@ <!-- template about.html --> {% block title %}{% spaceless %}{% trans site_name=settings.APP_SHORT_NAME %}About {{site_name}}{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans site_name=settings.APP_SHORT_NAME %}About {{site_name}}{% endtrans %}</h1> +<h1 class="section-title">{% trans site_name=settings.APP_SHORT_NAME %}About {{site_name}}{% endtrans %}</h1> <div class="content"> {{settings.FORUM_ABOUT}} </div> diff --git a/askbot/skins/default/templates/answer_edit.html b/askbot/skins/default/templates/answer_edit.html index 168ba784..bbf3edef 100644 --- a/askbot/skins/default/templates/answer_edit.html +++ b/askbot/skins/default/templates/answer_edit.html @@ -6,24 +6,25 @@ <link rel="stylesheet" type="text/css" href="{{"/js/wmd/wmd.css"|media}}" /> {% endblock %} {% block content %} -<h1> +<h1 class="section-title"> {% trans %}Edit answer{% endtrans %} [<a href="{{ answer.question.get_absolute_url() }}#{{ answer.id }}">{% trans %}back{% endtrans %}</a>] </h1> <div id="main-body" class="ask-body"> <form id="fmedit" action="{% url edit_answer answer.id %}" method="post" >{% csrf_token %} - <label for="id_revision" ><strong>{% trans %}revision{% endtrans %}:</strong></label> <br/> + <label for="id_revision" >{% trans %}revision{% endtrans %}:</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{% endtrans %}"> </div> {{ macros.edit_post(form) }} + {% if settings.WIKI_ON and answer.wiki == False %} + {{ macros.checkbox_in_div(form.wiki) }} + {% endif %} <div class="after-editor"> <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> </div> - {% if settings.WIKI_ON and answer.wiki == False %} - {{ macros.checkbox_in_div(form.wiki) }} - {% endif %} + </form> </div> {% endblock %} diff --git a/askbot/skins/default/templates/badge.html b/askbot/skins/default/templates/badge.html index ee7f5360..d1f75617 100644 --- a/askbot/skins/default/templates/badge.html +++ b/askbot/skins/default/templates/badge.html @@ -1,9 +1,10 @@ {% extends "two_column_body.html" %} {% import "macros.html" as macros %} +{%from "macros.html" import gravatar %} <!-- template badge.html --> {% block title %}{% spaceless %}{% trans name=badge.name %}{{name}}{% endtrans %} - {% trans %}Badge{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans name=badge.name %}Badge "{{name}}"{% endtrans %}</h1> +<h1 class="section-title">{% trans name=badge.name %}Badge "{{name}}"{% endtrans %}</h1> <p> <a href="{{badge.get_absolute_url()}}" title="{{ badge.get_type_display() }} : {% trans description=badge.description %}{{description}}{% endtrans %}" class="medal"><span class="{{ badge.css_class }}">●</span> {% trans name=badge.name%}{{name}}{% endtrans %}</a> {% trans description=badge.description %}{{description}}{% endtrans %} </p> @@ -13,11 +14,16 @@ <strong>{% trans num_awardees=badge_recipients|length %}user received this badge:{% pluralize %}users received this badge:{% endtrans %}</strong></p> {% endif %} </div> - <div id="award-list" style="clear:both;margin-left:20px;line-height:25px;"> + <div class="clean"></div> + <div id="award-list"> {% for recipient in badge_recipients %} - <p style="width:180px;float:left"><a href="{{ recipient.get_absolute_url() }}">{{ recipient.username }}</a> - {{ macros.user_score_and_badge_summary(recipient) }} - </p> + <div class="user"> + <ul> + <li class="thumb">{{ gravatar(recipient, 32) }}</li> + <li><a href="{{ recipient.get_absolute_url() }}">{{recipient.username}}</a></li> + <li>{{ macros.user_score_and_badge_summary(recipient) }}</li> + </ul> + </div> {% endfor %} </div> {% endblock %} diff --git a/askbot/skins/default/templates/badges.html b/askbot/skins/default/templates/badges.html index bbd09951..08827da3 100644 --- a/askbot/skins/default/templates/badges.html +++ b/askbot/skins/default/templates/badges.html @@ -2,7 +2,7 @@ <!-- template badges.html --> {% block title %}{% spaceless %}{% trans %}Badges summary{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans %}Badges{% endtrans %}</h1> +<h1 class="section-title">{% trans %}Badges{% endtrans %}</h1> <p> {% trans %}Community gives you awards for your questions, answers and votes.{% endtrans %}<br/> {% trans %}Below is the list of available badges and number @@ -31,7 +31,7 @@ of times each type of badge has been awarded. Give us feedback at {{feedback_faq </div> {% endblock %} {% block sidebar %} -<div class="boxC"> +<div class="box"> <h2>{% trans %}Community badges{% endtrans %}</h2> <p> <a style="cursor:default;" title="{% trans %}gold badge: the highest honor and is very rare{% endtrans %}" class="medal"><span class="badge1">●</span> {% trans %}gold{% endtrans %}</a> diff --git a/askbot/skins/default/templates/base.html b/askbot/skins/default/templates/base.html index f84e031d..9e44494b 100644 --- a/askbot/skins/default/templates/base.html +++ b/askbot/skins/default/templates/base.html @@ -14,7 +14,7 @@ {% endif %} </head> {% endspaceless %} - <body class="{% block body_class %}{% endblock %}{% if page_class %} {{page_class}}{% endif %}"> + <body class="{% block body_class %}{% endblock %}{% if user_messages %} user-messages{% endif %}{% if page_class %} {{page_class}}{% endif %}"> {% include "widgets/system_messages.html" %} {% include "custom_header.html" ignore missing %} {% include "widgets/header.html" %} {# Logo, user tool navigation and meta navitation #} diff --git a/askbot/skins/default/templates/faq.html b/askbot/skins/default/templates/faq.html index be25d2ee..51873a06 100644 --- a/askbot/skins/default/templates/faq.html +++ b/askbot/skins/default/templates/faq.html @@ -3,6 +3,7 @@ {% block title %}{% spaceless %}{% trans %}FAQ{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} <div class="content"> +<h1 class="section-title">FAQ</h1> {{forum_faq}} </div> {% endblock %} diff --git a/askbot/skins/default/templates/feedback.html b/askbot/skins/default/templates/feedback.html index d5e8b3a7..60ea2fca 100644 --- a/askbot/skins/default/templates/feedback.html +++ b/askbot/skins/default/templates/feedback.html @@ -2,7 +2,7 @@ <!-- template feedback.html --> {% block title %}{% spaceless %}{% trans %}Feedback{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans %}Give us your feedback!{% endtrans %}</h1> +<h1 class="section-title">{% trans %}Give us your feedback!{% endtrans %}</h1> <form method="post" action="{% url feedback %}" accept-charset="utf-8">{% csrf_token %} {% if user.is_authenticated() %} <p class="message"> @@ -39,7 +39,7 @@ {{form.next}} <div class="submit-row"> <input type="submit" class="submit" value="{% trans %}Send Feedback{% endtrans %}"/> - <input type="submit" class="submit" name="cancel" value="{% trans %}Cancel{% endtrans %}"/> + <input type="submit" class="submit cancel" name="cancel" value="{% trans %}Cancel{% endtrans %}"/> </div> </form> {% endblock %} diff --git a/askbot/skins/default/templates/macros.html b/askbot/skins/default/templates/macros.html index c13595f4..680b9d7b 100644 --- a/askbot/skins/default/templates/macros.html +++ b/askbot/skins/default/templates/macros.html @@ -21,6 +21,32 @@ </div> {%- endmacro -%} +{%- macro post_vote_buttons(post = None, visitor_vote = None) -%} +<div + id="{{post.post_type}}-img-upvote-{{ post.id }}" + class="{{post.post_type}}-img-upvote post-vote{% if visitor_vote == 1 %} on{% endif %}" + {% if post.post_type == 'question' %} + title="{% trans %}i like this question (click again to cancel){% endtrans %}" + {% else %} + title="{% trans %}i like this answer (click again to cancel){% endtrans %}" + {% endif %} +/></div> +<div + id="{{post.post_type}}-vote-number-{{ post.id }}" + class="vote-number" + title="{% trans %}current number of votes{% endtrans %}" +>{{ post.score }}</div> +<div + id="{{post.post_type}}-img-downvote-{{ post.id }}" + class="{{post.post_type}}-img-downvote post-vote{% if visitor_vote == -1 %} on{% endif %}" + {% if post.post_type == 'question' %} + title="{% trans %}i dont like this question (click again to cancel){% endtrans %}" + {% else %} + title="{% trans %}i dont like this answer (click again to cancel){% endtrans %}" + {% endif %} +/></div> +{%- endmacro -%} + {%- macro post_contributor_avatar_and_credentials(post, user) -%} {% if post.is_anonymous %} <img alt="{% trans %}anonymous user{% endtrans %}" src="{{ '/images/anon.png'|media }} " class="gravatar" width="32" height="32" /> @@ -49,7 +75,7 @@ poor design of the data or methods on data objects #} {% endif %} <strong>{{post.added_at|diff_date}}</strong> </p> - <img + <img width="35" height="35" src="{{'/images/wiki.png'|media}}" alt="{% trans %}this post is marked as community wiki{% endtrans %}" style="float:left" @@ -66,7 +92,7 @@ poor design of the data or methods on data objects #} {% else %} {% trans %}posted{% endtrans %} {% endif %} - {% if post.__class__.__name__ in ('QuestionRevision', 'AnswerRevision') %} + {% if post.__class__.__name__ == 'PostRevision' %} <strong>{{post.revised_at|diff_date}}</strong> {% else %} <strong>{{post.added_at|diff_date}}</strong> @@ -80,7 +106,7 @@ poor design of the data or methods on data objects #} {% set last_edited_at = post.last_edited_at %} {% set original_author = post.author %} {% set update_author = post.last_edited_by %} - {% elif post.__class__.__name__ in ('QuestionRevision', 'AnswerRevision') %} + {% elif post.__class__.__name__ == 'PostRevision' %} {% set last_edited_at = post.revised_at %} {% set original_author = None %}{# fake value to force display widget in the revision views #} {% set update_author = post.author %} @@ -260,7 +286,7 @@ for the purposes of the AJAX comment editor #} >{{comment.user.username}}</a> <span class="age"> ({{comment.added_at|diff_date}})</span> {% if user|can_edit_comment(comment) %} - <a class="edit">{% trans %}edit{% endtrans %}</a> + <a class="edit">{% trans %}edit{% endtrans %}</a> {% endif %} </div> </div> @@ -300,6 +326,9 @@ for the purposes of the AJAX comment editor #} ) -%} {% spaceless %} + {% if post.comment_count > 0 %} + <h2 id="comment-title">Comments</h2> + {% endif %} {% set widget_id = 'comments-for-' + post.post_type + '-' + post.id|string %} <div class="comments" id="{{widget_id}}"> <div class="content"> @@ -428,7 +457,7 @@ answer {% if answer.accepted %}accepted-answer{% endif %} {% if answer.author_id {%- endmacro -%} {%- macro user_score_and_badge_summary(user) -%} - {%include "widgets/user_long_score_and_badge_summary.html"%} + {%include "widgets/user_score_and_badge_summary.html"%} {%- endmacro -%} {%- macro follow_toggle(follow, name, alias, id) -%} diff --git a/askbot/skins/default/templates/main_page/javascript.html b/askbot/skins/default/templates/main_page/javascript.html index deef318c..e35113dd 100644 --- a/askbot/skins/default/templates/main_page/javascript.html +++ b/askbot/skins/default/templates/main_page/javascript.html @@ -34,8 +34,13 @@ askbot['urls']['unmark_tag'] = scriptUrl + '{% url unmark_tag %}'; askbot['urls']['set_tag_filter_strategy'] = '{% url "set_tag_filter_strategy" %}'; askbot['urls']['questions'] = '{% url "questions" %}'; + {% if settings.ASKBOT_TRANSLATE_URL %} askbot['urls']['question_url_template'] = scriptUrl + '{% trans %}question/{% endtrans %}{{ "{{QuestionID}}/" }}'; askbot['urls']['user_url_template'] = scriptUrl + '{% trans %}users/{% endtrans %}{{ "{{user_id}}" }}/{{ "{{slug}}" }}/'; + {% else %} + askbot['urls']['question_url_template'] = scriptUrl + 'question/{{ "{{QuestionID}}/" }}'; + askbot['urls']['user_url_template'] = scriptUrl + 'users/{{ "{{user_id}}" }}/{{ "{{slug}}" }}/'; + {% endif %} askbot['messages']['name_of_anonymous_user'] = '{{ name_of_anonymous_user }}'; </script> <script type='text/javascript' src='{{"/js/editor.js"|media}}'></script> diff --git a/askbot/skins/default/templates/main_page/nothing_found.html b/askbot/skins/default/templates/main_page/nothing_found.html index 50f2f340..e6d65ea5 100644 --- a/askbot/skins/default/templates/main_page/nothing_found.html +++ b/askbot/skins/default/templates/main_page/nothing_found.html @@ -5,7 +5,7 @@ {% endif %} {% if scope == "favorite" %} {% trans %}No questions here. {% endtrans %} - {% trans %}Please star (bookmark) some questions or follow some users.{% endtrans %} + {% trans %}Please follow some questions or follow some users.{% endtrans %} {% endif %} </p> {% if query or search_tags or author_name %} diff --git a/askbot/skins/default/templates/main_page/tab_bar.html b/askbot/skins/default/templates/main_page/tab_bar.html index dc4ede35..5ed6e5b5 100644 --- a/askbot/skins/default/templates/main_page/tab_bar.html +++ b/askbot/skins/default/templates/main_page/tab_bar.html @@ -1,7 +1,11 @@ {% import "macros.html" as macros %} {% cache 0 "scope_sort_tabs" search_tags request.user scope sort query context.page context.page_size language_code %} <a class="rss" + {% if feed_url %} + href="{{settings.APP_URL}}{{feed_url}}" + {% else %} href="{{settings.APP_URL}}/feeds/rss/" + {% endif %} title="{% trans %}subscribe to the questions feed{% endtrans %}" >{% trans %}RSS{% endtrans %} </a> diff --git a/askbot/skins/default/templates/meta/bottom_scripts.html b/askbot/skins/default/templates/meta/bottom_scripts.html index 1f63b468..0df25e7c 100644 --- a/askbot/skins/default/templates/meta/bottom_scripts.html +++ b/askbot/skins/default/templates/meta/bottom_scripts.html @@ -37,11 +37,8 @@ src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js" {% endif %} ></script> -<script type='text/javascript' src="{{"/js/i18n.js"|media }}"></script> -<script type='text/javascript' src="{{"/js/jquery.i18n.js"|media }}"></script> -<script type='text/javascript' src="{% url "askbot_jsi18n" %}"></script> <script type='text/javascript' src="{{"/js/utils.js"|media }}"></script> -<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700' rel='stylesheet' type='text/css'> +<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script> {% if settings.ENABLE_MATHJAX %} <script type='text/javascript' src="{{settings.MATHJAX_BASE_URL}}/MathJax.js"> MathJax.Hub.Config({ diff --git a/askbot/skins/default/templates/meta/html_head_stylesheets.html b/askbot/skins/default/templates/meta/html_head_stylesheets.html index 9d5aebad..4e3f173b 100644 --- a/askbot/skins/default/templates/meta/html_head_stylesheets.html +++ b/askbot/skins/default/templates/meta/html_head_stylesheets.html @@ -1,5 +1,10 @@ -<link href="{{"/style/style.css"|media }}" rel="stylesheet/less" type="text/css" /> +{%if settings.DEBUG %} +<link href="{{"/style/style.less"|media }}" rel="stylesheet/less" type="text/css" /> <script type="text/javascript" src="{{"/js/less.min.js"|media}}"></script> +{%else%} +<link href="{{"/style/style.css"|media }}" rel="stylesheet" type="text/css" /> +{%endif%} +<link href='http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:300,400,700' rel='stylesheet' type='text/css'> {{ skin.get_extra_css_link() }} {% if settings.USE_CUSTOM_CSS %} <link @@ -8,8 +13,3 @@ type="text/css" /> {% endif %} -{% if user_messages %} -<style type="text/css"> - body { margin-top:2.4em; } -</style> -{% endif %} diff --git a/askbot/skins/default/templates/privacy.html b/askbot/skins/default/templates/privacy.html index 61f4d945..e9b6f58b 100644 --- a/askbot/skins/default/templates/privacy.html +++ b/askbot/skins/default/templates/privacy.html @@ -1,8 +1,8 @@ -{% extends "one_column_body.html" %} +{% extends "two_column_body.html" %} <!-- privacy.html --> {% block title %}{% spaceless %}{% trans %}Privacy policy{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1>{% trans %}Privacy policy{% endtrans %}</h1> +<h1 class="section-title">{% trans %}Privacy policy{% endtrans %}</h1> {{settings.FORUM_PRIVACY}} {% endblock %} <!-- end privacy.html --> diff --git a/askbot/skins/default/templates/question/answer_card.html b/askbot/skins/default/templates/question/answer_card.html index 097dbbfd..1d7380c5 100644 --- a/askbot/skins/default/templates/question/answer_card.html +++ b/askbot/skins/default/templates/question/answer_card.html @@ -2,27 +2,24 @@ <div id="answer-container-{{ answer.id }}" class="{{ macros.answer_classes(answer, question) }}"> - <table class="answer-table"> - <tr> - <td> - <div class="vote-buttons"> - {% include "question/answer_vote_buttons.html" %} + <div class="vote-buttons"> + {% include "question/answer_vote_buttons.html" %} + </div> + <div class="answer-table"> + + <div class="item-right"> + <div class="answer-body"> + <div class="post-update-info-container"> + {% include "question/answer_author_info.html" %} </div> - </td> - <td> - <div class="item-right"> - <div class="answer-body"> - {{ answer.html }} - </div> - <div class="answer-controls post-controls"> - {% include "question/answer_controls.html" %} - </div> - <div class="post-update-info-container"> - {% include "question/answer_author_info.html" %} - </div> - {% include "question/answer_comments.html" %} - </div> - </td> - </tr> - </table> + {{ answer.html }} + </div> + <div class="answer-controls post-controls"> + {% include "question/answer_controls.html" %} + </div> + {% include "question/answer_comments.html" %} + </div> + </div> + <div class="clean"></div> </div> +<div class="clean"></div> diff --git a/askbot/skins/default/templates/question/answer_tab_bar.html b/askbot/skins/default/templates/question/answer_tab_bar.html index 227a9f81..3e39f795 100644 --- a/askbot/skins/default/templates/question/answer_tab_bar.html +++ b/askbot/skins/default/templates/question/answer_tab_bar.html @@ -1,12 +1,15 @@ -<div class="tabBar"> - <h2 id="sort-top"> - {% trans counter=answers|length %} - {{counter}} Answer: - {% pluralize %} - {{counter}} Answers: - {% endtrans %} +<div class="tabBar tabBar-answer"> + <h2 id="questionCount"> + {% trans counter=answers|length %} + {{counter}} Answer + {% pluralize %} + {{counter}} Answers + {% endtrans %} </h2> <div class="tabsA"> + <span class="label"> + Sort by » + </span> <a id="oldest" href="{{ question.get_absolute_url() }}?sort=oldest#sort-top" title="{% trans %}oldest answers will be shown first{% endtrans %}" ><span>{% trans %}oldest answers{% endtrans %}</span></a> @@ -18,3 +21,4 @@ ><span>{% trans %}popular answers{% endtrans %}</span></a> </div> </div> +<div class="clean"></div> diff --git a/askbot/skins/default/templates/question/javascript.html b/askbot/skins/default/templates/question/javascript.html index 552155de..c5dd9f37 100644 --- a/askbot/skins/default/templates/question/javascript.html +++ b/askbot/skins/default/templates/question/javascript.html @@ -11,9 +11,14 @@ askbot['urls']['editComment'] = '{% url edit_comment %}'; askbot['urls']['deleteComment'] = '{% url delete_comment %}'; askbot['urls']['getComment'] = '{% url get_comment %}'; + {%if settings.ASKBOT_TRANSLATE_URL %} askbot['urls']['question_url_template'] = scriptUrl + '{% trans %}question/{% endtrans %}{{ "{{QuestionID}}/{{questionSlug}}" }}';{# yes it needs to be that whacky #} - askbot['urls']['user_signin'] = '{{ settings.LOGIN_URL }}'; askbot['urls']['vote_url_template'] = scriptUrl + '{% trans %}questions/{% endtrans %}{{ "{{QuestionID}}/" }}{% trans %}vote/{% endtrans %}'; + {%else%} + askbot['urls']['question_url_template'] = scriptUrl + 'question/{{ "{{QuestionID}}/{{questionSlug}}" }}';{# yes it needs to be that whacky #} + askbot['urls']['vote_url_template'] = scriptUrl + 'questions/{{ "{{QuestionID}}/" }}vote/'; + {%endif%} + askbot['urls']['user_signin'] = '{{ settings.LOGIN_URL }}'; askbot['urls']['swap_question_with_answer'] = '{% url swap_question_with_answer %}'; askbot['urls']['upvote_comment'] = '{% url upvote_comment %}'; askbot['messages']['addComment'] = '{% trans %}add comment{% endtrans %}'; diff --git a/askbot/skins/default/templates/question/question_card.html b/askbot/skins/default/templates/question/question_card.html index 9364d3fd..b1fa1743 100644 --- a/askbot/skins/default/templates/question/question_card.html +++ b/askbot/skins/default/templates/question/question_card.html @@ -1,24 +1,22 @@ -<h1><a href="{{ question.get_absolute_url() }}">{{ question.get_question_title() }}</a></h1> -{% include "question/question_tags.html" %} -<table id="question-table" {% if question.deleted %}class="deleted"{%endif%}> - <tr> - <td> - <div class="vote-buttons"> - {% include "question/question_vote_buttons.html"%} - {% include "question/share_buttons.html"%} - </div> - </td> - <td> - <div class="question-body"> - {{question.html}} - </div> - <div id="question-controls" class="post-controls"> - {% include "question/question_controls.html" %} - </div> +<div class="vote-buttons"> + {% include "question/question_vote_buttons.html"%} + {% include "question/share_buttons.html"%} +</div> +<div class="question-content"> + + <h1><a href="{{ question.get_absolute_url() }}">{{ question.get_question_title() }}</a></h1> + {% include "question/question_tags.html" %} + <div id="question-table" {% if question.deleted %}class="deleted"{%endif%}> + <div class="question-body"> <div class="post-update-info-container"> {% include "question/question_author_info.html" %} </div> - {% include "question/question_comments.html" %} - </td> - </tr> -</table> + {{question.html}} + </div> + <div id="question-controls" class="post-controls"> + {% include "question/question_controls.html" %} + </div> + {% include "question/question_comments.html" %} + </div> +</div> +<div class="clean"></div> diff --git a/askbot/skins/default/templates/question/sidebar.html b/askbot/skins/default/templates/question/sidebar.html index ab3a9ace..d011d562 100644 --- a/askbot/skins/default/templates/question/sidebar.html +++ b/askbot/skins/default/templates/question/sidebar.html @@ -1,7 +1,7 @@ {% import "macros.html" as macros %} {{ settings.SIDEBAR_QUESTION_HEADER }} <div class="box vote-buttons"> - <h2 id="questionTools">{% trans %}Question tools{% endtrans %}</h2> + <h2 >{% trans %}Question tools{% endtrans %}</h2> {% if favorited %} <a class="button followed" alt="{% trans %}click to unfollow this question{% endtrans %}"> @@ -9,7 +9,7 @@ <div class='unfollow'>{% trans %}Unfollow{% endtrans %}</div> </a> {% else %} - <a class="button follow" + <a class="button followed" alt="{% trans %}click to follow this question{% endtrans %}"> {%trans %}Follow{%endtrans%} </a> @@ -38,33 +38,12 @@ </div> </div> {% cache 0 "questions_tags" questions_tags question.id language_code %} -{% if settings.SIDEBAR_QUESTION_SHOW_TAGS %} - <div class="box"> - <div class="clearfix"></div> - <h2> - {% trans %}Question tags{% endtrans %}: - </h2> - <ul id="related-tags" class="tags"> - {% for tag in tags %} - <li> - {{ macros.tag_widget( - tag, - html_tag = 'div', - url_params = 'start_over=true', - extra_content = '<span class="tag-number">× ' ~ - tag.used_count|intcomma ~ '</span>' - ) - }} - </li> - {% endfor %} - </ul> - </div> -{% endif %} + {% if settings.SIDEBAR_QUESTION_SHOW_META %} -<div class="box"> +<div class="box statsWidget"> <div class="clearfix"></div> - <h2>{% trans %}Stats:{% endtrans %}</h2> + <h2>{% trans %}Stats{% endtrans %}</h2> <p> {% trans %}question asked{% endtrans %}: <strong title="{{ question.added_at }}">{{question.added_at|diff_date}}</strong> </p> diff --git a/askbot/skins/default/templates/question_edit.html b/askbot/skins/default/templates/question_edit.html index 3cdcd8bb..47873e0e 100644 --- a/askbot/skins/default/templates/question_edit.html +++ b/askbot/skins/default/templates/question_edit.html @@ -6,7 +6,7 @@ <link rel="stylesheet" type="text/css" href="{{"/js/wmd/wmd.css"|media}}" /> {% endblock %} {% block content %} -<h1>{% trans %}Edit question{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]</h1> +<div class="section-title">{% trans %}Edit question{% endtrans %} [<a href="{{ question.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>]</div> <form id="fmedit" action="{% url edit_question question.id %}" method="post" >{% csrf_token %} {% if revision_form.revision.errors %}{{ revision_form.revision.errors.as_ul() }}{% endif %} @@ -24,8 +24,6 @@ ) }} <div class="after-editor"> - <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> - <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> <div class="question-options"> {% if settings.WIKI_ON and question.wiki == False %} {{ macros.checkbox_in_div(form.wiki) }} @@ -34,6 +32,9 @@ {{ macros.checkbox_in_div(form.reveal_identity) }} {% endif %} </div> + <input type="submit" value="{% trans %}Save edit{% endtrans %}" class="submit" /> + <input type="button" value="{% trans %}Cancel{% endtrans %}" class="submit" onclick="history.back(-1);" /> + </div> </form> {% endblock %} diff --git a/askbot/skins/default/templates/revisions.html b/askbot/skins/default/templates/revisions.html index 0c10e6d4..7fb985e2 100644 --- a/askbot/skins/default/templates/revisions.html +++ b/askbot/skins/default/templates/revisions.html @@ -3,7 +3,7 @@ <!-- revisions.html --> {% block title %}{% spaceless %}{% trans %}Revision history{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<h1> +<h1 class="section-title"> {% trans %}Revision history{% endtrans %} [<a href="{{ post.get_absolute_url() }}">{% trans %}back{% endtrans %}</a>] </h1> <div id="revisions"> diff --git a/askbot/skins/default/templates/tags.html b/askbot/skins/default/templates/tags.html index 7d9026af..1cd4c4b9 100644 --- a/askbot/skins/default/templates/tags.html +++ b/askbot/skins/default/templates/tags.html @@ -4,14 +4,14 @@ {% block title %}{% spaceless %}{% trans %}Tag list{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} <!-- Tabs --> -<div class="tabBar"> - {% if stag %} - <h1>{% trans %}Tags, matching "{{ stag }}"{% endtrans %}</h1> - {% else %} - <h1>{% trans %}Tag list{% endtrans %}</h1> - {% endif %} - +{% if stag %} + <h1 class="section-title">{% trans %}Tags, matching "{{ stag }}"{% endtrans %}</h1> +{% else %} + <h1 class="section-title">{% trans %}Tag list{% endtrans %}</h1> +{% endif %} +<div class="tabBar tabBar-tags"> <div class="tabsA"> + <span class="label">{% trans %}Sort by »{% endtrans %}</span> <a id="sort_name" href="{% url tags %}?sort=name" @@ -46,6 +46,7 @@ </li> {% endfor %} </ul> + <div class="clean"></div> <div class="pager"> {{macros.paginator(paginator_context)}} </div> diff --git a/askbot/skins/default/templates/user_profile/user.html b/askbot/skins/default/templates/user_profile/user.html index ad3d564b..1693303e 100644 --- a/askbot/skins/default/templates/user_profile/user.html +++ b/askbot/skins/default/templates/user_profile/user.html @@ -1,4 +1,4 @@ -{% extends "two_column_body.html" %} +{% extends "one_column_body.html" %} <!-- user.html --> {% block title %}{% spaceless %}{{ page_title }}{% endspaceless %}{% endblock %} {% block forestyle%} @@ -7,15 +7,13 @@ </style> {% endblock %} {% block content %} - <h1> + <h1 class="section-title"> {% spaceless %} - <a href="{% url user_profile view_user.id, view_user.username|slugify %}"> {% trans username=view_user.username %}{{username}}'s profile{% endtrans %} - {% block profilesection %}{% endblock %} - </a> {% endspaceless %} </h1> - <div style="margin-left: 5px;"> - {% include "user_profile/user_tabs.html" %} + {% include "user_profile/user_tabs.html" %} + <div> {% block usercontent %} {% endblock %} </div> diff --git a/askbot/skins/default/templates/user_profile/user_favorites.html b/askbot/skins/default/templates/user_profile/user_favorites.html index bb019c90..08c3c688 100644 --- a/askbot/skins/default/templates/user_profile/user_favorites.html +++ b/askbot/skins/default/templates/user_profile/user_favorites.html @@ -1,7 +1,7 @@ {% extends "user_profile/user.html" %} <!-- user_favorites.html --> {% block profilesection %} - {% trans %}followed questions{% endtrans %} + <h1 class="section-title"> {% trans %}followed questions{% endtrans %}</h1> {% endblock %} {% block usercontent %} {% include "user_profile/users_questions.html" %} diff --git a/askbot/skins/default/templates/user_profile/user_reputation.html b/askbot/skins/default/templates/user_profile/user_reputation.html index 99b304d2..0deb2b97 100644 --- a/askbot/skins/default/templates/user_profile/user_reputation.html +++ b/askbot/skins/default/templates/user_profile/user_reputation.html @@ -8,16 +8,17 @@ <div id="diagram" class="karma-diagram"></div> <div class="karma-details"> {% if view_user.id == user.id %} - <h3>{% trans %}Your karma change log.{% endtrans %}</h3> + <h2>{% trans %}Your karma change log.{% endtrans %}</h2> {% else %} - <h3>{% trans user_name=view_user.username %}{{user_name}}'s karma change log{% endtrans %}</h3> + <h2>{% trans user_name=view_user.username %}{{user_name}}'s karma change log{% endtrans %}</h2> {% endif %} {% for rep in reputation %} <p> <span class="karma-gained">{{ rep.positive }}</span> <span class="karma-lost">{{ rep.negative }}</span> {{ rep.get_explanation_snippet() }} - <span class="small">({{rep.reputed_at|diff_date}})</span> + <span class="small">({{rep.reputed_at|diff_date}})</span> + <div class="clean"></div> </p> {% endfor %} </div> diff --git a/askbot/skins/default/templates/user_profile/user_tabs.html b/askbot/skins/default/templates/user_profile/user_tabs.html index ad24a303..0c7c4599 100644 --- a/askbot/skins/default/templates/user_profile/user_tabs.html +++ b/askbot/skins/default/templates/user_profile/user_tabs.html @@ -1,5 +1,5 @@ <!-- user_tabs.html --> -<div class="tabBar"> +<div class="tabBar tabBar-profile"> <div class="tabsC"> <a id="stats" {% if tab_name=="stats" %}class="on"{% endif %} title="{% trans %}User profile{% endtrans %}" @@ -49,4 +49,5 @@ {% endif %} </div> </div> +<div class="clean"></div> <!-- end user_tabs.html --> diff --git a/askbot/skins/default/templates/user_profile/user_votes.html b/askbot/skins/default/templates/user_profile/user_votes.html index d5e469ae..5111a580 100644 --- a/askbot/skins/default/templates/user_profile/user_votes.html +++ b/askbot/skins/default/templates/user_profile/user_votes.html @@ -10,9 +10,9 @@ <div style="width:150px;float:left">{{vote.voted_at|diff_date(True)}}</div> <div style="width:30px;float:left"> {% if vote.vote==1 %} - <img src="{{"/images/vote-arrow-up-on.png"|media}}" title="{% trans %}upvote{% endtrans %}"> + <img src="{{"/images/vote-arrow-up-on-new.png"|media}}" title="{% trans %}upvote{% endtrans %}"> {% else %} - <img src="{{"/images/vote-arrow-down-on.png"|media}}" title="{% trans %}downvote{% endtrans %}"> + <img src="{{"/images/vote-arrow-down-on-new.png"|media}}" title="{% trans %}downvote{% endtrans %}"> {% endif %} </div> <div style="float:left;overflow:hidden;width:750px"> diff --git a/askbot/skins/default/templates/users.html b/askbot/skins/default/templates/users.html index 1d7d02dd..0502a6e5 100644 --- a/askbot/skins/default/templates/users.html +++ b/askbot/skins/default/templates/users.html @@ -3,9 +3,10 @@ <!-- users.html --> {% block title %}{% spaceless %}{% trans %}Users{% endtrans %}{% endspaceless %}{% endblock %} {% block content %} -<div class="tabBar"> - <h1>{% trans %}Users{% endtrans %}</h1> +<h1 class="section-title">{% trans %}Users{% endtrans %}</h1> +<div class="tabBar tabBar-user"> <div class="tabsA"> + <span class="label">{% trans %}Sort by »{% endtrans %}</span> <a id="sort_reputation" href="{% url users %}?sort=reputation" @@ -32,6 +33,7 @@ ><span>{% trans %}by username{% endtrans %}</span></a> </div> </div> +<div class="clean"></div> <p> {% if suser %} {% trans %}users matching query {{suser}}:{% endtrans %} diff --git a/askbot/skins/default/templates/widgets/answer_edit_tips.html b/askbot/skins/default/templates/widgets/answer_edit_tips.html index 23e4df53..9cf0606e 100644 --- a/askbot/skins/default/templates/widgets/answer_edit_tips.html +++ b/askbot/skins/default/templates/widgets/answer_edit_tips.html @@ -1,8 +1,8 @@ <!-- template answer_edit_tips.html --> -<div class="boxC"> +<div class="box"> <h2>{% trans %}answer tips{% endtrans %}</h2> - <div> - <ul> + <div id="tips"> + <ul > <li> <b>{% trans %}please make your answer relevant to this community{% endtrans %}</b> </li> <li> @@ -16,12 +16,14 @@ </li> </ul> <p class='info-box-follow-up-links'> - <a href="{% url faq %}" target="_blank" title="{% trans %}see frequently asked questions{% endtrans %}">faq »</a> +<!-- will be change to a popup windows + <a href="{% url faq %}" target="_blank" title="{% trans %}see frequently asked questions{% endtrans %}">{% trans %}FAQ{% endtrans %} »</a> +--> </p> </div> </div> -<div class="boxC"> +<div class="box"> <h2>{% trans %}Markdown tips{% endtrans %}</h2> <ul> {% if settings.MARKUP_CODE_FRIENDLY or settings.ENABLE_MATHJAX %} @@ -57,7 +59,9 @@ </li> </ul> <p class='info-box-follow-up-links'> +<!-- will be change to a popup windows <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">{% trans %}learn more about Markdown{% endtrans %} »</a> +--> </p> </div> <!-- end template answer_edit_tips.html --> diff --git a/askbot/skins/default/templates/widgets/ask_form.html b/askbot/skins/default/templates/widgets/ask_form.html index 4e3346b8..18196d93 100644 --- a/askbot/skins/default/templates/widgets/ask_form.html +++ b/askbot/skins/default/templates/widgets/ask_form.html @@ -30,11 +30,6 @@ mandatory_tags = mandatory_tags ) }} - {% if not request.user.is_authenticated() %} - <input type="submit" name="post_anon" value="{% trans %}Login/signup to post your question{% endtrans %}" class="submit" /> - {% else %} - <input type="submit" name="post" value="{% trans %}Ask your question{% endtrans %}" class="submit" /> - {% endif %} <div class="question-options"> {% if settings.WIKI_ON %} {{ macros.checkbox_in_div(form.wiki) }} @@ -43,5 +38,10 @@ {{ macros.checkbox_in_div(form.ask_anonymously) }} {% endif %} </div> + {% if not request.user.is_authenticated() %} + <input type="submit" name="post_anon" value="{% trans %}Login/signup to post your question{% endtrans %}" class="submit" /> + {% else %} + <input type="submit" name="post" value="{% trans %}Ask your question{% endtrans %}" class="submit" /> + {% endif %} <div class="clean"></div> </form> diff --git a/askbot/skins/default/templates/widgets/question_edit_tips.html b/askbot/skins/default/templates/widgets/question_edit_tips.html index b62c6338..1270687f 100644 --- a/askbot/skins/default/templates/widgets/question_edit_tips.html +++ b/askbot/skins/default/templates/widgets/question_edit_tips.html @@ -12,7 +12,9 @@ </li> </ul> <p class='info-box-follow-up-links'> +<!-- will be change to a popup windows <a href="{% url faq %}" target="_blank" title="{% trans %}see frequently asked questions{% endtrans %}">{% trans %}FAQ{% endtrans %} »</a> +--> </p> </div> @@ -53,7 +55,9 @@ </li> </ul> <p class='info-box-follow-up-links'> +<!-- will be change to a popup windows <a href="http://en.wikipedia.org/wiki/Markdown" target="_blank">{% trans %}learn more about Markdown{% endtrans %} »</a> +--> </p> </div> <!-- end question_edit_tips.html --> diff --git a/askbot/skins/old/media/js/post.js b/askbot/skins/old/media/js/post.js index 52772cc0..260d081e 100644 --- a/askbot/skins/old/media/js/post.js +++ b/askbot/skins/old/media/js/post.js @@ -1570,7 +1570,7 @@ var socialSharing = function(){ url = url.replace('{TEXT}', TEXT); var params = SERVICE_DATA[service_name]['params']; if(!window.open(url, "sharing", params)){ - window.location.href=share_url; + window.location.href=url; } } }); diff --git a/askbot/skins/old/templates/authopenid/email_validation.txt b/askbot/skins/old/templates/authopenid/email_validation.txt index 9c5baa8a..087ce844 100644 --- a/askbot/skins/old/templates/authopenid/email_validation.txt +++ b/askbot/skins/old/templates/authopenid/email_validation.txt @@ -6,9 +6,9 @@ {% trans %}Following the link above will help us verify your email address.{% endtrans %} -{% trans %}If you beleive that this message was sent in mistake - -no further action is needed. Just ingore this email, we apologize -for any inconvenience{% endtrans %} +{% trans %}If you believe that this message was sent in mistake - +no further action is needed. Just ignore this email, we apologize +for any inconvenience.{% endtrans %} {% trans %}Sincerely, Forum Administrator{% endtrans %} diff --git a/askbot/skins/old/templates/main_page/headline.html b/askbot/skins/old/templates/main_page/headline.html index 130a9bd9..71d36fa5 100644 --- a/askbot/skins/old/templates/main_page/headline.html +++ b/askbot/skins/old/templates/main_page/headline.html @@ -3,7 +3,11 @@ <div style="clear:both"> <p class="rss"> (<a + {% if feed_url %} + href="{{settings.APP_URL}}{{feed_url}}" + {% else %} href="{{settings.APP_URL}}/feeds/rss/" + {% endif %} title="{% trans %}subscribe to the questions feed{% endtrans %}" >{% trans %}rss feed{% endtrans %}</a>) </p> diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index 94d9b852..bf988881 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -34,7 +34,7 @@ def format_as_text_tuple_entries(items): # # *validate emails in settings.py def test_askbot_url(): - """Tests the ASKBOT_URL setting for the + """Tests the ASKBOT_URL setting for the well-formedness and raises the ImproperlyConfigured exception, if the setting is not good. """ @@ -91,8 +91,8 @@ def test_middleware(): if missing_middleware_set: error_message = """\n\nPlease add the following middleware (listed after this message) -to the MIDDLEWARE_CLASSES variable in your site settings.py file. -The order the middleware records may be important, please take a look at the example in +to the MIDDLEWARE_CLASSES variable in your site settings.py file. +The order the middleware records may be important, please take a look at the example in https://github.com/ASKBOT/askbot-devel/blob/master/askbot/setup_templates/settings.py:\n\n""" middleware_text = format_as_text_tuple_entries(missing_middleware_set) raise ImproperlyConfigured(PREAMBLE + error_message + middleware_text) @@ -112,7 +112,7 @@ the list of MIDDLEWARE_CLASSES in your settings.py - these are not used any more middleware_text = format_as_text_tuple_entries(remove_middleware_set) raise ImproperlyConfigured(PREAMBLE + error_message + middleware_text) - + def test_i18n(): """askbot requires use of USE_I18N setting""" @@ -124,7 +124,7 @@ def test_i18n(): ) def try_import(module_name, pypi_package_name): - """tries importing a module and advises to install + """tries importing a module and advises to install A corresponding Python package in the case import fails""" try: load_module(module_name) @@ -173,17 +173,60 @@ def test_encoding(): ) def test_template_loader(): - """Sends a warning if you have an old style template + """Sends a warning if you have an old style template loader that used to send a warning""" old_template_loader = 'askbot.skins.loaders.load_template_source' if old_template_loader in django_settings.TEMPLATE_LOADERS: raise ImproperlyConfigured(PREAMBLE + \ "\nPlease change: \n" - "'askbot.skins.loaders.load_template_source', to\n" + "'askbot.skins.loaders.load_template_source', to\n" "'askbot.skins.loaders.filesystem_load_template_source',\n" "in the TEMPLATE_LOADERS of your settings.py file" ) +def test_celery(): + """Tests celery settings + todo: we are testing two things here + that correct name is used for the setting + and that a valid value is chosen + """ + broker_backend = getattr(django_settings, 'BROKER_BACKEND', None) + broker_transport = getattr(django_settings, 'BROKER_TRANSPORT', None) + + if broker_backend is None: + if broker_transport is None: + raise ImproperlyConfigured(PREAMBLE + \ + "\nPlease add\n" + 'BROKER_TRANSPORT = "djkombu.transport.DatabaseTransport"\n' + "or other valid value to your settings.py file" + ) + else: + #todo: check that broker transport setting is valid + return + + if broker_backend != broker_transport: + raise ImproperlyConfigured(PREAMBLE + \ + "\nPlease rename setting BROKER_BACKEND to BROKER_TRANSPORT\n" + "in your settings.py file\n" + "If you have both in your settings.py - then\n" + "delete the BROKER_BACKEND setting and leave the BROKER_TRANSPORT" + ) + + if hasattr(django_settings, 'BROKER_BACKEND') and not hasattr(django_settings, 'BROKER_TRANSPORT'): + raise ImproperlyConfigured(PREAMBLE + \ + "\nPlease rename setting BROKER_BACKEND to BROKER_TRANSPORT\n" + "in your settings.py file" + ) + +def test_cache(): + """Tests cache settings""" + if not hasattr(django_settings, 'CACHE_MIDDLEWARE_ANONYMOUS_ONLY'): + raise ImproperlyConfigured(PREAMBLE + \ + "\nPlease set\n" + "CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True\n" + "in your settings.py file" + ) + def run_startup_tests(): """function that runs all startup tests, mainly checking settings config so far @@ -197,6 +240,8 @@ def run_startup_tests(): test_i18n() test_postgres() test_middleware() + test_celery() + test_cache() @transaction.commit_manually def run(): diff --git a/askbot/tests/__init__.py b/askbot/tests/__init__.py index b06c2b06..ca74d696 100644 --- a/askbot/tests/__init__.py +++ b/askbot/tests/__init__.py @@ -1,3 +1,4 @@ +from askbot.tests.cache_tests import * from askbot.tests.email_alert_tests import * from askbot.tests.on_screen_notification_tests import * from askbot.tests.page_load_tests import * @@ -11,3 +12,5 @@ from askbot.tests.form_tests import * from askbot.tests.follow_tests import * from askbot.tests.templatefilter_tests import * from askbot.tests.markup_test import * +#from askbot.tests.misc_tests import * +from askbot.tests.post_model_tests import * diff --git a/askbot/tests/cache_tests.py b/askbot/tests/cache_tests.py new file mode 100644 index 00000000..5eda8c74 --- /dev/null +++ b/askbot/tests/cache_tests.py @@ -0,0 +1,43 @@ +from django.db import connection +from django.core.urlresolvers import reverse +from django.conf import settings +from askbot.tests.utils import AskbotTestCase + +class CacheTests(AskbotTestCase): + def setUp(self): + self.create_user() + self.create_user('other_user') + self.question = self.post_question() + self.post_answer(question = self.question) + settings.DEBUG = True # because it's forsed to False + + def visit_question(self): + self.client.get(self.question.get_absolute_url(), follow=True) + + def test_anonymous_question_cache(self): + + self.visit_question() + counter = len(connection.queries) + print 'we have %d queries' % counter + self.visit_question() + + #second hit to the same question should give fewer queries + self.assertTrue(counter > len(connection.queries)) + settings.DEBUG = False + + def test_authentificated_no_question_cache(self): + url = reverse('question', kwargs={'id': self.question.id}) + + password = '123' + self.other_user.set_password(password) + self.client.login(username=self.other_user.username, password=password) + + self.visit_question() + counter = len(connection.queries) + self.visit_question() + + #expect the same number of queries both times + self.assertEqual(counter, len(connection.queries)) + settings.DEBUG = False + + diff --git a/askbot/tests/db_api_tests.py b/askbot/tests/db_api_tests.py index 00091934..b54bb2e9 100644 --- a/askbot/tests/db_api_tests.py +++ b/askbot/tests/db_api_tests.py @@ -4,6 +4,9 @@ functions that happen on behalf of users e.g. ``some_user.do_something(...)`` """ from django.core import exceptions +from django.core.urlresolvers import reverse +from django.test.client import Client +from django.conf import settings from askbot.tests.utils import AskbotTestCase from askbot import models from askbot import const diff --git a/askbot/tests/email_alert_tests.py b/askbot/tests/email_alert_tests.py index dcea2e54..5ff45d6b 100644 --- a/askbot/tests/email_alert_tests.py +++ b/askbot/tests/email_alert_tests.py @@ -810,31 +810,84 @@ class TagFollowedInstantWholeForumEmailAlertTests(utils.AskbotTestCase): self.user1.email in outbox[0].recipients() ) -class UnansweredReminderTests(utils.AskbotTestCase): +class EmailReminderTestCase(utils.AskbotTestCase): + #subclass must define these (example below) + #enable_setting_name = 'ENABLE_UNANSWERED_REMINDERS' + #frequency_setting_name = 'UNANSWERED_REMINDER_FREQUENCY' + #days_before_setting_name = 'DAYS_BEFORE_SENDING_UNANSWERED_REMINDER' + #max_reminder_setting_name = 'MAX_UNANSWERED_REMINDERS' + def setUp(self): self.u1 = self.create_user(username = 'user1') self.u2 = self.create_user(username = 'user2') - askbot_settings.update('ENABLE_UNANSWERED_REMINDERS', True) - askbot_settings.update('MAX_UNANSWERED_REMINDERS', 5) - askbot_settings.update('UNANSWERED_REMINDER_FREQUENCY', 1) - askbot_settings.update('DAYS_BEFORE_SENDING_UNANSWERED_REMINDER', 2) - - self.wait_days = askbot_settings.DAYS_BEFORE_SENDING_UNANSWERED_REMINDER - self.recurrence_days = askbot_settings.UNANSWERED_REMINDER_FREQUENCY - self.max_emails = askbot_settings.MAX_UNANSWERED_REMINDERS + askbot_settings.update(self.enable_setting_name, True) + askbot_settings.update(self.max_reminder_setting_name, 5) + askbot_settings.update(self.frequency_setting_name, 1) + askbot_settings.update(self.days_before_setting_name, 2) + self.wait_days = getattr(askbot_settings, self.days_before_setting_name) + self.recurrence_days = getattr(askbot_settings, self.frequency_setting_name) + self.max_emails = getattr(askbot_settings, self.max_reminder_setting_name) def assert_have_emails(self, email_count = None): - management.call_command('send_unanswered_question_reminders') + management.call_command(self.command_name) outbox = django.core.mail.outbox self.assertEqual(len(outbox), email_count) def do_post(self, timestamp): - self.post_question( + self.question = self.post_question( user = self.u1, timestamp = timestamp ) + +class AcceptAnswerReminderTests(EmailReminderTestCase): + """only two test cases here, because the algorithm here + is the same as for unanswered questons, + except here we are dealing with the questions that have + or do not have an accepted answer + """ + enable_setting_name = 'ENABLE_ACCEPT_ANSWER_REMINDERS' + frequency_setting_name = 'ACCEPT_ANSWER_REMINDER_FREQUENCY' + days_before_setting_name = 'DAYS_BEFORE_SENDING_ACCEPT_ANSWER_REMINDER' + max_reminder_setting_name = 'MAX_ACCEPT_ANSWER_REMINDERS' + command_name = 'send_accept_answer_reminders' + + def do_post(self, timestamp): + super(AcceptAnswerReminderTests, self).do_post(timestamp) + self.answer = self.post_answer( + question = self.question, + user = self.u2, + timestamp = timestamp + ) + + def test_reminder_positive_wait(self): + """a positive test - user must receive a reminder + """ + days_ago = self.wait_days + timestamp = datetime.datetime.now() - datetime.timedelta(days_ago, 3600) + self.do_post(timestamp) + self.assert_have_emails(1) + + def test_reminder_negative_wait(self): + """negative test - the answer is accepted already""" + days_ago = self.wait_days + timestamp = datetime.datetime.now() - datetime.timedelta(days_ago, 3600) + self.do_post(timestamp) + self.u1.accept_best_answer( + answer = self.answer, + ) + self.assert_have_emails(0) + + +class UnansweredReminderTests(EmailReminderTestCase): + + enable_setting_name = 'ENABLE_UNANSWERED_REMINDERS' + frequency_setting_name = 'UNANSWERED_REMINDER_FREQUENCY' + days_before_setting_name = 'DAYS_BEFORE_SENDING_UNANSWERED_REMINDER' + max_reminder_setting_name = 'MAX_UNANSWERED_REMINDERS' + command_name = 'send_unanswered_question_reminders' + def test_reminder_positive_wait(self): """a positive test - user must receive a reminder """ diff --git a/askbot/tests/management_command_tests.py b/askbot/tests/management_command_tests.py index 9eb41cdf..001689c1 100644 --- a/askbot/tests/management_command_tests.py +++ b/askbot/tests/management_command_tests.py @@ -26,3 +26,26 @@ class ManagementCommandTests(AskbotTestCase): #try to log in user = auth.authenticate(username = username, password = password) self.assertTrue(user is not None) + + def test_merge_users(self): + """Verify a users account can be transfered to another user""" + # Create a new user and add some random related objects + user_one = self.create_user() + question = self.post_question(user=user_one) + comment = self.post_comment(user=user_one, parent_post=question) + number_of_gold = 50 + user_one.gold = number_of_gold + reputation = 20 + user_one.reputation = reputation + user_one.save() + # Create a second user and transfer all objects from 'user_one' to 'user_two' + user_two = self.create_user(username='unique') + management.call_command('merge_users', user_one.id, user_two.id) + # Check that the first user was deleted + self.assertEqual(models.User.objects.filter(pk=user_one.id).count(), 0) + # Explicitly check that the values assigned to user_one are now user_two's + self.assertEqual(user_two.questions.filter(pk=question.id).count(), 1) + self.assertEqual(user_two.comments.filter(pk=comment.id).count(), 1) + user_two = models.User.objects.get(pk=2) + self.assertEqual(user_two.gold, number_of_gold) + self.assertEqual(user_two.reputation, reputation) diff --git a/askbot/tests/misc_tests.py b/askbot/tests/misc_tests.py new file mode 100644 index 00000000..ddf16360 --- /dev/null +++ b/askbot/tests/misc_tests.py @@ -0,0 +1,50 @@ +import datetime +from django.contrib.contenttypes.models import ContentType +from django.test.client import Client +from askbot.tests.utils import AskbotTestCase +from askbot.conf import settings +from askbot import models +from askbot.models.badges import award_badges_signal + +from askbot.views.users import get_related_object_type_name + +class MiscTests(AskbotTestCase): + + def setUp(self): + self.u1 = self.create_user(username='user1') + self.u2 = self.create_user(username='user2') + self.u3 = self.create_user(username='user3') + + def test_get_related_object_type_name_for_question(self): + question = self.post_question(user=self.u1) + ct = ContentType.objects.get_for_model(question) + self.assertEqual('question', get_related_object_type_name(ct.id, question.id)) + + def test_get_related_object_type_name_for_question_revision(self): + question = self.post_question(user=self.u1) + revision = question.revisions.all()[0] + ct = ContentType.objects.get_for_model(revision) + self.assertEqual('question', get_related_object_type_name(ct.id, revision.id)) + + def test_get_related_object_type_name_for_answer(self): + question = self.post_question(user=self.u1) + answer = self.post_answer(user=self.u1, question=question) + ct = ContentType.objects.get_for_model(answer) + self.assertEqual('answer', get_related_object_type_name(ct.id, answer.id)) + + def test_get_related_object_type_name_for_answer_revision(self): + question = self.post_question(user=self.u1) + answer = self.post_answer(user=self.u1, question=question) + revision = answer.revisions.all()[0] + ct = ContentType.objects.get_for_model(revision) + self.assertEqual('answer', get_related_object_type_name(ct.id, revision.id)) + + def test_get_related_object_type_name_for_anything_else_1(self): + ct = ContentType.objects.get_for_model(self.u2) + self.assertIsNone(get_related_object_type_name(ct.id, self.u2.id)) + + def test_get_related_object_type_name_for_anything_else_2(self): + question = self.post_question(user=self.u1) + comment = self.post_comment(user=self.u1, parent_post=question) + ct = ContentType.objects.get_for_model(comment) + self.assertIsNone(get_related_object_type_name(ct.id, comment.id)) diff --git a/askbot/tests/page_load_tests.py b/askbot/tests/page_load_tests.py index 9c107112..442b1bd7 100644 --- a/askbot/tests/page_load_tests.py +++ b/askbot/tests/page_load_tests.py @@ -25,9 +25,10 @@ def patch_jinja2(): (CMAJOR, CMINOR, CMICRO) = package_utils.get_coffin_version() if CMAJOR == 0 and CMINOR == 3 and CMICRO < 4: + import ipdb; ipdb.set_trace() patch_jinja2() -class PageLoadTestCase(TestCase): +class PageLoadTestCase(AskbotTestCase): def try_url( self, url_name, status_code=200, template=None, @@ -66,8 +67,29 @@ class PageLoadTestCase(TestCase): else: raise Exception('unexpected error while runnig test') -class PageLoadTests(PageLoadTestCase): - fixtures = ['tmp/fixture2.json', ] + def setUp(self): + self.u1 = self.create_user(username='user1') + self.u2 = self.create_user(username='user2') + self.u3 = self.create_user(username='user3') + + self.question = self.post_question(user=self.u1) + + self.answer = self.post_answer(user=self.u1, question=self.question) + self.answer.id = 38 # one of the tests tries this id + self.answer.save() + + self.question2 = self.post_question(user=self.u2) + self.question2.id = 2 + self.question2.save() + + self.question3 = self.post_question(user=self.u3) + self.question3.id = 3 + self.question3.save() + + self.question17 = self.post_question(user=self.u1) + self.question17.id = 17 + self.question17.save() + def test_index(self): #todo: merge this with all reader url tests diff --git a/askbot/tests/post_model_tests.py b/askbot/tests/post_model_tests.py new file mode 100644 index 00000000..7ea8621a --- /dev/null +++ b/askbot/tests/post_model_tests.py @@ -0,0 +1,55 @@ +import datetime + +from django.core.exceptions import ValidationError +from askbot.tests.utils import AskbotTestCase +from askbot.models import PostRevision + + +class PostModelTests(AskbotTestCase): + + def setUp(self): + self.u1 = self.create_user(username='user1') + self.u2 = self.create_user(username='user2') + self.u3 = self.create_user(username='user3') + + def test_model_validation(self): + with self.assertRaises(NotImplementedError): + PostRevision.objects.create(text='blah', author=self.u1, revised_at=datetime.datetime.now(), revision_type=PostRevision.QUESTION_REVISION) + + with self.assertRaisesRegexp(AttributeError, r"'NoneType' object has no attribute 'revisions'"): + # cannot set `revision` without a parent + PostRevision.objects.create_answer_revision(text='blah', author=self.u1, revised_at=datetime.datetime.now()) + + with self.assertRaisesRegexp(ValidationError, r"{'__all__': \[u'One \(and only one\) of question/answer fields has to be set.'\], 'revision_type': \[u'Value 4 is not a valid choice.'\]}"): + # revision_type not in (1,2) + PostRevision(text='blah', author=self.u1, revised_at=datetime.datetime.now(), revision=1, revision_type=4).save() + + question = self.post_question(user=self.u1) + + rev2 = PostRevision(question=question, text='blah', author=self.u1, revised_at=datetime.datetime.now(), revision=2, revision_type=PostRevision.QUESTION_REVISION) + rev2.save() + self.assertIsNotNone(rev2.id) + + with self.assertRaisesRegexp(ValidationError, r"{'__all__': \[u'Revision_type doesn`t match values in question/answer fields.', u'Post revision with this Question and Revision already exists.'\]}"): + PostRevision(question=question, text='blah', author=self.u1, revised_at=datetime.datetime.now(), revision=2, revision_type=PostRevision.ANSWER_REVISION).save() + + with self.assertRaisesRegexp(ValidationError, r"{'__all__': \[u'Revision_type doesn`t match values in question/answer fields.'\]}"): + PostRevision(question=question, text='blah', author=self.u1, revised_at=datetime.datetime.now(), revision=3, revision_type=PostRevision.ANSWER_REVISION).save() + + rev3 = PostRevision.objects.create_question_revision(question=question, text='blah', author=self.u1, revised_at=datetime.datetime.now(), revision_type=123) # revision_type + self.assertIsNotNone(rev3.id) + self.assertEqual(3, rev3.revision) # By the way: let's test the auto-increase of revision number + self.assertEqual(PostRevision.QUESTION_REVISION, rev3.revision_type) + + def test_post_revision_autoincrease(self): + question = self.post_question(user=self.u1) + self.assertEqual(1, question.revisions.all()[0].revision) + self.assertEqual(1, question.revisions.count()) + + question.apply_edit(edited_by=self.u1, text="blah2", comment="blahc2") + self.assertEqual(2, question.revisions.all()[0].revision) + self.assertEqual(2, question.revisions.count()) + + question.apply_edit(edited_by=self.u1, text="blah3", comment="blahc3") + self.assertEqual(3, question.revisions.all()[0].revision) + self.assertEqual(3, question.revisions.count()) diff --git a/askbot/urls.py b/askbot/urls.py index 8c1e3c3a..be21217b 100644 --- a/askbot/urls.py +++ b/askbot/urls.py @@ -6,7 +6,6 @@ from django.conf import settings from django.conf.urls.defaults import url, patterns, include from django.conf.urls.defaults import handler500, handler404 from django.contrib import admin -from django.utils.translation import ugettext as _ from askbot import views from askbot.feed import RssLastestQuestionsFeed, RssIndividualQuestionFeed from askbot.sitemap import QuestionsSitemap @@ -15,6 +14,11 @@ from askbot.skins.utils import update_media_revision admin.autodiscover() update_media_revision()#needs to be run once, so put it here +if hasattr(settings, "ASKBOT_TRANSLATE_URL") and settings.ASKBOT_TRANSLATE_URL: + from django.utils.translation import ugettext as _ +else: + _ = lambda s:s + feeds = { 'rss': RssLastestQuestionsFeed, 'question':RssIndividualQuestionFeed @@ -280,7 +284,7 @@ urlpatterns = patterns('', url( r'^jsi18n/$', 'django.views.i18n.javascript_catalog', - {'packages': ('askbot',)}, + {'domain': 'djangojs','packages': ('askbot',)}, name = 'askbot_jsi18n' ), ) diff --git a/askbot/utils/classes.py b/askbot/utils/classes.py new file mode 100644 index 00000000..4d1e1394 --- /dev/null +++ b/askbot/utils/classes.py @@ -0,0 +1,34 @@ +"""various utility classes""" +import datetime + +class ReminderSchedule(object): + """class that given the three settings: + * days to wait before sending the reminders + * frequency of reminders + * maximum number of reminders + return dates when to start sending the reminders, + when to stop, and give friendly names to other + variables + + These objects can be reused to all methods that + intend to remind of certain events periodically + """ + + def __init__(self, + days_before_starting = None, + frequency_days = None, + max_reminders = None): + """function that calculates values + and assigns them to user-friendly variable names + + * ``days_before_starting`` - days to wait before sending any reminders + * ``frequency_days`` - days to wait between sending reminders + * ``max_reminders`` - maximum number of reminders to send + """ + self.wait_period = datetime.timedelta(days_before_starting) + self.end_cutoff_date = datetime.datetime.now() - self.wait_period + + self.recurrence_delay = datetime.timedelta(frequency_days) + self.max_reminders = max_reminders + self.start_cutoff_date = self.end_cutoff_date - \ + (self.max_reminders - 1)*self.recurrence_delay diff --git a/askbot/views/readers.py b/askbot/views/readers.py index eabef3c8..ec3ca57b 100644 --- a/askbot/views/readers.py +++ b/askbot/views/readers.py @@ -23,6 +23,8 @@ from django.views.decorators import csrf from django.core.urlresolvers import reverse from django.core import exceptions as django_exceptions from django.contrib.humanize.templatetags import humanize +from django.views.decorators.cache import cache_page +from django.http import QueryDict import askbot from askbot import exceptions @@ -123,6 +125,24 @@ def questions(request): 'page_size' : search_state.page_size,#todo in T pagesize -> page_size } + # We need to pass the rss feed url based + # on the search state to the template. + # We use QueryDict to get a querystring + # from dicts and arrays. Much cleaner + # than parsing and string formating. + rss_query_dict = QueryDict("").copy() + if search_state.query: + # We have search string in session - pass it to + # the QueryDict + rss_query_dict.update({"q": search_state.query}) + if search_state.tags: + # We have tags in session - pass it to the + # QueryDict but as a list - we want tags+ + rss_query_dict.setlist("tags", search_state.tags) + + # Format the url with the QueryDict + context_feed_url = '/feeds/rss/?%s' % rss_query_dict.urlencode() + if request.is_ajax(): q_count = paginator.count @@ -169,7 +189,8 @@ def questions(request): 'question_counter': question_counter, 'questions': list(), 'related_tags': list(), - 'faces': list() + 'faces': list(), + 'feed_url': context_feed_url, } badge_levels = dict(const.BADGE_TYPE_CHOICES) @@ -222,6 +243,7 @@ def questions(request): reset_method_count += 1 if meta_data.get('author_name',None): reset_method_count += 1 + template_data = { 'active_tab': 'questions', @@ -248,6 +270,7 @@ def questions(request): 'font_size' : font_size, 'tag_filter_strategy_choices': const.TAG_FILTER_STRATEGY_CHOICES, 'update_avatar_data': schedules.should_update_avatar_data(request), + 'feed_url': context_feed_url, } assert(request.is_ajax() == False) @@ -349,10 +372,12 @@ def tags(request):#view showing a listing of available tags - plain list return render_into_skin('tags.html', data, request) @csrf.csrf_protect +@cache_page(60 * 5) def question(request, id):#refactor - long subroutine. display question body, answers and comments """view that displays body of the question and all answers to it """ + #process url parameters #todo: fix inheritance of sort method from questions default_sort_method = request.session.get('questions_sort_method', 'votes') form = ShowQuestionForm(request.GET, default_sort_method) @@ -371,7 +396,14 @@ def question(request, id):#refactor - long subroutine. display question body, an #redirect also happens if id of the object's origin post != requested id show_post = None #used for permalinks if show_comment is not None: - #comments + #if url calls for display of a specific comment, + #check that comment exists, that it belongs to + #the current question + #if it is an answer comment and the answer is hidden - + #redirect to the default view of the question + #if the question is hidden - redirect to the main page + #in addition - if url points to a comment and the comment + #is for the answer - we need the answer object try: show_comment = models.Comment.objects.get(id = show_comment) if str(show_comment.get_origin_post().id) != id: @@ -394,7 +426,10 @@ def question(request, id):#refactor - long subroutine. display question body, an return HttpResponseRedirect(reverse('index')) elif show_answer is not None: - #answers + #if the url calls to view a particular answer to + #question - we must check whether the question exists + #whether answer is actually corresponding to the current question + #and that the visitor is allowed to see it try: show_post = get_object_or_404(models.Answer, id = show_answer) if str(show_post.question.id) != id: @@ -428,13 +463,11 @@ def question(request, id):#refactor - long subroutine. display question body, an answers = answers.select_related(depth=1) user_answer_votes = {} - for answer in answers: - vote = answer.get_user_vote(request.user) - if vote is not None and not user_answer_votes.has_key(answer.id): - vote_value = -1 - if vote.is_upvote(): - vote_value = 1 - user_answer_votes[answer.id] = vote_value + if request.user.is_authenticated(): + for answer in answers: + vote = answer.get_user_vote(request.user) + if vote is not None and not answer.id in user_answer_votes: + user_answer_votes[answer.id] = int(vote) view_dic = {"latest":"-added_at", "oldest":"added_at", "votes":"-score" } orderby = view_dic[answer_sort_method] @@ -515,19 +548,19 @@ def question(request, id):#refactor - long subroutine. display question body, an paginator_context = extra_tags.cnprog_paginator(paginator_data) favorited = question.has_favorite_by_user(request.user) + user_question_vote = 0 if request.user.is_authenticated(): - question_vote = question.votes.select_related().filter(user=request.user) - else: - question_vote = None #is this correct? - if question_vote is not None and question_vote.count() > 0: - question_vote = question_vote[0] - + votes = question.votes.select_related().filter(user=request.user) + if votes.count() > 0: + user_question_vote = int(votes[0]) + else: + user_question_vote = 0 data = { 'page_class': 'question-page', 'active_tab': 'questions', 'question' : question, - 'question_vote' : question_vote, + 'user_question_vote' : user_question_vote, 'question_comment_count':question.comments.count(), 'answer' : AnswerForm(question,request.user), 'answers' : page_objects.object_list, diff --git a/askbot/views/users.py b/askbot/views/users.py index f1f29f71..130f79a4 100644 --- a/askbot/views/users.py +++ b/askbot/views/users.py @@ -38,27 +38,30 @@ from askbot.templatetags import extra_tags question_type = ContentType.objects.get_for_model(models.Question) answer_type = ContentType.objects.get_for_model(models.Answer) comment_type = ContentType.objects.get_for_model(models.Comment) -question_revision_type = ContentType.objects.get_for_model( - models.QuestionRevision - ) - -answer_revision_type = ContentType.objects.get_for_model( - models.AnswerRevision - ) +post_revision_type = ContentType.objects.get_for_model(models.PostRevision) repute_type = ContentType.objects.get_for_model(models.Repute) + question_type_id = question_type.id answer_type_id = answer_type.id comment_type_id = comment_type.id -question_revision_type_id = question_revision_type.id -answer_revision_type_id = answer_revision_type.id +post_revision_type_id = post_revision_type.id repute_type_id = repute_type.id #todo: queries in the user activity summary view must be redone -def get_related_object_type_name(content_type_id): - if content_type_id in (question_type_id, question_revision_type_id,): +def get_related_object_type_name(content_type_id, object_id): +# if content_type_id in (question_type_id, question_revision_type_id,): +# return 'question' +# elif content_type_id in (answer_type_id, answer_revision_type_id,): +# return 'answer' + + if content_type_id == question_type_id: return 'question' - elif content_type_id in (answer_type_id, answer_revision_type_id,): + elif content_type_id == answer_type_id: return 'answer' + elif content_type_id == post_revision_type_id: + post_revision = models.PostRevision.objects.get(id=object_id) + return post_revision.revision_type_str() + return None def owner_or_moderator_required(f): @@ -556,18 +559,20 @@ def user_recent(request, user, context): # question revisions revisions = models.Activity.objects.extra( select={ - 'title' : 'question_revision.title', - 'question_id' : 'question_revision.question_id', + 'title' : 'askbot_postrevision.title', + 'question_id' : 'askbot_postrevision.question_id', 'added_at' : 'activity.active_at', 'activity_type' : 'activity.activity_type', - 'summary' : 'question_revision.summary' + 'summary' : 'askbot_postrevision.summary' }, - tables=['activity', 'question_revision', 'question'], - where=['activity.content_type_id = %s AND activity.object_id = question_revision.id AND '+ - 'question_revision.id=question.id AND NOT question.deleted AND '+ - 'activity.user_id = question_revision.author_id AND activity.user_id = %s AND '+ - 'activity.activity_type=%s'], - params=[question_revision_type_id, user.id, const.TYPE_ACTIVITY_UPDATE_QUESTION], + tables=['activity', 'askbot_postrevision', 'question'], + where=[''' + activity.content_type_id=%s AND activity.object_id=askbot_postrevision.id AND + askbot_postrevision.question_id=question.id AND askbot_postrevision.revision_type=%s AND NOT question.deleted AND + activity.user_id=askbot_postrevision.author_id AND activity.user_id=%s AND + activity.activity_type=%s + '''], + params=[post_revision_type_id, models.PostRevision.QUESTION_REVISION, user.id, const.TYPE_ACTIVITY_UPDATE_QUESTION], order_by=['-activity.active_at'] ).values( 'title', @@ -590,16 +595,17 @@ def user_recent(request, user, context): 'answer_id' : 'answer.id', 'added_at' : 'activity.active_at', 'activity_type' : 'activity.activity_type', - 'summary' : 'answer_revision.summary' + 'summary' : 'askbot_postrevision.summary' }, - tables=['activity', 'answer_revision', 'question', 'answer'], - - where=['activity.content_type_id = %s AND activity.object_id = answer_revision.id AND '+ - 'activity.user_id = answer_revision.author_id AND activity.user_id = %s AND '+ - 'answer_revision.answer_id=answer.id AND answer.question_id = question.id AND '+ - 'NOT question.deleted AND NOT answer.deleted AND '+ - 'activity.activity_type=%s'], - params=[answer_revision_type_id, user.id, const.TYPE_ACTIVITY_UPDATE_ANSWER], + tables=['activity', 'askbot_postrevision', 'question', 'answer'], + where=[''' + activity.content_type_id=%s AND activity.object_id=askbot_postrevision.id AND + askbot_postrevision.answer_id=answer.id AND askbot_postrevision.revision_type=%s AND + answer.question_id=question.id AND NOT question.deleted AND NOT answer.deleted AND + activity.user_id=askbot_postrevision.author_id AND activity.user_id=%s AND + activity.activity_type=%s + '''], + params=[post_revision_type_id, models.PostRevision.ANSWER_REVISION, user.id, const.TYPE_ACTIVITY_UPDATE_ANSWER], order_by=['-activity.active_at'] ).values( 'title', @@ -662,7 +668,10 @@ def user_recent(request, user, context): 'activity_type' ) for award in awards: - related_object_type = get_related_object_type_name(award['content_type_id']) + related_object_type = get_related_object_type_name( + content_type_id=award['content_type_id'], + object_id=award['object_id'] + ) activities.append( AwardEvent( award['awarded_at'], diff --git a/askbot/views/writers.py b/askbot/views/writers.py index 8b07681a..b7b7e96d 100644 --- a/askbot/views/writers.py +++ b/askbot/views/writers.py @@ -363,7 +363,7 @@ def edit_question(request, id): if revision_form.is_valid(): # Replace with those from the selected revision rev_id = revision_form.cleaned_data['revision'] - selected_revision = models.QuestionRevision.objects.get( + selected_revision = models.PostRevision.objects.question_revisions().get( question = question, revision = rev_id ) @@ -448,7 +448,7 @@ def edit_answer(request, id): if revision_form.is_valid(): # Replace with those from the selected revision rev = revision_form.cleaned_data['revision'] - selected_revision = models.AnswerRevision.objects.get( + selected_revision = models.PostRevision.objects.answer_revisions().get( answer = answer, revision = rev ) diff --git a/askbot_requirements.txt b/askbot_requirements.txt index a1d3b603..fc11d9d1 100644 --- a/askbot_requirements.txt +++ b/askbot_requirements.txt @@ -16,3 +16,4 @@ django-kombu==0.9.2 django-followit django-recaptcha-works python-openid +pystache==0.3.1 @@ -25,6 +25,7 @@ install_requires = [ 'django-followit', 'django-recaptcha-works', 'python-openid', + 'pystache==0.3.1', ] import askbot |