Yes, i dont know if you will need the address of the entire project on on github Wilfred1213/Django_market_place: A website that allows people to sell and buy (github.com)
this is address to the project Jiji Clone (wilfred7.pythonanywhere.com)
this is my setting.py on my local system not on python anywhere as you requested
import os
from pathlib import Path
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/home/'
# LOGOUT_REDIRECT_URL = 'index/'
# Application definition
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'jijiapp',
'jijistore',
'crispy_forms',
'multiupload',
'crispy_bootstrap4',
# 'channels',
]
CRISPY_ALLOWED_TEMPLATE_PACKS = "bootstrap4"
CRISPY_TEMPLATE_PACK = 'bootstrap4'
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'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 = 'jijiclone.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
WSGI_APPLICATION = 'jijiclone.wsgi.application'
# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATICFILES_FINDERS = [
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
]
STATIC_URL = '/static/'
STATICFILES = [os.path.join(BASE_DIR, 'static/')]
STATIC_ROOT =os.path.join(BASE_DIR, 'staticfiles')
MEDIA_URL ='/media/'
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# email setup for gmail
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT =465
EMAIL_USE_SSL=True
EMAIL_USE_TLS = False
EMAIL_HOST_USER = 'mathiaswilfred7@gmail.com'
EMAIL_HOST_PASSWORD= 'kpvwrumwpoucrdft'
# EMAIL_HOST_PASSWORD=''
this is my local url.py root file as you requested
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from jijiapp.forms import LoginForm
from django.contrib.auth import views as auth_views
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('jijiapp.urls')),
path('store/', include('jijistore.urls')),
path('login/', auth_views.LoginView.as_view(template_name='jijiapp/registration/login.html', authentication_form=LoginForm), name='login'),
# path('accounts/', include('django.contrib.auth.urls')),
# path('inbox/', include('jijiapp.routing')),
path('accounts/password_reset/', auth_views.PasswordResetView.as_view(
template_name='jijiapp/registration/password_reset.html'), name='password_reset'),
path('accounts/password_reset/done/', auth_views.PasswordResetDoneView.as_view(
template_name='jijiapp/registration/password_reset_done.html'), name='password_reset_done'),
path('accounts/reset/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(
template_name='jijiapp/registration/password_reset_confirm.html'), name='password_reset_confirm'),
path('accounts/reset/done/', auth_views.PasswordResetCompleteView.as_view(
template_name='jijiapp/registration/password_reset_complete.html'), name='password_reset_complete'),
]
if settings.DEBUG:
urlpatterns +=static(settings.MEDIA_URL, document_root =settings.MEDIA_ROOT)