diff --git a/bloggy/admin/misc_admin.py b/bloggy/admin/misc_admin.py index abbe85a..88f58d7 100644 --- a/bloggy/admin/misc_admin.py +++ b/bloggy/admin/misc_admin.py @@ -16,6 +16,5 @@ class RedirectRuleAdmin(admin.ModelAdmin): 'source', 'destination', 'status_code', - 'is_regx', 'note', ) diff --git a/bloggy/management/commands/seed_redirectrules.py b/bloggy/management/commands/seed_redirectrules.py index f5c69cc..a37e6a7 100644 --- a/bloggy/management/commands/seed_redirectrules.py +++ b/bloggy/management/commands/seed_redirectrules.py @@ -28,8 +28,7 @@ def handle(self, *args, **options): from_url=row[0], to_url=row[1], status_code=row[2], - is_regx=row[3], - note=row[4] + note=row[3] ) self.stdout.write(self.style.SUCCESS(f"%s redirect rules imported" % counter)) diff --git a/bloggy/migrations/0004_remove_redirectrule_is_regx.py b/bloggy/migrations/0004_remove_redirectrule_is_regx.py new file mode 100644 index 0000000..aaa6c52 --- /dev/null +++ b/bloggy/migrations/0004_remove_redirectrule_is_regx.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.7 on 2023-11-17 16:54 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('bloggy', '0003_rename_logo_category_thumbnail_page_thumbnail'), + ] + + operations = [ + migrations.RemoveField( + model_name='redirectrule', + name='is_regx', + ), + ] diff --git a/bloggy/models/redirect_rule.py b/bloggy/models/redirect_rule.py index 247ca02..102f060 100644 --- a/bloggy/models/redirect_rule.py +++ b/bloggy/models/redirect_rule.py @@ -15,12 +15,6 @@ class RedirectRule(Updatable): help_text="Redirect type", verbose_name="Redirect type") - is_regx = models.BooleanField( - default=False, - null=True, - help_text="Is this regx?" - ) - note = models.CharField( max_length=500, help_text='Enter note', diff --git a/demo_content/redirect_rules.csv b/demo_content/redirect_rules.csv index dd7c447..e1a36ca 100644 --- a/demo_content/redirect_rules.csv +++ b/demo_content/redirect_rules.csv @@ -1,40 +1,11 @@ -source,destination,status_code,is_regx,note -/tutorials/spring/how-to-configure-pojos-with-java-collection-attributes,/articles/configure-pojos-with-java-collection-attributes-in-spring,301,True, -/android/download-and-display-image-in-android-gridview,/articles/download-and-display-image-in-android-gridview,301,True, -/article/how-to-format-your-post,/how-to-format-your-post,301,True, -/android/android-framelayout-example,/articles/android-framelayout-example,301,True, -/interview-questions,/articles,301,True, -/courses/maven,/courses/maven-for-beginners,301,True, -/how-to-format-your-post,/contribute,301,True, -/article/download-and-display-image-in-android-gridview,/articles/download-and-display-image-in-android-gridview,301,True, -/tutorials/java/spring/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/android/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/spring-boot/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/spring/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/laravel/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/php/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/git/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/html5/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/bootstrap/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/java/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/xamarin/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/react/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/react-native/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/wordpress/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/json/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/design-patterns/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/sencha-touch/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/ibm-worklight/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/phonegap/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/ios/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/seo/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/se-concepts/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/servlets/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/struts/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/c/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/struts/([a-zA-Z0-9-]+), /article/\1,301,False, -/tutorials/libgdx/([a-zA-Z0-9-]+), /article/\1,301,False, -/how-to/([a-zA-Z0-9-]+), /article/\1,301,False, -/blog/([a-zA-Z0-9-]+), /article/\1,301,False, -/articles/how-to-configure-pojos-with-java-collection-attributes,/articles/configure-pojos-with-java-collection-attributes-in-spring,301,True, -/courses/maven,/courses/maven-for-beginners,301,True, \ No newline at end of file +source,destination,status_code,note +/tutorials/spring/how-to-configure-pojos-with-java-collection-attributes,/articles/configure-pojos-with-java-collection-attributes-in-spring,301, +/android/download-and-display-image-in-android-gridview,/articles/download-and-display-image-in-android-gridview,301, +/article/how-to-format-your-post,/how-to-format-your-post,301, +/android/android-framelayout-example,/articles/android-framelayout-example,301, +/interview-questions,/articles,301, +/courses/maven,/courses/maven-for-beginners,301, +/how-to-format-your-post,/contribute,301, +/article/download-and-display-image-in-android-gridview,/articles/download-and-display-image-in-android-gridview,301, +/articles/how-to-configure-pojos-with-java-collection-attributes,/articles/configure-pojos-with-java-collection-attributes-in-spring,301, +/courses/maven,/courses/maven-for-beginners,301, \ No newline at end of file