Home > database >  Why can't I use "profile" as an app name?
Why can't I use "profile" as an app name?

Time:07-07

I need a profile to extend the Django User object, so I thought to create an app to contain the profile object and related views then proceed as per the Django doc, but I get

./manage.py startapp profile
CommandError: 'profile' conflicts with the name of an existing Python module and cannot be used as an app name. Please try another name.

I don't have an app called profile in INSTALLED_APPS and I don't know what context this message should be interpreted in. Can anybody help?

(Yes, I could call it userprofile or xxx_profile instead, but I'd like to understand why I need to)

CodePudding user response:

It conflicts with std lib module profile:

https://docs.python.org/3/library/profile.html

CodePudding user response:

It conflicts with an already excisting library, not made by you

Any other name that isnt a library should be fine

CodePudding user response:

think with me if you have app called math when python tries to import it what it will import your app or the math module in python the modules must have unique names

You Can name it profile_app

  • Related