forked from openedx/credentials
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [ACI-275] new CredlyOrganization model
- Loading branch information
Showing
4 changed files
with
59 additions
and
2 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
34 changes: 34 additions & 0 deletions
34
credentials/apps/badges/distribution/credly_badges/migrations/0001_initial.py
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,34 @@ | ||
# Generated by Django 4.2.9 on 2024-01-16 12:03 | ||
|
||
from django.db import migrations, models | ||
import django_extensions.db.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
initial = True | ||
|
||
dependencies = [] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="CredlyOrganization", | ||
fields=[ | ||
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")), | ||
( | ||
"created", | ||
django_extensions.db.fields.CreationDateTimeField(auto_now_add=True, verbose_name="created"), | ||
), | ||
( | ||
"modified", | ||
django_extensions.db.fields.ModificationDateTimeField(auto_now=True, verbose_name="modified"), | ||
), | ||
("uuid", models.UUIDField(help_text="Unique credly organization ID.", unique=True)), | ||
("name", models.CharField(help_text="Name of credly organization.", max_length=255)), | ||
("api_key", models.CharField(help_text="Credly organization API bearer secret.", max_length=255)), | ||
], | ||
options={ | ||
"get_latest_by": "modified", | ||
"abstract": False, | ||
}, | ||
), | ||
] |
Empty file.
13 changes: 13 additions & 0 deletions
13
credentials/apps/badges/distribution/credly_badges/models.py
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,3 +1,16 @@ | ||
""" | ||
Credly badges DB models. | ||
""" | ||
|
||
from django.db import models | ||
from django_extensions.db.models import TimeStampedModel | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
class CredlyOrganization(TimeStampedModel): | ||
""" | ||
A single Credly organization. | ||
""" | ||
uuid = models.UUIDField(unique=True, help_text=_('Unique credly organization ID.')) | ||
name = models.CharField(max_length=255, help_text=_('Name of credly organization.')) | ||
api_key = models.CharField(max_length=255, help_text=_('Credly organization API bearer secret.')) |