Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Helios Server
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Helios Server
Commits
6078c1c3
Unverified
Commit
6078c1c3
authored
Feb 19, 2019
by
Marco Ciotola
Browse files
Options
Downloads
Patches
Plain Diff
[DJ1.9] Cannot import models from a django-app init (even as third-party import)
parent
59bd82fb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
server_ui/__init__.py
+0
-2
0 additions, 2 deletions
server_ui/__init__.py
server_ui/glue.py
+23
-21
23 additions, 21 deletions
server_ui/glue.py
server_ui/views.py
+4
-0
4 additions, 0 deletions
server_ui/views.py
with
27 additions
and
23 deletions
server_ui/__init__.py
+
0
−
2
View file @
6078c1c3
"""
This django app is meant only to connect the pieces of Helios and Auth to present a clean UI
"""
import
glue
This diff is collapsed.
Click to expand it.
server_ui/glue.py
+
23
−
21
View file @
6078c1c3
...
...
@@ -26,9 +26,11 @@ def vote_cast_send_message(user, voter, election, cast_vote, **kwargs):
# send it via the notification system associated with the auth system
user
.
send_message
(
subject
,
body
)
helios
.
signals
.
vote_cast
.
connect
(
vote_cast_send_message
)
def
election_tallied
(
election
,
**
kwargs
):
pass
def
glue
():
helios
.
signals
.
vote_cast
.
connect
(
vote_cast_send_message
)
helios
.
signals
.
election_tallied
.
connect
(
election_tallied
)
This diff is collapsed.
Click to expand it.
server_ui/views.py
+
4
−
0
View file @
6078c1c3
...
...
@@ -10,6 +10,10 @@ from helios.models import Election
from
helios.security
import
can_create_election
from
helios_auth.security
import
get_user
from
view_utils
import
render_template
import
glue
glue
.
glue
()
# actually apply glue helios.view <-> helios.signals
def
get_election
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment