#4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS")
by Luc Saffre · in Developers · assigned to Luc Saffre
Summary
This seemingly trivial problem caused an avalanche of changes.
Children
Comments
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : Uff, I found that last bug in my code that caused the pm test i noi1e to fail. It was because User.is_active now also tests for has_usable_password().
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : Even after another hour of staring at the code, I am still having the permission problem mentioned in my previous comment. Maybe I will commit with this problem, in the hope that @8lurry can help me to find the explanation...
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") (1 reply) : @8lurry please can you tell me whether "go noi1e; pm test" works on your machine? I am having a failure "AssertionError: 403 != 200 : Response status () was 403 instead of 200" in test_notify.py, which is probably caused by my changes... but I didn't yet find the explanation. If you have it, too, then it w...
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : I am still cleaning up the test suite after my changes...
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : The "parser user" is not a row in users.User, it is another instance of AnonymousUser (which is no longer a subclass of SimpleSingleton).
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : The test suite is running. And then I must document my work....
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : memo.Mention now works. blogs.Entry.get_primary_image() now uses these mentions. Demo data now uses the [image] memo command. We have a new notion of the "parser user", a special user with username "memo" and user_type admin, but unusable password. It is needed for generating previews.
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : I am not yet finished: the memo.Mention objects aren't yet getting generated.
- 3 years, 9 months ago by Luc Saffre in reply to Sharif Mehedi about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : More precisely, Django can't. Because owner is a GFK. You can build queries using the underlying fields owner_type and owner_id.
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : I saw first results. I I will throw away albums.FileUsage, we simply insert images using memo commands, basta. TODO: adapt demo fixtures to include an image command.
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : I started an avalanche of bold changes. Not finished. Will continue tomorrow.
- 3 years, 9 months ago by Luc Saffre in reply to Sharif Mehedi about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : Why do we have the uploads.FileUsage at all? Seems that currently its only purpose is to give some work to manage_file_usage()... The intended purpose is to warn users before deleting an upload when it is being mentioned in some blog memo text somewhere (a page, a blog post, a comment, ...). This p...
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") (2 replies) : No no no, it was a wrong idea to make a unique "image" command! We must have two memo commands "upload" and "image" and of course they will use some common code, which may be in memo.
- 3 years, 9 months ago by Sharif Mehedi about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : also it makes sense like this that it shouldn't resolve 'owner__some_field_name' layout items. because the likes of which is unknown. I am thinking what should we do about this.
- 3 years, 9 months ago by Sharif Mehedi about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") (1 reply) : Lino can't resolve layout items like: 'owner__some_field_name'
- 3 years, 9 months ago by Sharif Mehedi about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") (5 replies) : the models FileUsage in albums has some extra features than what we have in uploads plugin. Of course we could have those features also in the model in uploads plugin and in that case we can take the two in a common place. I am thinking maybe in the systems plugin, but with checks like (if dd.is_ins...
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : It seems to me that we should replace the two FileUsage models (one in albums, the other in uploads) by a single model in the memo plugin. To be meditated.
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : That's because we now import lino.modlib.gfks.mixins.Controllable into uploads plugin. @8lurry let's look at this together.
- 3 years, 9 months ago by Luc Saffre about #4818 (inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS") : Created new Ticket #4818 (⚹ inv prep says "ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS").