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
5c00db9f
Commit
5c00db9f
authored
Feb 20, 2015
by
Will Daly
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the linked in configuration migration backwards compatible
parent
ed8c0a10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
common/djangoapps/student/migrations/0044_linkedin_add_company_identifier.py
+1
-8
common/djangoapps/student/models.py
+3
-0
No files found.
common/djangoapps/student/migrations/0044_
rename_linkedin_config_field
.py
→
common/djangoapps/student/migrations/0044_
linkedin_add_company_identifier
.py
View file @
5c00db9f
...
...
@@ -8,9 +8,6 @@ from django.db import models
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
# Deleting field 'LinkedInAddToProfileConfiguration.dashboard_tracking_code'
db
.
delete_column
(
'student_linkedinaddtoprofileconfiguration'
,
'dashboard_tracking_code'
)
# Adding field 'LinkedInAddToProfileConfiguration.company_identifier'
db
.
add_column
(
'student_linkedinaddtoprofileconfiguration'
,
'company_identifier'
,
self
.
gf
(
'django.db.models.fields.TextField'
)(
default
=
''
),
...
...
@@ -18,11 +15,6 @@ class Migration(SchemaMigration):
def
backwards
(
self
,
orm
):
# Adding field 'LinkedInAddToProfileConfiguration.dashboard_tracking_code'
db
.
add_column
(
'student_linkedinaddtoprofileconfiguration'
,
'dashboard_tracking_code'
,
self
.
gf
(
'django.db.models.fields.TextField'
)(
default
=
''
,
blank
=
True
),
keep_default
=
False
)
# Deleting field 'LinkedInAddToProfileConfiguration.company_identifier'
db
.
delete_column
(
'student_linkedinaddtoprofileconfiguration'
,
'company_identifier'
)
...
...
@@ -109,6 +101,7 @@ class Migration(SchemaMigration):
'change_date'
:
(
'django.db.models.fields.DateTimeField'
,
[],
{
'auto_now_add'
:
'True'
,
'blank'
:
'True'
}),
'changed_by'
:
(
'django.db.models.fields.related.ForeignKey'
,
[],
{
'to'
:
"orm['auth.User']"
,
'null'
:
'True'
,
'on_delete'
:
'models.PROTECT'
}),
'company_identifier'
:
(
'django.db.models.fields.TextField'
,
[],
{}),
'dashboard_tracking_code'
:
(
'django.db.models.fields.TextField'
,
[],
{
'default'
:
"''"
,
'blank'
:
'True'
}),
'enabled'
:
(
'django.db.models.fields.BooleanField'
,
[],
{
'default'
:
'False'
}),
'id'
:
(
'django.db.models.fields.AutoField'
,
[],
{
'primary_key'
:
'True'
})
},
...
...
common/djangoapps/student/models.py
View file @
5c00db9f
...
...
@@ -1464,6 +1464,9 @@ class LinkedInAddToProfileConfiguration(ConfigurationModel):
)
)
# Deprecated
dashboard_tracking_code
=
models
.
TextField
(
default
=
""
,
blank
=
True
)
def
add_to_profile_url
(
self
,
course_name
,
enrollment_mode
,
cert_url
,
source
=
"o"
):
"""Construct the URL for the "add to profile" button.
...
...
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