Python Manage.py Sql Error No Module Named
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business django makemigrations importerror no module named Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation django no module named app Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just django installed apps no module named like you, helping each other. Join them; it only takes a minute: Sign up Help with “Error: No module named polls” from the Django Project Tutorial 1 up vote 3 down vote favorite I am working on this
Django Error No Module Named
Django tutorial and am getting this error: "Error: No module named polls" when I type "python manage.py sql polls" in the terminal. I have no clue how to fix this problem. Any help would be greatly appreciated. django share|improve this question asked Jul 2 '11 at 1:11 AKatz 1612 Have you add "polls", in INSTALLED_APPS in your settings.py? –Davor Lucic Jul 2 '11 at 10:48 add a comment| 7 Answers 7 active oldest importerror: no module named 'polls.apps.pollsconfigdjango'; 'polls.apps' is not a package votes up vote 10 down vote There is an error in the documentation. Type polls instead of mysite.polls. share|improve this answer edited May 20 '13 at 22:10 Sam Rad 7,46352241 answered Apr 8 '12 at 0:49 tsil 90051533 add a comment| up vote 10 down vote INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', # Uncomment the next line to enable the admin: # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', 'polls' # THIS IS THE ANSWER ) share|improve this answer answered Jul 25 '13 at 13:43 natttoku 10112 1 why is this the answer? –awongh Jan 24 at 12:35 Works for me for Django 1.8.14 and Python 3.5.2 –LC Yoong Sep 5 at 10:00 add a comment| up vote 3 down vote Ismael's answer worked for me. Originally had urlpatterns = patterns('', (r'^polls/$ ,'mysite.polls.views.index'), ) Changed to urlpatterns = patterns('', (r'^polls/$ ,'polls.views.index'), ) share|improve this answer answered May 5 '12 at 14:12 user1376892 311 New to community. Couldn't vote up his answer due to lack of reputation. –user1376892 May 5 '12 at 14:12 add a comment| up vote 1 down vote If you have added polls app inside the setting.py please remove that and try recreating the polls and then add to the setting.py file. This solved my issue :) INS
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and django no module named settings policies of this site About Us Learn more about Stack Overflow the
No Module Named Mysite Settings
company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Django No Module Named Urls
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only http://stackoverflow.com/questions/6554528/help-with-error-no-module-named-polls-from-the-django-project-tutorial-1 takes a minute: Sign up Getting stuck at Django error: No module named registration up vote 10 down vote favorite 5 I installed the registration module, added it to settings.py. When I tried to run syncdb (% python sitename/manage.py syncdb --settings sitename.devsettings) It gave me "Error: No module named registration" The same setup works (using the same files for everything) fine http://stackoverflow.com/questions/965755/getting-stuck-at-django-error-no-module-named-registration on the server. This happens on my local machine running OS X. I checked the sys.path, the path where registration module resides is listed, and the actual module is in place as well. Since there is not much else being outputted, I am not sure how to debug further. What could be causing this problem? django share|improve this question asked Jun 8 '09 at 16:25 Boon 13.1k29112195 add a comment| 13 Answers 13 active oldest votes up vote 6 down vote accepted There may be Python errors in your registration models. Try starting a shell and importing them, instantiating them, etc. share|improve this answer answered Jun 8 '09 at 17:03 John G 2,7151512 add a comment| up vote 16 down vote Since this page ranks nicely in Google, it seems like a good place for a general answer that might help. Sometimes the folder name in svn/git is different than the folder name in settings.py -- a trap for the unwary. So, if INSTALLED_APPS references your stuff as mywhatever.someapp then it is likely you want settings.py to be in
creation of a basic poll application. It'll consist of two parts: A public site that lets people view polls and vote in them. An admin site that lets you add, change, and delete polls. We'll assume you http://django.readthedocs.io/en/latest/intro/tutorial01.html have Django installed already. You can tell Django is installed and which version by running the following command: $ python -m django --version If Django is installed, you should see the version of your installation. If it isn't, you'll get an error telling "No module named django". This tutorial is written for Django 1.11 and Python 3.4 or later. If the Django version doesn't match, you can refer to the tutorial for your version no module of Django by using the version switcher at the bottom right corner of this page, or update Django to the newest version. If you are still using Python 2.7, you will need to adjust the code samples slightly, as described in comments. See How to install Django for advice on how to remove older versions of Django and install a newer one. Where to get help: If you're having trouble going through this tutorial, no module named please post a message to django-users or drop by #django on irc.freenode.net to chat with other Django users who might be able to help. Creating a project¶ If this is your first time using Django, you'll have to take care of some initial setup. Namely, you'll need to auto-generate some code that establishes a Django project - a collection of settings for an instance of Django, including database configuration, Django-specific options and application-specific settings. From the command line, cd into a directory where you'd like to store your code, then run the following command: $ django-admin startproject mysite This will create a mysite directory in your current directory. If it didn't work, see Problems running django-admin. Note You'll need to avoid naming projects after built-in Python or Django components. In particular, this means you should avoid using names like django (which will conflict with Django itself) or test (which conflicts with a built-in Python package). Where should this code live? If your background is in plain old PHP (with no use of modern frameworks), you're probably used to putting code under the Web server's document root (in a place such as /var/www). With Django, you don't do that. It's not a good idea to put any of this Python code within your Web server's document root