Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add migration file for Django>=1.7 #21

Closed
wants to merge 1 commit into from

Conversation

ro5k0
Copy link

@ro5k0 ro5k0 commented Feb 17, 2016

No description provided.

@ro5k0
Copy link
Author

ro5k0 commented Oct 13, 2016

Any chance of getting this added please?

@juliomalegria
Copy link
Owner

Is there a way this could break/affect users using Django<1.7?

@ro5k0
Copy link
Author

ro5k0 commented Oct 17, 2016

Not that I'm aware of. However, since 1.7 is the longest version that is no supported officially I don't think that's an issue personally. In my mind it would be much better to support people using 1.7 onwards by having the migration files in there so that people don't have to try and debug an error when using this great package.

@flavioamieiro
Copy link
Contributor

+1, please include migrations so we can use this package with newer versions of django :)

@juliomalegria
Copy link
Owner

Sorry I've taken forever. Would you mind regenerating the migration for it to be up to date with the latest changes?

@hackdna
Copy link

hackdna commented Feb 7, 2018

Would it be possible to merge this soon and publish a new release? This would help us (and others) avoid the hassle of having a local migration for this app.

@juliomalegria
Copy link
Owner

Hey @ro5k0, @hackdna

The main problem with this is that the ChunkedUpload can be an abstract model (controlled by CHUNKED_UPLOAD_ABSTRACT_MODEL in the settings). If that's the case, I don't know how will Django behave with the migration.

I see in the migration file there is options={'abstrct': False}. Maybe we should import ABSTRACT_MODEL from the settings to control that option?

# chunked_upload/migrations/0001_initial.py
from .settings import ABSTRACT_MODEL
# ...

class Migration(migrations.Migration):
  # ...
            options={
                'abstract': ABSTRACT_MODEL,
            },

name='ChunkedUpload',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('upload_id', models.CharField(default=chunked_upload.models.generate_upload_id, editable=False, max_length=32, unique=True)),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be default=chunked_upload.settings.UPLOAD_TO

@shaw2thefloor
Copy link

Would really like a fix to this issue :)

@hackdna
Copy link

hackdna commented Mar 5, 2018

It looks like using settings.CHUNKED_UPLOAD_ABSTRACT_MODEL should work. There is already settings.AUTH_USER_MODEL.

@jerinpetergeorge
Copy link
Collaborator

jerinpetergeorge commented Dec 18, 2019

This change was done in #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants