Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7124729
D7446.id27010.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Subscribers
None
D7446.id27010.diff
View Options
diff --git a/swh/web/add_forge_now/__init__.py b/swh/web/add_forge_now/__init__.py
--- a/swh/web/add_forge_now/__init__.py
+++ b/swh/web/add_forge_now/__init__.py
@@ -0,0 +1,6 @@
+# Copyright (C) 2022 The Software Heritage developers
+# See the AUTHORS file at the top-level directory of this distribution
+# License: GNU Affero General Public License version 3, or any later version
+# See top-level LICENSE file for more information
+
+default_app_config = "swh.web.add_forge_now.apps.AddForgeNowConfig"
diff --git a/swh/web/add_forge_now/apps.py b/swh/web/add_forge_now/apps.py
--- a/swh/web/add_forge_now/apps.py
+++ b/swh/web/add_forge_now/apps.py
@@ -5,7 +5,9 @@
from django.apps import AppConfig
+LABEL = "swh_web_add_forge_now"
+
class AddForgeNowConfig(AppConfig):
name = "swh.web.add_forge_now"
- label = "swh_web_add_forge_now"
+ label = LABEL
diff --git a/swh/web/add_forge_now/migrations/0001_initial.py b/swh/web/add_forge_now/migrations/0001_initial.py
--- a/swh/web/add_forge_now/migrations/0001_initial.py
+++ b/swh/web/add_forge_now/migrations/0001_initial.py
@@ -101,7 +101,7 @@
"request",
models.ForeignKey(
on_delete=django.db.models.deletion.DO_NOTHING,
- to="add_forge_now.Request",
+ to="swh_web_add_forge_now.Request",
),
),
],
diff --git a/swh/web/add_forge_now/migrations/0002_authorized_null_comment.py b/swh/web/add_forge_now/migrations/0002_authorized_null_comment.py
--- a/swh/web/add_forge_now/migrations/0002_authorized_null_comment.py
+++ b/swh/web/add_forge_now/migrations/0002_authorized_null_comment.py
@@ -6,7 +6,7 @@
class Migration(migrations.Migration):
dependencies = [
- ("add_forge_now", "0001_initial"),
+ ("swh_web_add_forge_now", "0001_initial"),
]
operations = [
diff --git a/swh/web/add_forge_now/migrations/0003_request_submitter_forward_username.py b/swh/web/add_forge_now/migrations/0003_request_submitter_forward_username.py
--- a/swh/web/add_forge_now/migrations/0003_request_submitter_forward_username.py
+++ b/swh/web/add_forge_now/migrations/0003_request_submitter_forward_username.py
@@ -6,7 +6,7 @@
class Migration(migrations.Migration):
dependencies = [
- ("add_forge_now", "0002_authorized_null_comment"),
+ ("swh_web_add_forge_now", "0002_authorized_null_comment"),
]
operations = [
diff --git a/swh/web/add_forge_now/migrations/0004_rename_tables.py b/swh/web/add_forge_now/migrations/0004_rename_tables.py
new file mode 100644
--- /dev/null
+++ b/swh/web/add_forge_now/migrations/0004_rename_tables.py
@@ -0,0 +1,17 @@
+# Generated by Django 2.2.27 on 2022-03-29 11:42
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("swh_web_add_forge_now", "0003_request_submitter_forward_username"),
+ ]
+
+ operations = [
+ migrations.AlterModelTable(name="request", table="add_forge_request",),
+ migrations.AlterModelTable(
+ name="requesthistory", table="add_forge_request_history",
+ ),
+ ]
diff --git a/swh/web/add_forge_now/models.py b/swh/web/add_forge_now/models.py
--- a/swh/web/add_forge_now/models.py
+++ b/swh/web/add_forge_now/models.py
@@ -10,6 +10,8 @@
from django.db import models
+from .apps import LABEL
+
class RequestStatus(enum.Enum):
"""Request statuses.
@@ -81,6 +83,10 @@
date = models.DateTimeField(auto_now_add=True)
new_status = models.TextField(choices=RequestStatus.choices(), null=True)
+ class Meta:
+ app_label = LABEL
+ db_table = "add_forge_request_history"
+
class Request(models.Model):
status = models.TextField(
@@ -98,3 +104,7 @@
forge_contact_comment = models.TextField(
null=True, help_text="Where did you find this contact information (url, ...)",
)
+
+ class Meta:
+ app_label = LABEL
+ db_table = "add_forge_request"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Dec 21 2024, 6:01 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3229377
Attached To
D7446: Install app_label on add_forge_now model classes
Event Timeline
Log In to Comment