mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2024-12-13 18:31:10 +01:00
Fixes issue #52: Add message to search screen if system is running sqlite.
This commit is contained in:
parent
9830e1c3c1
commit
db2dc108e5
3
README
3
README
@ -39,6 +39,9 @@ case-insensitive searches. It's recommended that you use PostgreSQL or MySQL
|
|||||||
if possible. For more information, see this note in the Django documentation:
|
if possible. For more information, see this note in the Django documentation:
|
||||||
http://docs.djangoproject.com/en/dev/ref/databases/#sqlite-string-matching
|
http://docs.djangoproject.com/en/dev/ref/databases/#sqlite-string-matching
|
||||||
|
|
||||||
|
When you try to do a keyword search using sqlite, a message will be displayed
|
||||||
|
to alert you to this shortcoming. There is no way around it, sorry.
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
3. Upgrading from previous versions
|
3. Upgrading from previous versions
|
||||||
#########################
|
#########################
|
||||||
|
@ -111,6 +111,7 @@ $(document).ready(function() {
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{ search_message|safe }}
|
||||||
<table width='100%'>
|
<table width='100%'>
|
||||||
<tr class='row_tablehead'><td colspan='7'>{% trans "Tickets" %}</td></tr>
|
<tr class='row_tablehead'><td colspan='7'>{% trans "Tickets" %}</td></tr>
|
||||||
<tr class='row_columnheads'><th>#</th><th>{% trans "Pr" %}</th><th>{% trans "Title" %}</th><th>{% trans "Queue" %}</th><th>{% trans "Status" %}</th><th>{% trans "Created" %}</th><th>{% trans "Owner" %}</th></tr>
|
<tr class='row_columnheads'><th>#</th><th>{% trans "Pr" %}</th><th>{% trans "Title" %}</th><th>{% trans "Queue" %}</th><th>{% trans "Status" %}</th><th>{% trans "Created" %}</th><th>{% trans "Owner" %}</th></tr>
|
||||||
|
@ -386,6 +386,10 @@ def ticket_list(request):
|
|||||||
|
|
||||||
tickets = apply_query(Ticket.objects.select_related(), query_params)
|
tickets = apply_query(Ticket.objects.select_related(), query_params)
|
||||||
|
|
||||||
|
search_message = ''
|
||||||
|
if context.has_key('query') and settings.DATABASE_ENGINE.startswith('sqlite'):
|
||||||
|
search_message = _('<p><strong>Note:</strong> Your keyword search is case sensitive because of your database. This means the search will <strong>not</strong> be accurate. By switching to a different database system you will gain better searching! For more information, read the <a href="http://docs.djangoproject.com/en/dev/ref/databases/#sqlite-string-matching">Django Documentation on string matching in SQLite</a>.')
|
||||||
|
|
||||||
import cPickle
|
import cPickle
|
||||||
from helpdesk.lib import b64encode
|
from helpdesk.lib import b64encode
|
||||||
urlsafe_query = b64encode(cPickle.dumps(query_params))
|
urlsafe_query = b64encode(cPickle.dumps(query_params))
|
||||||
@ -403,6 +407,7 @@ def ticket_list(request):
|
|||||||
user_saved_queries=user_saved_queries,
|
user_saved_queries=user_saved_queries,
|
||||||
query_params=query_params,
|
query_params=query_params,
|
||||||
from_saved_query=from_saved_query,
|
from_saved_query=from_saved_query,
|
||||||
|
search_message=search_message,
|
||||||
)))
|
)))
|
||||||
ticket_list = staff_member_required(ticket_list)
|
ticket_list = staff_member_required(ticket_list)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user