How to check appname via Django commands?

810 views
Skip to first unread message

Sugita Shinsuke

unread,
Jan 17, 2015, 4:38:32 AM1/17/15
to django...@googlegroups.com
Hi there.

I use Django 1.6 version.

The database of Django store the information of application.
So, I know that if I  change the hierarchy of the Django project folders, some trouble occurs.
That is why, I'd like to check the name of my application.

I think some of Django commands  like manage.py command can check the application name in the database of Django project.
Or, if you know other Django command. Could you tell me it?

I would appreciate it if you would give me some advice.

Vijay Khemlani

unread,
Jan 17, 2015, 9:18:46 AM1/17/15
to django...@googlegroups.com
What problem are you having exactly?

Also I'm not sure what do you mean by "hierarchy" of the project folders, do you mean the order the apps appear in the INSTALLED_APPS setting?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4ea222eb-1fdd-44af-97c7-3f5bb05a13ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sugita Shinsuke

unread,
Jan 20, 2015, 6:33:38 AM1/20/15
to django...@googlegroups.com
Hello Vijay

Thank you for replying.

But, I want to know the project name of django not app name.


2015年1月17日土曜日 23時18分46秒 UTC+9 Vijay Khemlani:

Collin Anderson

unread,
Jan 22, 2015, 8:02:21 PM1/22/15
to django...@googlegroups.com
Hi,

I don't think the project name is stored in the database.

You can sometimes access the project name this way:

settings.SETTINGS_MODULE.split('.')[0]

Collin

Scot Hacker

unread,
Jan 23, 2015, 10:55:35 AM1/23/15
to django...@googlegroups.com


On Saturday, January 17, 2015 at 1:38:32 AM UTC-8, Sugita Shinsuke wrote:
Hi there.

I use Django 1.6 version.

The database of Django store the information of application.
So, I know that if I  change the hierarchy of the Django project folders, some trouble occurs.

The project name is contained in the manage.py file that's generated when you use `django-admin startproject` . If you change the project name you'll need to change it in manage.py as well.

./s

Reply all
Reply to author
Forward
0 new messages