[Django] #20468: loaddata - during import exclude some applications

47 views
Skip to first unread message

Django

unread,
May 20, 2013, 6:34:13 AM5/20/13
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
--------------------------------------------+--------------------
Reporter: fizista | Owner: nobody
Type: New feature | Status: new
Component: Core (Management commands) | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------------+--------------------
Would propose adding this option to the command loaddata:
{{{
-e EXCLUDE, --exclude=EXCLUDE
An appname or appname.ModelName to exclude (use
multiple --exclude to exclude multiple
apps/models).

}}}

Sometimes it can be useful if you have a file with data from multiple
applications / models, and we want to import only a portion of the data.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 22, 2013, 1:25:54 AM5/22/13
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------

Reporter: fizista | Owner: nobody
Type: New feature | Status: new
Component: Core (Management | Version: master
commands) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Changes (by akaariai):

* needs_better_patch: => 0
* needs_docs: => 0
* needs_tests: => 0
* stage: Unreviewed => Accepted


Comment:

I am going to mark this accepted. I don't feel strongly in one way or
another about this issue, I just want to get this out of unreviewed triage
stage.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:1>

Django

unread,
Nov 23, 2015, 3:11:44 AM11/23/15
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned

Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by alexmorozov):

* owner: nobody => alexmorozov
* status: new => assigned


Comment:

Seems useful. Recently I've faced a similar problem. Will give it a try.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:2>

Django

unread,
Nov 27, 2015, 9:54:16 AM11/27/15
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by alexmorozov):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/5734

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:3>

Django

unread,
Dec 7, 2015, 2:01:26 AM12/7/15
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by alexmorozov):

Guys, I've got a somewhat meta question: Shall I always squash my minor
fixes to PR and `push --force` them, or shall I leave them as separate
commits? Which way is the preferred one?

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:4>

Django

unread,
Dec 7, 2015, 8:55:06 AM12/7/15
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

If it's a huge PR, incremental commits can make follow up review easier.
In this case, the patch looks small enough that you could squash right
away.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:5>

Django

unread,
Dec 7, 2015, 9:25:09 AM12/7/15
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by alexmorozov):

Thank you, @timgraham. I've pushed the updated (and squashed) PR. All
lights are green. It'd be nice if you review the code. I'm not sure about
the [https://github.com/django/django/pull/5734/files#diff-
e25be54b3794c16fee263cfffae38a06R81 source] argument. Looks clumsy, but I
haven't thought out another way of keeping the output compatibility. Is
that OK?

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:6>

Django

unread,
Jan 18, 2016, 7:41:30 PM1/18/16
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by berkerpeksag):

* cc: berker.peksag@… (added)
* needs_better_patch: 0 => 1


Comment:

I left some review comments on GitHub.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:7>

Django

unread,
Feb 11, 2016, 6:33:34 PM2/11/16
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:8>

Django

unread,
Mar 8, 2016, 10:36:29 AM3/8/16
to django-...@googlegroups.com
#20468: loaddata - during import exclude some applications
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

Left a few more comments and branch needs a rebase to merge cleanly.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:9>

Django

unread,
May 28, 2016, 10:57:46 AM5/28/16
to django-...@googlegroups.com
#20468: Allow loaddata to exclude some apps or models

-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: assigned
Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 1 => 0


Comment:

[https://github.com/django/django/pull/6615 Updated PR] from Berker.

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:10>

Django

unread,
Jun 9, 2016, 10:38:03 AM6/9/16
to django-...@googlegroups.com
#20468: Allow loaddata to exclude some apps or models
-------------------------------------+-------------------------------------
Reporter: fizista | Owner:
| alexmorozov
Type: New feature | Status: closed

Component: Core (Management | Version: master
commands) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ae2a7da86bf841d42be86dea3effb0261187c950" ae2a7da8]:
{{{
#!CommitTicketReference repository=""
revision="ae2a7da86bf841d42be86dea3effb0261187c950"
Fixed #20468 -- Added loaddata --exclude option.

Thanks Alex Morozov for the initial patch.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/20468#comment:11>

Reply all
Reply to author
Forward
0 new messages