Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
8b1589d2
Commit
8b1589d2
authored
Nov 06, 2014
by
Jonathan Piacenti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A few patches to fix dependency issues with Organizations.
parent
a2168c2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
51 deletions
+4
-51
cms/envs/bok_choy.env.json
+2
-0
lms/djangoapps/organizations/management/commands/tests/test_move_organizations_entries.py
+0
-51
lms/envs/bok_choy.env.json
+2
-0
No files found.
cms/envs/bok_choy.env.json
View file @
8b1589d2
...
...
@@ -63,6 +63,8 @@
"DEFAULT_FROM_EMAIL"
:
"registration@example.com"
,
"EMAIL_BACKEND"
:
"django.core.mail.backends.smtp.EmailBackend"
,
"FEATURES"
:
{
"API"
:
true
,
"ORGANIZATIONS_APP"
:
true
,
"AUTH_USE_OPENID_PROVIDER"
:
true
,
"CERTIFICATES_ENABLED"
:
true
,
"CERTIFICATES_HTML_VIEW"
:
true
,
...
...
lms/djangoapps/organizations/management/commands/tests/test_move_organizations_entries.py
View file @
8b1589d2
...
...
@@ -9,7 +9,6 @@ from projects.models import Workgroup, Project
from
model_utils.models
import
TimeStampedModel
from
south.db
import
db
@mock.patch.dict
(
"django.conf.settings.FEATURES"
,
{
'ORGANIZATIONS_APP'
:
True
})
class
MoveOrganizationEntriesTests
(
TestCase
):
"""
Test suite for organization table data copy from api_manager to organizations
...
...
@@ -30,56 +29,6 @@ class MoveOrganizationEntriesTests(TestCase):
workgroup
.
project
=
proj
workgroup
.
save
()
attrs
=
{
'name'
:
models
.
CharField
(
max_length
=
255
),
'display_name'
:
models
.
CharField
(
max_length
=
255
,
null
=
True
,
blank
=
True
),
'contact_name'
:
models
.
CharField
(
max_length
=
255
,
null
=
True
,
blank
=
True
),
'contact_email'
:
models
.
EmailField
(
max_length
=
255
,
null
=
True
,
blank
=
True
),
'contact_phone'
:
models
.
CharField
(
max_length
=
50
,
null
=
True
,
blank
=
True
),
'logo_url'
:
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
),
'workgroups'
:
models
.
ManyToManyField
(
Workgroup
,
related_name
=
"organizations"
),
'users'
:
models
.
ManyToManyField
(
User
,
related_name
=
"organizations"
),
'groups'
:
models
.
ManyToManyField
(
Group
,
related_name
=
"organizations"
),
'__module__'
:
'api_manager.models'
}
self
.
organization
=
type
(
"Organization"
,
(
TimeStampedModel
,),
attrs
)
fields
=
[(
f
.
name
,
f
)
for
f
in
self
.
organization
.
_meta
.
local_fields
]
table_name
=
self
.
organization
.
_meta
.
db_table
db
.
create_table
(
table_name
,
fields
)
attrs
=
{
'organization_id'
:
models
.
IntegerField
(),
'user_id'
:
models
.
IntegerField
(),
'__module__'
:
'api_manager.models'
}
self
.
organization_users
=
type
(
"organization_users"
,
(
models
.
Model
,),
attrs
)
fields
=
[(
f
.
name
,
f
)
for
f
in
self
.
organization_users
.
_meta
.
local_fields
]
table_name
=
self
.
organization_users
.
_meta
.
db_table
db
.
create_table
(
table_name
,
fields
)
attrs
=
{
'organization_id'
:
models
.
IntegerField
(),
'group_id'
:
models
.
IntegerField
(),
'__module__'
:
'api_manager.models'
}
self
.
organization_groups
=
type
(
"organization_groups"
,
(
models
.
Model
,),
attrs
)
fields
=
[(
f
.
name
,
f
)
for
f
in
self
.
organization_groups
.
_meta
.
local_fields
]
table_name
=
self
.
organization_groups
.
_meta
.
db_table
db
.
create_table
(
table_name
,
fields
)
attrs
=
{
'organization_id'
:
models
.
IntegerField
(),
'workgroup_id'
:
models
.
IntegerField
(),
'__module__'
:
'api_manager.models'
}
self
.
organization_workgroups
=
type
(
"organization_workgroups"
,
(
models
.
Model
,),
attrs
)
fields
=
[(
f
.
name
,
f
)
for
f
in
self
.
organization_workgroups
.
_meta
.
local_fields
]
table_name
=
self
.
organization_workgroups
.
_meta
.
db_table
db
.
create_table
(
table_name
,
fields
)
for
i
in
xrange
(
1
,
9
):
org
=
self
.
organization
()
org
.
name
=
'test_and_company {}'
.
format
(
i
)
...
...
lms/envs/bok_choy.env.json
View file @
8b1589d2
...
...
@@ -63,6 +63,8 @@
"DEFAULT_FROM_EMAIL"
:
"registration@example.com"
,
"EMAIL_BACKEND"
:
"django.core.mail.backends.smtp.EmailBackend"
,
"FEATURES"
:
{
"API"
:
"true"
,
"ORGANIZATIONS_APP"
:
true
,
"AUTH_USE_OPENID_PROVIDER"
:
true
,
"CERTIFICATES_ENABLED"
:
true
,
"CERTIFICATES_HTML_VIEW"
:
true
,
...
...
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