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

Old models never die #91

Open
darkpixel opened this issue May 24, 2020 · 12 comments
Open

Old models never die #91

darkpixel opened this issue May 24, 2020 · 12 comments

Comments

@darkpixel
Copy link

I was signed in as an anonymous account. When I removed all my projects and created a new one with a new name, the old models populated the top of the screen.

@mmcardle
Copy link
Owner

mmcardle commented Jun 1, 2020

Hi @darkpixel
Are these models you have imported from a models.py file?
The imported models are not attached to particular project so they persist, they can be deleted from the import screen.

@darkpixel
Copy link
Author

Yeah, I imported them from a models.py file. There were literally somewhere around 300 models in this project. We basically introspected a 3rd-party database and we use Django to access the data. I was hoping to auto-generate a bunch of the boilerplate using django_builder, but it's forcing me to add every model by hand into an application. Maybe I'm missing something...

@mmcardle
Copy link
Owner

mmcardle commented Jun 3, 2020

Ah yes I see how that could be frustrating.
To be honest I have only imported around 5 models max to test.

The flow is meant to be ->

  • Upload a models.py file, any models found appear in a bar along the top.
  • View the models in a dialog, choose which models to import and add the to an app.

What do you think would help in your situation (more than 1 might apply)

  • Add all models found automatically to an app?
  • Add "Add All" and "Delete All" buttons to the import dialog?
  • Remove all imported models from the dialog when you create a new project.

Thanks for your feedback

@darkpixel
Copy link
Author

Sorry--I'm not ignoring you. It's just been a busy couple of weeks.

I think those would all work, but I think it would be more efficient to upload directly to an app.

Basically models aren't a "project level" item. They are application level. When importing, they should probably be imported against an app directly without having to manually associate them.

I suppose someone might want to break things up into multiple apps, but I think that could be handled if necessary by being able to right-click a model and have an option to "copy/move to app" or something like that.

@mmcardle
Copy link
Owner

That makes total sense, and would tidy up the UI quite a bit.

@mmcardle
Copy link
Owner

@darkpixel this should now be fixed, there is an Upload button when adding a model to an app.

@darkpixel
Copy link
Author

Nice! I just checked out the live site.
Would it be too much to ask to have an "Add All" button on the screen that comes up after uploading models? I want to load ~150 models, and don't want to keep clicking the "Add" button and waiting ~1 second for the page to refresh. :)

@mmcardle
Copy link
Owner

@darkpixel
Agreed and done.

@darkpixel
Copy link
Author

It spent several minutes trying to import a bunch of models, and tossed this into dev tools:

Screenshot from 2020-07-23 14-23-33

@mmcardle
Copy link
Owner

@darkpixel Will see if i can fix that, might have to do them in batches.
How many models and fields in total are you importing?

@darkpixel
Copy link
Author

196

@mmcardle
Copy link
Owner

mmcardle commented Sep 9, 2020

The issues with importing so many models is hitting the quota limits of the backend system (firebase).
Currently the free tier has hard limits when you get to the quota https://firebase.google.com/pricing .

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