Last change
on this file since f458072 was
f458072,
checked in by Lance Edgar <lance@…>, 8 months ago
|
Add basic autocompleter for subdepartments
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | # -*- coding: utf-8 -*- |
---|
2 | ################################################################################ |
---|
3 | # |
---|
4 | # Rattail -- Retail Software Framework |
---|
5 | # Copyright © 2010-2022 Lance Edgar |
---|
6 | # |
---|
7 | # This file is part of Rattail. |
---|
8 | # |
---|
9 | # Rattail is free software: you can redistribute it and/or modify it under the |
---|
10 | # terms of the GNU General Public License as published by the Free Software |
---|
11 | # Foundation, either version 3 of the License, or (at your option) any later |
---|
12 | # version. |
---|
13 | # |
---|
14 | # Rattail is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
15 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
16 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
---|
17 | # details. |
---|
18 | # |
---|
19 | # You should have received a copy of the GNU General Public License along with |
---|
20 | # Rattail. If not, see <http://www.gnu.org/licenses/>. |
---|
21 | # |
---|
22 | ################################################################################ |
---|
23 | """ |
---|
24 | Autocomplete Handler for Subdepartments |
---|
25 | """ |
---|
26 | |
---|
27 | from __future__ import unicode_literals, absolute_import |
---|
28 | |
---|
29 | from rattail.autocomplete import Autocompleter |
---|
30 | from rattail.db import model |
---|
31 | |
---|
32 | |
---|
33 | class SubdepartmentAutocompleter(Autocompleter): |
---|
34 | """ |
---|
35 | Autocompleter for Subdepartments |
---|
36 | """ |
---|
37 | autocompleter_key = 'subdepartments' |
---|
38 | model_class = model.Subdepartment |
---|
39 | autocomplete_fieldname = 'name' |
---|
Note: See
TracBrowser
for help on using the repository browser.