Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:21:49+00:00 2026-06-05T21:21:49+00:00

I just deployed my first django app to the Heroku platform. I basically followed

  • 0

I just deployed my first django app to the Heroku platform. I basically followed this tutorial, just that instead of creating a dummy django-admin.py startproject hellodjango . django app, I used my app that currently works on my Windows PC. When deploying the app and running the server on heroku I get a No module named theme.urls.

Here is the traceback. Any ideas?

Environment:


Request Method: GET
Request URL: http://severe-winter-1546.herokuapp.com/

Django Version: 1.4
Python Version: 2.7.2
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'themes',
 'haystack')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  101.                             request.path_info)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/urlresolvers.py" in resolve
  298.             for pattern in self.url_patterns:
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/urlresolvers.py" in url_patterns
  328.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/core/urlresolvers.py" in urlconf_module
  323.             self._urlconf_module = import_module(self.urlconf_name)
File "/app/.heroku/venv/lib/python2.7/site-packages/django/utils/importlib.py" in import_module
  35.     __import__(name)

Exception Type: ImportError at /
Exception Value: No module named theme.urls

And my settings.py

# Django settings for theme project.
import os
import dj_database_url
ROOT_PATH = os.path.dirname(__file__)
DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@example.com'),
)

MANAGERS = ADMINS

DATABASES = {'default': dj_database_url.config(default='postgres://localhost')}

LANGUAGE_CODE = 'en-us'

SITE_ID = 1


USE_I18N = True


USE_L10N = True


MEDIA_ROOT = os.path.join(ROOT_PATH, 'files')


MEDIA_URL = 'http://127.0.0.1:8000/files/'


STATIC_ROOT = ''


STATIC_URL = '/static/'


ADMIN_MEDIA_PREFIX = '/static/admin/'


STATICFILES_DIRS = (
)


STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
#     'django.template.loaders.eggs.Loader',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
)

ROOT_URLCONF = 'theme.urls'

TEMPLATE_DIRS = (
'C:/Users/leonsas/Desktop/dj/theme/templates',
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    #'registration',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    # Uncomment the next line to enable admin documentation:
    'django.contrib.admindocs',
    'themes',
    'haystack',

)
#required for haystack. Using Whoosh
HAYSTACK_WHOOSH_PATH = 'C:/Users/leonsas/Desktop/dj/theme/files/Whoosh/index'
HAYSTACK_SEARCH_ENGINE = 'whoosh'
HAYSTACK_SITECONF = 'theme.search_sites'



LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'mail_admins': {
            'level': 'ERROR',
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:21:50+00:00Added an answer on June 5, 2026 at 9:21 pm

    So I found that the error was that heroku created the app in a folder named ‘app’ instead of ‘theme’. I tried renaming the app via the heroku CLI using

    heroku apps:rename theme
    

    but for some reason I cant figure out still, it gave a You do not have access to appname error. So instead I just went and changed every part of my code that had theme.foo to app.foo. And it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just deployed my Rails app to Heroku, but the Javascripts that were using
So I just got my first django app deployed. I did a syncdb and
I've just deployed my first app FTheme.com that works smooth on dev server but
I just delayed my first Django app via Heroku and I'm having an issue
I just deployed my app to my iPhone for the first time. Every time
I've just deployed my first app to production. It's a simple front end for
I've just migrated and deployed my first Azure Web Role this week and now
I just deployed a Silverlight app. It's an authenticated app (i.e. only logged-in users
I'm currently debugging an ASP.NET MVC application that was just deployed to a different
I've got a ClickOnce application deployed that many machines can install just fine -

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.