Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nounous
re2o
Commits
582430d5
Commit
582430d5
authored
Aug 11, 2018
by
grisel-davy
Browse files
on ne peut faire des recherches que si on en a le droit
parent
ea98bd74
Pipeline
#779
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
search/views.py
View file @
582430d5
...
...
@@ -33,6 +33,7 @@ from django.contrib.auth.decorators import login_required
from
django.db.models
import
Q
from
users.models
import
User
,
Adherent
,
Club
,
Ban
,
Whitelist
from
machines.models
import
Machine
from
cotisations.models
import
Cotisation
from
topologie.models
import
Port
,
Switch
,
Room
from
cotisations.models
import
Facture
from
preferences.models
import
GeneralOption
...
...
@@ -44,6 +45,7 @@ from search.forms import (
initial_choices
)
from
re2o.utils
import
SortTable
from
re2o.acl
import
can_view_all
def
is_int
(
variable
):
...
...
@@ -347,6 +349,7 @@ def get_words(query):
return
words
@
can_view_all
(
User
,
Machine
,
Cotisation
)
def
get_results
(
query
,
request
,
params
):
"""The main function of the search procedure. It gather the filters for
each of the different words of the query and concatenate them into a
...
...
Boudy
@lebouder
mentioned in commit
ed2bd8b3
·
Aug 11, 2018
mentioned in commit
ed2bd8b3
mentioned in commit ed2bd8b33f9046b0224a540e18e52109f94dcfc6
Toggle commit list
Boudy
@lebouder
mentioned in commit
1e75a7b4
·
Aug 11, 2018
mentioned in commit
1e75a7b4
mentioned in commit 1e75a7b4460871c2cc774c9010ab555765fd83d4
Toggle commit list
Boudy
@lebouder
mentioned in commit
e515a5df
·
Aug 13, 2018
mentioned in commit
e515a5df
mentioned in commit e515a5dfb95643cca9204382ff2d1da628fe85b6
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment