Custom Query (2152 matches)
Results (1654 - 1656 of 2152)
Ticket
|
Resolution
|
Summary
|
Owner
|
Reporter
|
#917 |
fixed
|
Turning off Autoflush in SQLAlchemy
|
kindly
|
kindly
|
Reported by kindly,
3 years ago.
|
Description |
David Raznik: I propose we remove autoflush by default in ckan. It caused a lot of bugs on the version upgrade due to its magical behavior.
I have a patch in https://bitbucket.org/kindly/ckan/ on branch feature_switch_autoflush_off_by_default.
This change simplifies code. It only took 7 extra flushes/commits to make work and there are over 40 instances that we remove autoflush, so as not to cause error (I have not removed them in the patch yet).
Things to know about using flush:
- Most of the time nothing will change. A commit implies flush.
- You only need to flush if you expect a query to return an object you just saved. i.e if you session.add(obj) and you expect obj to be in a session.query.
- A flush is handy when you want to get the primary key out before you do a commit. i.e session.add(obj); session.flush(); obj.id is now generated.
- You can use them as a limited form of nested transaction.
It increased the performance on the tests by about 5%. There are less flushes altogether so is faster.
I do not see any downsides.
|
#1313 |
duplicate
|
Tweaks to captcha configuration
|
zephod
|
dread
|
Reported by dread,
3 years ago.
|
Description |
Awesome to have the captcha implementation and running on thedatahub.org! Here are some further
suggestions concerning the config options, before this goes into a release:
- Document "ckan.recaptcha.publickey" and "ckan.recaptcha.privatekey" in doc/configuration.rst
- Which one config option defines whether recaptcha is enabled? There is disagreement between the template and the lib. Maybe better to have a third option for this. When setting the syntax for this, I can see us wanting to use captcha for other operations, like package edit, package create, group create etc. so perhaps we'd want to be able to turn each one on/off separately, using the name of the logic action. e.g. ckan.recaptcha.enable = user_create, group_create
- We got this exception last night from the template:
Module ?:37 in <Expression u'g.recaptcha_publickey'>
<< <dd><input type="password" name="password2" value="" /></dd>
<dd py:if="g.recaptcha_publickey">
<script type="text/javascript"
src="http://www.google.com/recaptcha/api/challenge?k=${g.recaptcha_publickey}">
>> <dd py:if="g.recaptcha_publickey">
Module genshi.template.eval:324 in lookup_attr
<< val = obj[key]
except (KeyError, TypeError):
val = cls.undefined(key, owner=obj)
return val
>> val = cls.undefined(key, owner=obj)
Module genshi.template.eval:410 in undefined
<< """Raise an ``UndefinedError`` immediately."""
__traceback_hide__ = True
raise UndefinedError(key, owner=owner)
>> raise UndefinedError(key, owner=owner)
UndefinedError: <ckan.lib.app_globals.Globals object at 0xb8f1182c> has no member named "recaptcha_publickey"
I'm not sure why - might be something to do with the maintenance on the server, but worth double checking, since we don't want exceptions, say if one or other config variable is not defined.
|
#2903 |
wontfix
|
Two search boxes
|
johnmartin
|
johnmartin
|
Reported by johnmartin,
20 months ago.
|
Description |
I think the architecture on the search page is a bit odd. Not sure I like that there is a doubling up of the search box (e.g. one in the header and one in the body of the search results page)
Needs some thought
|
Note: See
TracQuery
for help on using queries.