Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
bc27153a
Commit
bc27153a
authored
Sep 18, 2011
by
Arno Töll
Browse files
Provide sane defaults for new forms
parent
c8d5f37b
Changes
1
Hide whitespace changes
Inline
Side-by-side
debexpo/controllers/my.py
View file @
bc27153a
...
@@ -280,7 +280,12 @@ class MyController(BaseController):
...
@@ -280,7 +280,12 @@ class MyController(BaseController):
c
.
technical_tags
=
meta
.
session
.
query
(
SponsorTags
).
filter_by
(
tag_type
=
constants
.
SPONSOR_METRICS_TYPE_TECHNICAL
).
all
()
c
.
technical_tags
=
meta
.
session
.
query
(
SponsorTags
).
filter_by
(
tag_type
=
constants
.
SPONSOR_METRICS_TYPE_TECHNICAL
).
all
()
c
.
social_tags
=
meta
.
session
.
query
(
SponsorTags
).
filter_by
(
tag_type
=
constants
.
SPONSOR_METRICS_TYPE_SOCIAL
).
all
()
c
.
social_tags
=
meta
.
session
.
query
(
SponsorTags
).
filter_by
(
tag_type
=
constants
.
SPONSOR_METRICS_TYPE_SOCIAL
).
all
()
if
not
c
.
metrics
:
if
not
c
.
metrics
:
# Set some sane defaults
log
.
debug
(
"Generating new defaults for sponsor metrics"
)
c
.
metrics
=
SponsorMetrics
()
c
.
metrics
=
SponsorMetrics
()
c
.
metrics
.
availability
=
constants
.
SPONSOR_METRICS_PRIVATE
c
.
metrics
.
guidelines
=
constants
.
SPONSOR_GUIDELINES_TYPE_NONE
log
.
debug
(
'Rendering page'
)
log
.
debug
(
'Rendering page'
)
return
render
(
'/my/index.mako'
)
return
render
(
'/my/index.mako'
)
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