-
-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove CorsModel and provide AbstractCorsModel instead
- Loading branch information
1 parent
1958434
commit cb43168
Showing
8 changed files
with
28 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
from django.db import models | ||
from django.utils.encoding import python_2_unicode_compatible | ||
|
||
|
||
@python_2_unicode_compatible | ||
class CorsModel(models.Model): | ||
cors = models.CharField(max_length=255) | ||
class AbstractCorsModel(models.Model): | ||
class Meta: | ||
abstract = True | ||
db_table = 'corsheaders_corsmodel' | ||
|
||
def __str__(self): | ||
return self.cors | ||
cors = models.CharField(max_length=255) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
INSTALLED_APPS = [ | ||
'corsheaders', | ||
'testapp', | ||
] | ||
|
||
DATABASES = { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from corsheaders.models import AbstractCorsModel | ||
|
||
|
||
class CorsModel(AbstractCorsModel): | ||
pass |