Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
8b5a9373
authored
Feb 11, 2013
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
school: add to affiliation group
parent
349c50b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
school/views.py
+7
-0
No files found.
school/views.py
View file @
8b5a9373
...
@@ -103,6 +103,13 @@ def login(request):
...
@@ -103,6 +103,13 @@ def login(request):
for
a
in
affiliation
:
for
a
in
affiliation
:
g
,
created
=
AGroup
.
objects
.
get_or_create
(
name
=
a
)
g
,
created
=
AGroup
.
objects
.
get_or_create
(
name
=
a
)
user
.
groups
.
add
(
g
)
user
.
groups
.
add
(
g
)
try
:
g
=
Group
.
objects
.
filter
(
name
=
a
)
g
.
members
.
add
(
p
)
g
.
save
()
messages
.
info
(
request
,
_
(
'Course "
%
s" added.'
)
%
g
.
course
)
except
:
pass
user
.
save
()
user
.
save
()
p
.
save
()
p
.
save
()
...
...
Write
Preview
Markdown
is supported
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