Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gepetto
dashboard
Commits
5eefc019
Commit
5eefc019
authored
Jan 29, 2018
by
Guilhem Saurel
Browse files
filter: icontains
parent
62aacf3f
Changes
2
Hide whitespace changes
Inline
Side-by-side
rainboard/filters.py
View file @
5eefc019
...
...
@@ -4,6 +4,8 @@ from .models import Project
class
ProjectFilter
(
django_filters
.
FilterSet
):
name
=
django_filters
.
CharFilter
(
lookup_expr
=
'icontains'
)
class
Meta
:
model
=
Project
fields
=
(
'name'
,)
rainboard/models.py
View file @
5eefc019
...
...
@@ -41,6 +41,7 @@ class Project(Links, NamedModel, TimeStampedModel):
license
=
models
.
ForeignKey
(
License
,
on_delete
=
models
.
SET_NULL
,
blank
=
True
,
null
=
True
)
homepage
=
models
.
URLField
(
max_length
=
200
,
blank
=
True
,
null
=
True
)
articles
=
models
.
ManyToManyField
(
Article
)
# TODO: release github ↔ robotpkg
def
get_absolute_url
(
self
):
return
reverse
(
'rainboard:project'
,
kwargs
=
{
'slug'
:
self
.
slug
})
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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