Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-val
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-val
Commits
45aa830a
Commit
45aa830a
authored
Feb 02, 2016
by
Kevin Falcone
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #58 from edx/jibsheet/dont-use-using
Jibsheet/dont use using
parents
bebda677
da3df6d5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
edxval/migrations/0002_data__default_profiles.py
+2
-4
setup.py
+1
-1
No files found.
edxval/migrations/0002_data__default_profiles.py
View file @
45aa830a
...
@@ -16,16 +16,14 @@ DEFAULT_PROFILES = [
...
@@ -16,16 +16,14 @@ DEFAULT_PROFILES = [
def
create_default_profiles
(
apps
,
schema_editor
):
def
create_default_profiles
(
apps
,
schema_editor
):
""" Add default profiles """
""" Add default profiles """
Profile
=
apps
.
get_model
(
"edxval"
,
"Profile"
)
Profile
=
apps
.
get_model
(
"edxval"
,
"Profile"
)
db_alias
=
schema_editor
.
connection
.
alias
for
profile
in
DEFAULT_PROFILES
:
for
profile
in
DEFAULT_PROFILES
:
Profile
.
objects
.
using
(
db_alias
)
.
get_or_create
(
profile_name
=
profile
)
Profile
.
objects
.
get_or_create
(
profile_name
=
profile
)
def
delete_default_profiles
(
apps
,
schema_editor
):
def
delete_default_profiles
(
apps
,
schema_editor
):
""" Remove default profiles """
""" Remove default profiles """
Profile
=
apps
.
get_model
(
"edxval"
,
"Profile"
)
Profile
=
apps
.
get_model
(
"edxval"
,
"Profile"
)
db_alias
=
schema_editor
.
connection
.
alias
Profile
.
objects
.
filter
(
profile_name__in
=
DEFAULT_PROFILES
)
.
delete
()
Profile
.
objects
.
using
(
db_alias
)
.
filter
(
profile_name__in
=
DEFAULT_PROFILES
)
.
delete
()
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
...
...
setup.py
View file @
45aa830a
...
@@ -39,7 +39,7 @@ def load_requirements(*requirements_paths):
...
@@ -39,7 +39,7 @@ def load_requirements(*requirements_paths):
setup
(
setup
(
name
=
'edxval'
,
name
=
'edxval'
,
version
=
'0.0.
8
'
,
version
=
'0.0.
9
'
,
author
=
'edX'
,
author
=
'edX'
,
url
=
'http://github.com/edx/edx-val'
,
url
=
'http://github.com/edx/edx-val'
,
description
=
'edx-val'
,
description
=
'edx-val'
,
...
...
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