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

Support for python-module style models #57

Open
delneg opened this issue Dec 7, 2018 · 5 comments
Open

Support for python-module style models #57

delneg opened this issue Dec 7, 2018 · 5 comments

Comments

@delneg
Copy link

delneg commented Dec 7, 2018

Currently, there is only 'upload models.py file' button, but my app has models split into different .py files under models module. Can we get support for that, too?

@mmcardle
Copy link
Owner

mmcardle commented Dec 7, 2018

Thats interesting, Yes it would be great if there was a upload models folder which grabbed the models from all files in the a folder.
As a workaround does it work when you load the files individually? ( i know that will be a pain if you have lots)

Also would you be expecting any future feature to keep your models split in separate files?

@delneg
Copy link
Author

delneg commented Dec 7, 2018

Thats interesting, Yes it would be great if there was a upload models folder which grabbed the models from all files in the a folder.
As a workaround does it work when you load the files individually? ( i know that will be a pain if you have lots)

Also would you be expecting any future feature to keep your models split in separate files?

I tried loading files individually, but the result is a mess...
Abstract & through models get mixed all the others, there's stuff like that in tests due to multiple abstract inheritance
"employee": create_employee().pk, "employee": create_employee().pk, "employee": create_employee().pk,
I will be trying to do models one-by-one, correcting all the fields in the interface (still faster than writing all those serializers by hand)

@delneg
Copy link
Author

delneg commented Dec 7, 2018

P.s. my app has 34 models at the moment, not counting ones from third-party apps & django.contrib models

@mmcardle
Copy link
Owner

mmcardle commented Dec 7, 2018

Yes that is more complex than the upload parser can handle currently, abstract and through models are not supported yet.
I hope you can still get some use from the site as it is currently :)

I will take a look at how much work it is to add those features.

@delneg
Copy link
Author

delneg commented Dec 7, 2018

If you need any help, you can contact me via Telegram in my profile.
Also will try to look into this project to add the aforementioned functionality

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

No branches or pull requests

2 participants