Skip to content

Commit

Permalink
django-taggit-911 - delinting
Browse files Browse the repository at this point in the history
  • Loading branch information
Trafire committed Jul 28, 2024
1 parent f2dcecf commit 3c8ca91
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 109 deletions.
96 changes: 0 additions & 96 deletions sample_taggit/library_management/abstract_models.py

This file was deleted.

1 change: 0 additions & 1 deletion sample_taggit/library_management/forms.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Path: `library_management/forms.py`
from django import forms

from taggit.forms import TagWidget
from taggit.models import Tag

from .models import Author, Book, ConditionTag, PhysicalCopy
Expand Down
10 changes: 1 addition & 9 deletions sample_taggit/library_management/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@
from django.urls import reverse

from taggit.managers import TaggableManager
from taggit.models import GenericTaggedItemBase, TagBase, TaggedItemBase

from .abstract_models import (
CustomPKModel,
CustomTagModel,
GenericModel,
TaggedCustomPK,
UUIDModel,
)
from taggit.models import TagBase, TaggedItemBase


def contains_inappropriate_language(text):
Expand Down
3 changes: 0 additions & 3 deletions sample_taggit/library_management/tests.py

This file was deleted.

29 changes: 29 additions & 0 deletions sample_taggit/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:: make.bat

@echo off

if "%1" == "reset" (
python manage.py migrate library_management zero
del library_management\migrations\0001_initial.py
python manage.py makemigrations library_management
python manage.py migrate
for %%f in (fixtures\*.json) do (
python manage.py loaddata %%f
)
) else if "%1" == "install" (
pip install -r requirements.txt
) else if "%1" == "clean" (
rmdir /s /q __pycache__

) else if "%1" == "export" (
python manage.py dumpdata --indent 2 auth.User --output=fixtures\0001_users.json
python manage.py dumpdata --indent 2 library_management.Author --output=fixtures\0002_author.json
python manage.py dumpdata --indent 2 library_management.BookType --output=fixtures\0003_book_type.json
python manage.py dumpdata --indent 2 library_management.Book --output=fixtures\0004_books.json
python manage.py dumpdata --indent 2 taggit.Tag --output=fixtures\0005_tags.json
python manage.py dumpdata --indent 2 library_management.ConditionTag --output=fixtures\0006_condition_tags.json
python manage.py dumpdata --indent 2 library_management.PhysicalCopy --output=fixtures\0007_tags.json
python manage.py dumpdata --indent 2 library_management.ConditionTaggedItem --output=fixtures\0008_condition_tagged_item.json
) else (
echo Invalid command. Use 'reset', 'install', 'clean', or 'export'.
)
7 changes: 7 additions & 0 deletions sample_taggit/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Makefile

reset-db:
python manage.py migrate zero;
python manage.py migrate;
python manage.py loaddata library_management/fixtures/*.json

0 comments on commit 3c8ca91

Please sign in to comment.