I wanted to include an e-commerce portal on my site, and I did everything that is listed on the "Create your own store" page, as indicated in the Django-Oscar documentation, only in urls.py instead
url(r'', include(application.urls)),
I added
url(r'^buy/', include(application.urls)),
but the problem is that when I click on the url it shows nothing and gives no error.
Any idea what could be the problem?
Maybe some URLs collide or something else is trivial, but I can't figure out where to start debugging.
Urls.py file
from django.conf.urls import patterns, include, url from django.contrib import admin from view import AboutusView, TwentySevenView import apps.users.views from django.conf import settings
Settings.py file
import os import sys from oscar import get_core_apps from oscar import OSCAR_MAIN_TEMPLATE_DIR from oscar.defaults import * BASE_DIR = os.path.dirname(os.path.dirname(__file__)) location = lambda x: os.path.join( os.path.dirname(os.path.realpath(__file__)), x) # sys.path.insert(0, os.path.join(BASE_DIR, 'apps')) # to store apps in apps/ directory # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.flatpages', 'apps.users', 'apps.doorstep', 'apps.cars', 'django_markdown', 'social.apps.django_app.default', 'django.contrib.sites', 'django_comments', 'mptt', 'tagging', 'zinnia', 'compressor', ] + get_core_apps() # specifying the comments app # COMMENTS_APP = 'zinnia_threaded_comments' MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'oscar.apps.basket.middleware.BasketMiddleware', 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware', ) # Authentication backend used by python-social-auth AUTHENTICATION_BACKENDS = ( 'social.backends.facebook.FacebookOAuth2', 'social.backends.google.GoogleOAuth2', 'django.contrib.auth.backends.ModelBackend', 'oscar.apps.customer.auth_backends.EmailBackend', ) TEMPLATE_CONTEXT_PROCESSORS = ( "social.apps.django_app.context_processors.backends", "social.apps.django_app.context_processors.login_redirect", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", "django.core.context_processors.i18n", "django.core.context_processors.request", "zinnia.context_processors.version", "django.core.context_processors.debug", "django.core.context_processors.media", "django.core.context_processors.static", "django.core.context_processors.tz", 'oscar.apps.search.context_processors.search_form', 'oscar.apps.promotions.context_processors.promotions', 'oscar.apps.checkout.context_processors.checkout', 'oscar.apps.customer.notifications.context_processors.notifications', 'oscar.core.context_processors.metadata' ) # TEMPLATE_LOADERS = ( # 'app_namespace.Loader', # ) ROOT_URLCONF = 'torquehp.urls' WSGI_APPLICATION = 'torquehp.wsgi.application' # Database # https://docs.djangoproject.com/en/1.7/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': "", 'USER': '', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306' } } # Internationalization LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True LOGIN_URL = '/users/login/' # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/1.7/howto/static-files/ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, '/static/') MEDIA_ROOT = os.path.join(BASE_DIR, 'media/') MEDIA_URL = "/media/" TEMPLATE_DIRS = ( os.path.join(BASE_DIR, 'templates').replace('\\', '/'), location('templates'), OSCAR_MAIN_TEMPLATE_DIR, ) STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'staticfiles'), ) REGISTRATION_INVALID = 50 MESSAGE_TAGS = { REGISTRATION_INVALID: 'InvalidDetails', } # temporary , should not be in settings file SOCIAL_AUTH_FACEBOOK_KEY = "" SOCIAL_AUTH_FACEBOOK_SECRET = "" SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = "" SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = "" LOGIN_REDIRECT_URL = '/blog/' # ------------------------------------ # # Settings for sending email # EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_PORT = 587 EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' DEFAULT_FROM_EMAIL = EMAIL_HOST_USER SERVER_EMAIL = EMAIL_HOST_USER EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' # ------------------------------------ # # site id for django sites framework SITE_ID = 1 # configuration settings for django-zinnia ZINNIA_PING_EXTERNAL_URLS = False ZINNIA_SAVE_PING_DIRECTORIES = False ZINNIA_MARKUP_LANGUAGE = 'markdown' ZINNIA_UPLOAD_TO = 'uploads/zinnia/' # TimeZone Settings USE_TZ = True # ------------------------ # # django s=oscar search settings HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.simple_backend.SimpleEngine', }, }
Screenshots:
http: // localhost: 8000 / buy / 
http: // localhost: 8000 / buy / catalogue /
