Here is settings.py
""" Django settings for MyDjangoApp project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '1xcp91qi*estwvv$0_z@=9z+w98evzcdk*!psi@-pha_4&j5v_' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'polls', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'MyDjangoApp.urls' WSGI_APPLICATION = 'MyDjangoApp.wsgi.application' # Database # https://docs.djangoproject.com/en/1.6/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.6/howto/static-files/ STATIC_URL = '/static/' On Wednesday, February 12, 2014 1:21:53 PM UTC-6, Lucas Klassmann wrote: > > Hi Sean! > > You has added *polls* inside of *INSTALLED_APPS* in the *settings.py*? > > You can show me other source files? > > Greetings > > > On Wed, Feb 12, 2014 at 5:13 PM, Sean Luke <192.se...@gmail.com<javascript:> > > wrote: > >> Here is the screenshot of my file structure and admin.py >> >> >> On Wednesday, February 12, 2014 1:05:28 PM UTC-6, Sean Luke wrote: >> >>> I have just installed pycharm and django. And i followed the pycharm >>> tutorial for creating your first app (http://www.jetbrains.com/ >>> pycharm/quickstart/django_guide.html). But now when I run the app I >>> get this error in my browser. >>> >>> Page not found (404) Request Method: GET Request URL: >>> http://127.0.0.1:8000/ >>> >>> Using the URLconf defined in MyDjangoApp.urls, Django tried these URL >>> patterns, in this order: >>> >>> 1. ^polls/$ >>> 2. ^admin/ >>> >>> The current URL, , didn't match any of these. >>> >>> >>> My url.py file looks like this: >>> from django.conf.urls import patterns, include, url >>> >>> from django.contrib import admin >>> admin.autodiscover() >>> >>> >>> urlpatterns = patterns('', >>> >>> # url(r'^$', 'MyDjangoApp.views.home', name='home'), >>> # url(r'^blog/', include('blog.urls')), >>> >>> (r'^polls/$', 'MyDjangoApp.polls.views.index'), >>> # (r'^polls/(?P<poll_id>\d+)/$', 'MyDjangoApp.polls.views.detail'), >>> # (r'^polls/(?P<poll_id>\d+)/results/$', 'MyDjangoApp.polls.views. >>> results'), >>> # (r'^polls/(?P<poll_id>\d+)/vote/$', 'MyDjangoApp.polls.views.vote' >>> ), >>> (r'^admin/', include(admin.site.urls)), >>> >>> #url(r'^admin/', include(admin.site.urls)), >>> ) >>> >>> When I comment the (r^polls/$,'MyDangoApp.vie...............) line it >>> works fine. With it uncommented it doesn't work and if I try entering >>> /admin at the end of the url i get this error: >>> >>> ImportError at /admin/ >>> >>> No module named polls >>> >>> Request Method: GET Request URL: http://127.0.0.1:8000/admin/ Django >>> Version: 1.6.2 Exception Type: ImportError Exception Value: >>> >>> No module named polls >>> >>> Exception Location: C:\Users\Sean\my_venv\lib\ >>> site-packages\django\utils\importlib.py in import_module, line 40 Python >>> Executable: C:\Users\Sean\my_venv\Scripts\python.exe Python Version: >>> 2.7.3 Python Path: >>> >>> ['C:\\Users\\Sean\\PycharmProjects\\MyDjangoApp', >>> 'C:\\Users\\Sean\\PycharmProjects\\MyDjangoApp', >>> 'C:\\SimpleCV1.3\\files\\opencv\\build\\python\\2.7', >>> 'C:\\OpenCV2.3\\opencv\\build\\python\\2.7', >>> 'C:\\WINDOWS\\SYSTEM32\\python27.zip', >>> 'C:\\Users\\Sean\\my_venv\\DLLs', >>> 'C:\\Users\\Sean\\my_venv\\lib', >>> 'C:\\Users\\Sean\\my_venv\\lib\\plat-win', >>> 'C:\\Users\\Sean\\my_venv\\lib\\lib-tk', >>> 'C:\\Users\\Sean\\my_venv\\Scripts', >>> 'C:\\Python27\\Lib', >>> 'C:\\Python27\\DLLs', >>> 'C:\\Python27\\Lib\\lib-tk', >>> 'C:\\Users\\Sean\\my_venv', >>> 'C:\\Users\\Sean\\my_venv\\lib\\site-packages'] >>> >>> Server time: Wed, 12 Feb 2014 13:01:55 -0600 >>> >>> My file structure and my admin.py file looks like this: >>> ... >> >> -- >> 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 <javascript:>. >> To post to this group, send email to django...@googlegroups.com<javascript:> >> . >> 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/473b0681-4625-4f5d-8bf4-17b7eee1953c%40googlegroups.com >> . >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Lucas Klassmann > Desenvolvedor de Software > > Email: lucaskl...@gmail.com <javascript:> > Web site: http://www.lucasklassmann.com > -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@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/62cfd8b0-409f-4fd7-9db4-473a63304363%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.