App label with dot

199 views
Skip to first unread message

Federico Capoano

unread,
Dec 18, 2020, 10:47:45 AM12/18/20
to Django developers (Contributions to Django itself)
Defining the app_label of an AppConfig with a dot, like "myproject.subapp" is allowed, but raises an exception in the migration framework (too many values to unpack).

Did anybody notice this?

Is it supposed to be allowed or not at all?

Best regards
Federico Capoano

Tim Graham

unread,
Dec 18, 2020, 11:08:28 AM12/18/20
to Django developers (Contributions to Django itself)
app_label "should be a valid Python identifier." Dots aren't allowed.

Federico Capoano

unread,
Dec 18, 2020, 11:38:20 AM12/18/20
to Django developers (Contributions to Django itself)
Thanks Tim, would it be useful to have a more user friendly error message?

--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/3cbMviLrSzI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/134214d9-e3c1-4f74-9920-f0a62d4d675bn%40googlegroups.com.

Tom Forbes

unread,
Dec 18, 2020, 11:59:24 AM12/18/20
to django-d...@googlegroups.com
Yes, a more friendly error message would be far better here! User-facing runtime exceptions like unpacking errors are never good.

This should be quite a simple change to make, I’d suggest opening a trac ticket first and we can go from there. 

Tom

On 18 Dec 2020, at 16:38, Federico Capoano <federico...@gmail.com> wrote:


You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAERYH6XvS3_z-akSZw_xy8FRHbdZoxeOYN3D_fVyRJ%3D7B9zUFA%40mail.gmail.com.

Federico Capoano

unread,
Dec 20, 2020, 12:58:13 PM12/20/20
to Django developers (Contributions to Django itself)
Created: https://code.djangoproject.com/ticket/32285#ticket
Not sure if the categorization is correct, I don't see where AppConfig could fit there? Let's continue there.

Thanks 

Reply all
Reply to author
Forward
0 new messages