django-findreplace 0.1__tar.gz → 0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {django-findreplace-0.1 → django_findreplace-0.3}/LICENSE +1 -1
  2. django_findreplace-0.3/MANIFEST.in +1 -0
  3. django_findreplace-0.3/PKG-INFO +62 -0
  4. django_findreplace-0.3/README.md +36 -0
  5. django_findreplace-0.3/django_findreplace.egg-info/PKG-INFO +62 -0
  6. {django-findreplace-0.1 → django_findreplace-0.3}/django_findreplace.egg-info/SOURCES.txt +2 -3
  7. django_findreplace-0.3/django_findreplace.egg-info/requires.txt +1 -0
  8. django_findreplace-0.3/findreplace/management/commands/__init__.py +0 -0
  9. {django-findreplace-0.1 → django_findreplace-0.3}/findreplace/management/commands/findreplace.py +3 -3
  10. django_findreplace-0.3/pyproject.toml +110 -0
  11. {django-findreplace-0.1 → django_findreplace-0.3}/setup.cfg +0 -3
  12. django-findreplace-0.1/MANIFEST.in +0 -6
  13. django-findreplace-0.1/PKG-INFO +0 -68
  14. django-findreplace-0.1/README.rst +0 -43
  15. django-findreplace-0.1/django_findreplace.egg-info/PKG-INFO +0 -68
  16. django-findreplace-0.1/django_findreplace.egg-info/requires.txt +0 -1
  17. django-findreplace-0.1/findreplace/__init__.py +0 -1
  18. django-findreplace-0.1/setup.py +0 -42
  19. {django-findreplace-0.1 → django_findreplace-0.3}/django_findreplace.egg-info/dependency_links.txt +0 -0
  20. {django-findreplace-0.1 → django_findreplace-0.3}/django_findreplace.egg-info/top_level.txt +0 -0
  21. {django-findreplace-0.1/findreplace/management → django_findreplace-0.3/findreplace}/__init__.py +0 -0
  22. {django-findreplace-0.1/findreplace/management/commands → django_findreplace-0.3/findreplace/management}/__init__.py +0 -0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018-2019, Developer Society Limited
1
+ Copyright (c) 2018-2026, Developer Society Limited
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
@@ -0,0 +1 @@
1
+ prune tests
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: django-findreplace
3
+ Version: 0.3
4
+ Summary: Django Find Replace
5
+ Maintainer-email: The Developer Society <studio@dev.ngo>
6
+ License-Expression: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/developersociety/django-findreplace
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Framework :: Django
18
+ Classifier: Framework :: Django :: 3.2
19
+ Classifier: Framework :: Django :: 4.2
20
+ Classifier: Framework :: Django :: 5.2
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: Django>=3.2
25
+ Dynamic: license-file
26
+
27
+ # Django Find Replace
28
+
29
+ A [Django](https://www.djangoproject.com/) management command which will replace all instances of
30
+ a string throughout a database with another - useful for bulk content changes.
31
+
32
+ ## Installation
33
+
34
+ Using [pip](https://pip.pypa.io/):
35
+
36
+ ```console
37
+ $ pip install django-findreplace
38
+ ```
39
+
40
+ Edit your Django project's settings module, and add the application to ``INSTALLED_APPS``:
41
+
42
+ ```python
43
+ INSTALLED_APPS = [
44
+ # ...
45
+ "findreplace",
46
+ # ...
47
+ ]
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ To replace all instances of *foo* with *bar*:
53
+
54
+ ```console
55
+ $ ./manage.py findreplace foo bar
56
+ ```
57
+
58
+ To use this command without being asked for confirmation:
59
+
60
+ ```console
61
+ $ ./manage.py findreplace --noinput foo bar
62
+ ```
@@ -0,0 +1,36 @@
1
+ # Django Find Replace
2
+
3
+ A [Django](https://www.djangoproject.com/) management command which will replace all instances of
4
+ a string throughout a database with another - useful for bulk content changes.
5
+
6
+ ## Installation
7
+
8
+ Using [pip](https://pip.pypa.io/):
9
+
10
+ ```console
11
+ $ pip install django-findreplace
12
+ ```
13
+
14
+ Edit your Django project's settings module, and add the application to ``INSTALLED_APPS``:
15
+
16
+ ```python
17
+ INSTALLED_APPS = [
18
+ # ...
19
+ "findreplace",
20
+ # ...
21
+ ]
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ To replace all instances of *foo* with *bar*:
27
+
28
+ ```console
29
+ $ ./manage.py findreplace foo bar
30
+ ```
31
+
32
+ To use this command without being asked for confirmation:
33
+
34
+ ```console
35
+ $ ./manage.py findreplace --noinput foo bar
36
+ ```
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.4
2
+ Name: django-findreplace
3
+ Version: 0.3
4
+ Summary: Django Find Replace
5
+ Maintainer-email: The Developer Society <studio@dev.ngo>
6
+ License-Expression: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/developersociety/django-findreplace
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Programming Language :: Python
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Framework :: Django
18
+ Classifier: Framework :: Django :: 3.2
19
+ Classifier: Framework :: Django :: 4.2
20
+ Classifier: Framework :: Django :: 5.2
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: Django>=3.2
25
+ Dynamic: license-file
26
+
27
+ # Django Find Replace
28
+
29
+ A [Django](https://www.djangoproject.com/) management command which will replace all instances of
30
+ a string throughout a database with another - useful for bulk content changes.
31
+
32
+ ## Installation
33
+
34
+ Using [pip](https://pip.pypa.io/):
35
+
36
+ ```console
37
+ $ pip install django-findreplace
38
+ ```
39
+
40
+ Edit your Django project's settings module, and add the application to ``INSTALLED_APPS``:
41
+
42
+ ```python
43
+ INSTALLED_APPS = [
44
+ # ...
45
+ "findreplace",
46
+ # ...
47
+ ]
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ To replace all instances of *foo* with *bar*:
53
+
54
+ ```console
55
+ $ ./manage.py findreplace foo bar
56
+ ```
57
+
58
+ To use this command without being asked for confirmation:
59
+
60
+ ```console
61
+ $ ./manage.py findreplace --noinput foo bar
62
+ ```
@@ -1,8 +1,7 @@
1
1
  LICENSE
2
2
  MANIFEST.in
3
- README.rst
4
- setup.cfg
5
- setup.py
3
+ README.md
4
+ pyproject.toml
6
5
  django_findreplace.egg-info/PKG-INFO
7
6
  django_findreplace.egg-info/SOURCES.txt
8
7
  django_findreplace.egg-info/dependency_links.txt
@@ -40,7 +40,7 @@ class Command(BaseCommand):
40
40
  def find_replace(self, field, find, replace):
41
41
  updated_count = 0
42
42
  model = field.model
43
- filter_kwargs = {"{}__contains".format(field.name): find}
43
+ filter_kwargs = {f"{field.name}__contains": find}
44
44
 
45
45
  # To avoid signals at all costs, we have to:
46
46
  # - Use values_list to avoid pre/post init
@@ -64,7 +64,7 @@ class Command(BaseCommand):
64
64
  for app in apps.get_app_configs():
65
65
  for model in app.get_models():
66
66
  for field in model._meta.get_fields():
67
- if isinstance(field, (models.CharField, models.TextField)):
68
- fields.append(field)
67
+ if isinstance(field, models.CharField | models.TextField):
68
+ fields.append(field) # noqa:PERF401
69
69
 
70
70
  return fields
@@ -0,0 +1,110 @@
1
+ [project]
2
+ name = 'django-findreplace'
3
+ version = '0.3'
4
+ description = 'Django Find Replace'
5
+ readme = 'README.md'
6
+ maintainers = [{ name = 'The Developer Society', email = 'studio@dev.ngo' }]
7
+ requires-python = '>= 3.10'
8
+ dependencies = [
9
+ 'Django>=3.2',
10
+ ]
11
+ license = 'BSD-3-Clause'
12
+ classifiers = [
13
+ 'Intended Audience :: Developers',
14
+ 'Operating System :: OS Independent',
15
+ 'Programming Language :: Python',
16
+ 'Programming Language :: Python :: 3',
17
+ 'Programming Language :: Python :: 3.10',
18
+ 'Programming Language :: Python :: 3.11',
19
+ 'Programming Language :: Python :: 3.12',
20
+ 'Programming Language :: Python :: 3.13',
21
+ 'Programming Language :: Python :: 3.14',
22
+ 'Framework :: Django',
23
+ 'Framework :: Django :: 3.2',
24
+ 'Framework :: Django :: 4.2',
25
+ 'Framework :: Django :: 5.2',
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = 'https://github.com/developersociety/django-findreplace'
30
+
31
+ [build-system]
32
+ requires = ['setuptools >= 77.0.3']
33
+ build-backend = 'setuptools.build_meta'
34
+
35
+ [tool.setuptools]
36
+ include-package-data = false
37
+
38
+ [tool.setuptools.packages.find]
39
+ include = ['findreplace*']
40
+
41
+ [tool.ruff]
42
+ line-length = 99
43
+ target-version = 'py310'
44
+
45
+ [tool.ruff.lint]
46
+ extend-select = [
47
+ 'ERA', # eradicate
48
+ 'YTT', # flake8-2020
49
+ 'ASYNC', # flake8-async
50
+ 'S', # flake8-bandit
51
+ 'BLE', # flake8-blind-except
52
+ 'B', # flake8-bugbear
53
+ 'A', # flake8-builtins
54
+ 'COM', # flake8-commas
55
+ 'C4', # flake8-comprehensions
56
+ 'DTZ', # flake8-datetimez
57
+ 'T10', # flake8-debugger
58
+ 'DJ', # flake8-django
59
+ 'EM', # flake8-errmsg
60
+ 'EXE', # flake8-executable
61
+ 'FA', # flake8-future-annotations
62
+ 'INT', # flake8-gettext
63
+ 'ISC', # flake8-implicit-str-concat
64
+ 'ICN', # flake8-import-conventions
65
+ 'LOG', # flake8-logging
66
+ 'G', # flake8-logging-format
67
+ 'INP', # flake8-no-pep420
68
+ 'PIE', # flake8-pie
69
+ 'T20', # flake8-print
70
+ 'PYI', # flake8-pyi
71
+ 'Q', # flake8-quotes
72
+ 'RSE', # flake8-raise
73
+ 'RET', # flake8-return
74
+ 'SLOT', # flake8-slots
75
+ 'SIM', # flake8-simplify
76
+ 'TID', # flake8-tidy-imports
77
+ 'TD', # flake8-todos
78
+ 'TCH', # flake8-type-checking
79
+ 'PTH', # flake8-use-pathlib
80
+ 'FLY', # flynt
81
+ 'I', # isort
82
+ 'NPY', # numpy-specific rules
83
+ 'PD', # pandas-vet
84
+ 'N', # pep8-naming
85
+ 'PERF', # perflint
86
+ 'E', # pycodestyle
87
+ 'W', # pycodestyle
88
+ 'F', # pyflakes
89
+ 'PGH', # pygrep-hooks
90
+ 'PLC', # pylint
91
+ 'PLE', # pylint
92
+ 'PLW', # pylint
93
+ 'UP', # pyupgrade
94
+ 'FURB', # refurb
95
+ 'RUF', # ruff-specific rules
96
+ 'TRY', # tryceratops
97
+ ]
98
+ ignore = [
99
+ 'COM812', # flake8-commas: missing-trailing-comma
100
+ 'EM101', # flake8-errmsg: raw-string-in-exception
101
+ 'ISC001', # flake8-implicit-str-concat: single-line-implicit-string-concatenation
102
+ 'RUF012', # ruff-specific rules: mutable-class-default
103
+ 'SIM105', # flake8-simplify: suppressible-exception
104
+ 'SIM108', # flake8-simplify: if-else-block-instead-of-if-exp
105
+ 'TD002', # flake8-todos: missing-todo-author
106
+ 'TRY003', # tryceratops: raise-vanilla-args
107
+ ]
108
+
109
+ [tool.ruff.lint.isort]
110
+ combine-as-imports = true
@@ -1,6 +1,3 @@
1
- [bdist_wheel]
2
- universal = 1
3
-
4
1
  [egg_info]
5
2
  tag_build =
6
3
  tag_date = 0
@@ -1,6 +0,0 @@
1
- include README.rst
2
- include LICENSE
3
- graft findreplace
4
- global-exclude *.py[co]
5
- global-exclude __pycache__
6
- global-exclude .DS_Store
@@ -1,68 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: django-findreplace
3
- Version: 0.1
4
- Summary: Django Find Replace
5
- Home-page: https://github.com/developersociety/django-findreplace
6
- Maintainer: The Developer Society
7
- Maintainer-email: studio@dev.ngo
8
- License: BSD
9
- Description: Django Find Replace
10
- ===================
11
-
12
- A Django_ management command which will replace all instances of a string throughout a database
13
- with another - useful for bulk content changes.
14
-
15
- .. _Django: https://www.djangoproject.com/
16
-
17
- Installation
18
- ------------
19
-
20
- Using pip_:
21
-
22
- .. _pip: https://pip.pypa.io/
23
-
24
- .. code-block:: console
25
-
26
- $ pip install django-findreplace
27
-
28
- Edit your Django project's settings module, and add the application to ``INSTALLED_APPS``:
29
-
30
- .. code-block:: python
31
-
32
- INSTALLED_APPS = [
33
- # ...
34
- "findreplace",
35
- # ...
36
- ]
37
-
38
- Usage
39
- -----
40
-
41
- To replace all instances of *foo* with *bar*:
42
-
43
- .. code-block:: console
44
-
45
- $ ./manage.py findreplace foo bar
46
-
47
- To use this command without being asked for confirmation:
48
-
49
- .. code-block:: console
50
-
51
- $ ./manage.py findreplace --noinput foo bar
52
-
53
- Platform: any
54
- Classifier: Intended Audience :: Developers
55
- Classifier: License :: OSI Approved :: BSD License
56
- Classifier: Operating System :: OS Independent
57
- Classifier: Programming Language :: Python
58
- Classifier: Programming Language :: Python :: 3
59
- Classifier: Programming Language :: Python :: 3.4
60
- Classifier: Programming Language :: Python :: 3.5
61
- Classifier: Programming Language :: Python :: 3.6
62
- Classifier: Programming Language :: Python :: 3.7
63
- Classifier: Framework :: Django
64
- Classifier: Framework :: Django :: 1.8
65
- Classifier: Framework :: Django :: 1.11
66
- Classifier: Framework :: Django :: 2.2
67
- Requires-Python: >=3.4
68
- Description-Content-Type: text/x-rst
@@ -1,43 +0,0 @@
1
- Django Find Replace
2
- ===================
3
-
4
- A Django_ management command which will replace all instances of a string throughout a database
5
- with another - useful for bulk content changes.
6
-
7
- .. _Django: https://www.djangoproject.com/
8
-
9
- Installation
10
- ------------
11
-
12
- Using pip_:
13
-
14
- .. _pip: https://pip.pypa.io/
15
-
16
- .. code-block:: console
17
-
18
- $ pip install django-findreplace
19
-
20
- Edit your Django project's settings module, and add the application to ``INSTALLED_APPS``:
21
-
22
- .. code-block:: python
23
-
24
- INSTALLED_APPS = [
25
- # ...
26
- "findreplace",
27
- # ...
28
- ]
29
-
30
- Usage
31
- -----
32
-
33
- To replace all instances of *foo* with *bar*:
34
-
35
- .. code-block:: console
36
-
37
- $ ./manage.py findreplace foo bar
38
-
39
- To use this command without being asked for confirmation:
40
-
41
- .. code-block:: console
42
-
43
- $ ./manage.py findreplace --noinput foo bar
@@ -1,68 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: django-findreplace
3
- Version: 0.1
4
- Summary: Django Find Replace
5
- Home-page: https://github.com/developersociety/django-findreplace
6
- Maintainer: The Developer Society
7
- Maintainer-email: studio@dev.ngo
8
- License: BSD
9
- Description: Django Find Replace
10
- ===================
11
-
12
- A Django_ management command which will replace all instances of a string throughout a database
13
- with another - useful for bulk content changes.
14
-
15
- .. _Django: https://www.djangoproject.com/
16
-
17
- Installation
18
- ------------
19
-
20
- Using pip_:
21
-
22
- .. _pip: https://pip.pypa.io/
23
-
24
- .. code-block:: console
25
-
26
- $ pip install django-findreplace
27
-
28
- Edit your Django project's settings module, and add the application to ``INSTALLED_APPS``:
29
-
30
- .. code-block:: python
31
-
32
- INSTALLED_APPS = [
33
- # ...
34
- "findreplace",
35
- # ...
36
- ]
37
-
38
- Usage
39
- -----
40
-
41
- To replace all instances of *foo* with *bar*:
42
-
43
- .. code-block:: console
44
-
45
- $ ./manage.py findreplace foo bar
46
-
47
- To use this command without being asked for confirmation:
48
-
49
- .. code-block:: console
50
-
51
- $ ./manage.py findreplace --noinput foo bar
52
-
53
- Platform: any
54
- Classifier: Intended Audience :: Developers
55
- Classifier: License :: OSI Approved :: BSD License
56
- Classifier: Operating System :: OS Independent
57
- Classifier: Programming Language :: Python
58
- Classifier: Programming Language :: Python :: 3
59
- Classifier: Programming Language :: Python :: 3.4
60
- Classifier: Programming Language :: Python :: 3.5
61
- Classifier: Programming Language :: Python :: 3.6
62
- Classifier: Programming Language :: Python :: 3.7
63
- Classifier: Framework :: Django
64
- Classifier: Framework :: Django :: 1.8
65
- Classifier: Framework :: Django :: 1.11
66
- Classifier: Framework :: Django :: 2.2
67
- Requires-Python: >=3.4
68
- Description-Content-Type: text/x-rst
@@ -1 +0,0 @@
1
- Django>=1.8
@@ -1 +0,0 @@
1
- __version__ = "0.1"
@@ -1,42 +0,0 @@
1
- #!/usr/bin/env python
2
- import os
3
-
4
- from setuptools import find_packages, setup
5
-
6
-
7
- def read(filename):
8
- with open(os.path.join(os.path.dirname(__file__), filename)) as f:
9
- return f.read()
10
-
11
-
12
- setup(
13
- name="django-findreplace",
14
- version="0.1",
15
- description="Django Find Replace",
16
- long_description=read("README.rst"),
17
- long_description_content_type="text/x-rst",
18
- url="https://github.com/developersociety/django-findreplace",
19
- maintainer="The Developer Society",
20
- maintainer_email="studio@dev.ngo",
21
- platforms=["any"],
22
- packages=find_packages(exclude=["tests"]),
23
- include_package_data=True,
24
- python_requires=">=3.4",
25
- install_requires=["Django>=1.8"],
26
- classifiers=[
27
- "Intended Audience :: Developers",
28
- "License :: OSI Approved :: BSD License",
29
- "Operating System :: OS Independent",
30
- "Programming Language :: Python",
31
- "Programming Language :: Python :: 3",
32
- "Programming Language :: Python :: 3.4",
33
- "Programming Language :: Python :: 3.5",
34
- "Programming Language :: Python :: 3.6",
35
- "Programming Language :: Python :: 3.7",
36
- "Framework :: Django",
37
- "Framework :: Django :: 1.8",
38
- "Framework :: Django :: 1.11",
39
- "Framework :: Django :: 2.2",
40
- ],
41
- license="BSD",
42
- )