-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
108 additions
and
191 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/djangocms_snippet/migrations/0009_alter_snippetptr_cmsplugin_ptr.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,21 @@ | ||
# Generated by Django 4.1.7 on 2023-02-28 16:57 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('cms', '0022_auto_20180620_1551'), | ||
('djangocms_snippet', '0008_auto_change_name'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='snippetptr', | ||
name='cmsplugin_ptr', | ||
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, related_name='%(app_label)s_%(class)s', serialize=False, to='cms.cmsplugin'), | ||
), | ||
] | ||
|
33 changes: 33 additions & 0 deletions
33
src/djangocms_snippet/migrations/0014_merge_20240519_2117.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,33 @@ | ||
# Generated by Django 5.0.1 on 2024-05-19 21:17 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("djangocms_snippet", "0009_alter_snippetptr_cmsplugin_ptr"), | ||
("djangocms_snippet", "0013_snippet_site"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="snippet", | ||
options={ | ||
"ordering": ["name"], | ||
"verbose_name": "Snippet", | ||
"verbose_name_plural": "Snippets", | ||
}, | ||
), | ||
migrations.AlterField( | ||
model_name="snippet", | ||
name="name", | ||
field=models.CharField(max_length=255, verbose_name="Name"), | ||
), | ||
migrations.AlterField( | ||
model_name="snippet", | ||
name="slug", | ||
field=models.SlugField( | ||
default="", max_length=255, verbose_name="Slug" | ||
), | ||
), | ||
] |
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
File renamed without changes.
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,3 @@ | ||
-r requirements.in | ||
Django>=4.2,<5.0 | ||
django-cms>=3.11,<4 |
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,7 @@ | ||
-r base.txt | ||
|
||
Django>=4.2,<5.0 | ||
|
||
# Unreleased django 4.2 & django-cms 4.0.x compatible packages | ||
django-cms>=4.1,<4.2 | ||
djangocms-versioning>=2.0.2 |
This file was deleted.
Oops, something went wrong.
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
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,22 +1,24 @@ | ||
from django.conf import settings | ||
from django.contrib.contenttypes.models import ContentType | ||
from django.db import models | ||
|
||
from cms import __version__ as cms_version | ||
|
||
class Version(models.Model): | ||
content = models.ForeignKey("djangocms_snippet.Snippet", related_name="versions", on_delete=models.CASCADE) | ||
created_by = models.ForeignKey( | ||
settings.AUTH_USER_MODEL, on_delete=models.PROTECT, | ||
) | ||
state = models.CharField(max_length=50, default="draft") | ||
|
||
def __init__(self, *args, **kwargs): | ||
kwargs.pop("content_type", None) | ||
obj_id = kwargs.pop("object_id", None) | ||
if obj_id: | ||
kwargs["content_id"] = obj_id | ||
super().__init__(*args, **kwargs) | ||
if cms_version < "4": | ||
class Version(models.Model): | ||
content = models.ForeignKey("djangocms_snippet.Snippet", related_name="versions", on_delete=models.CASCADE) | ||
created_by = models.ForeignKey( | ||
settings.AUTH_USER_MODEL, on_delete=models.PROTECT, | ||
) | ||
state = models.CharField(max_length=50, default="draft") | ||
|
||
def __init__(self, *args, **kwargs): | ||
kwargs.pop("content_type", None) | ||
obj_id = kwargs.pop("object_id", None) | ||
if obj_id: | ||
kwargs["content_id"] = obj_id | ||
super().__init__(*args, **kwargs) | ||
|
||
def publish(self, user): | ||
pass | ||
|
||
def publish(self, user): | ||
pass |
Oops, something went wrong.