juliomalegria / django-chunked-upload

Upload large files to Django in multiple chunks, with the ability to resume if the upload is interrupted.
MIT No Attribution
218 stars 73 forks source link

Add migration file for Django>=1.7 #21

Closed ro5k0 closed 4 years ago

ro5k0 commented 8 years ago

Any chance of getting this added please?

juliomalegria commented 8 years ago

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

ro5k0 commented 8 years ago

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 commented 8 years ago

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

juliomalegria commented 7 years ago

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

hackdna commented 6 years ago

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 commented 6 years ago

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,
            },
shaw2thefloor commented 6 years ago

Would really like a fix to this issue :)

hackdna commented 6 years ago

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

jerinpetergeorge commented 4 years ago

This change was done in #53