{"id":14972631,"url":"https://github.com/conorc470/django-ecommerce-project","last_synced_at":"2025-10-26T19:31:45.945Z","repository":{"id":42157612,"uuid":"112382741","full_name":"conorc470/django-ecommerce-project","owner":"conorc470","description":"ECommerce site built from scratch using the Django framework. ","archived":false,"fork":false,"pushed_at":"2022-12-26T20:15:32.000Z","size":1169,"stargazers_count":80,"open_issues_count":10,"forks_count":44,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-31T23:02:16.723Z","etag":null,"topics":["bootstrap","django","django-framework","ecommerce","heroku","python","sqlite-database","stripe"],"latest_commit_sha":null,"homepage":"https://conor-dev-summaries.herokuapp.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conorc470.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-28T19:59:57.000Z","updated_at":"2025-01-08T17:21:31.000Z","dependencies_parsed_at":"2023-01-31T01:15:17.864Z","dependency_job_id":null,"html_url":"https://github.com/conorc470/django-ecommerce-project","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorc470%2Fdjango-ecommerce-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorc470%2Fdjango-ecommerce-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorc470%2Fdjango-ecommerce-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conorc470%2Fdjango-ecommerce-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conorc470","download_url":"https://codeload.github.com/conorc470/django-ecommerce-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238394323,"owners_count":19464583,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","django","django-framework","ecommerce","heroku","python","sqlite-database","stripe"],"created_at":"2024-09-24T13:47:14.799Z","updated_at":"2025-10-26T19:31:40.327Z","avatar_url":"https://github.com/conorc470.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Non-Fiction Summaries\n**Ecommerce \u0026 Blog Web Application with User Authentication and Stripe Payments**\n\nThis Web App was built as a final project for the Code Institute's classroom bootcamp. \nIt is a Ecommerce site built with Python's *Django* framework - no template was used.\n\n## Live Demo\n\n**Follow this link to view deployed version of the web app https://conor-dev-summaries.herokuapp.com/**\n\n## Built with \n1. Django\n2. Python\n2. HTML\n3. CSS\n4. Bootstrap\n5. SQLite database\n\n## Deployment / Hosting\n\nThis Project was deployed and is hosted on Heroku with automatic deploys from GitHub\n\n## Databases / Static Files\n\nWhen running locally, SQLite database was used \u0026 static and media files were stored locally. \nWhen deploying, Heroku Postgres was used as the server database \u0026 an Amazon S3 bucket was set \nup to host all the static files. settings.py file was amended for the database \u0026 static files \nto point to the online resources.\n\n## Installation\n\nFollow the below instructions to clone this project for Mac (commands will be slightly different for Windows)\n\n1. Go to folder you want to put the cloned project in your terminal \u0026 type:\n    `$ git clone https://github.com/conorc470/django-ecommerce-project.git`\n2. Create \u0026 Activate a new Virtual Environment in terminal:\n    Create: `$ python3 -m venv ~/virtualenvs/name_of_environment`\n    Activate: `$ source ~/virtualenvs/name_of_environment/bin/activate`\n3. Install the project dependancies:\n    `$ pip install -r requirements.txt`\n4. Create env.sh file at the top level (this will contain all sensitive information)\n    **MAKE SURE IT IS IN THE .gitignore FILE**\n5. Copy the following into the env.sh file:\n```\n#!/bin/sh\n\nexport SECRET_KEY=''\nexport DEBUG='True'\n\nexport STRIPE_PUBLISHABLE_KEY=''\nexport STRIPE_SECRET_KEY=''\n```\n\n* A new SECRET_KEY can be generated [here](https://www.miniwebtool.com/django-secret-key-generator/)\n* Set up an account with Stripe [here](https://stripe.com/gb) \u0026 input STRIPE_PUBLISHABLE_KEY \u0026 STRIPE_SECRET_KEY \n\n6. Go to settings.py, change the following(lines 177-205):\n\n```\n# TO RUN LOCALLY HAVE THESE TWO UNCOMMENTED #\n\n# STATIC_URL = '/static/'\n# MEDIA_URL = '/media/'\n\n\n# TO RUN ON HEROKU HAVE THESE UNCOMMENTED #\n\nAWS_S3_OBJECT_PARAMETERS = {  # see http://developer.yahoo.com/performance/rules.html#expires\n        'Expires': 'Thu, 31 Dec 2099 20:00:00 GMT',\n        'CacheControl': 'max-age=94608000',\n    }\n\nAWS_STORAGE_BUCKET_NAME = os.environ.get('BUCKET_NAME')\nAWS_S3_REGION_NAME = 'eu-west-1'\nAWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')\nAWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')\n\nAWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME\n\nSTATICFILES_LOCATION = 'static'\nSTATICFILES_STORAGE = 'custom_storages.StaticStorage'\nSTATIC_URL = \"https://%s/%s/\" % (AWS_S3_CUSTOM_DOMAIN, STATICFILES_LOCATION)\n\nMEDIAFILES_LOCATION = 'media'\nDEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage'\nMEDIA_URL = \"https://%s/%s/\" % (AWS_S3_CUSTOM_DOMAIN, MEDIAFILES_LOCATION)\n\n```\n\nTo this:\n\n```\n# TO RUN LOCALLY HAVE THESE TWO UNCOMMENTED #\n\nSTATIC_URL = '/static/'\nMEDIA_URL = '/media/'\n\n\n# TO RUN ON HEROKU HAVE THESE UNCOMMENTED #\n\n# AWS_S3_OBJECT_PARAMETERS = {  # see http://developer.yahoo.com/performance/rules.html#expires\n#        'Expires': 'Thu, 31 Dec 2099 20:00:00 GMT',\n#        'CacheControl': 'max-age=94608000',\n#    }\n#\n# AWS_STORAGE_BUCKET_NAME = os.environ.get('BUCKET_NAME')\n# AWS_S3_REGION_NAME = 'eu-west-1'\n# AWS_ACCESS_KEY_ID = os.environ.get('AWS_ACCESS_KEY_ID')\n# AWS_SECRET_ACCESS_KEY = os.environ.get('AWS_SECRET_ACCESS_KEY')\n# \n# AWS_S3_CUSTOM_DOMAIN = '%s.s3.amazonaws.com' % AWS_STORAGE_BUCKET_NAME\n#\n# STATICFILES_LOCATION = 'static'\n# STATICFILES_STORAGE = 'custom_storages.StaticStorage'\n# STATIC_URL = \"https://%s/%s/\" % (AWS_S3_CUSTOM_DOMAIN, STATICFILES_LOCATION)\n#\n# MEDIAFILES_LOCATION = 'media'\n# DEFAULT_FILE_STORAGE = 'custom_storages.MediaStorage'\n# MEDIA_URL = \"https://%s/%s/\" % (AWS_S3_CUSTOM_DOMAIN, MEDIAFILES_LOCATION)\n\n```\n\n7. Also in settings.py change the following:\n```\n# DATABASES = {\n#     'default': {\n#         'ENGINE': 'django.db.backends.sqlite3',\n#         'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n#     }\n# }\n\nDATABASES = {'default': dj_database_url.parse(os.environ.get('DATABASE_URL')) }\n```\n\nTo this:\n```\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.sqlite3',\n        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),\n    }\n}\n\n# DATABASES = {'default': dj_database_url.parse(os.environ.get('DATABASE_URL')) }\n```\n8. In the terminal:\n    `$ python manage.py migrate` - this will apply migrations to your local sqlite database\n    `$ python manage.py createsuperuser` - this will create admin support\n    `$ python manage.py runserver` - should say starting development server..\n9. Go to your browser \u0026 type '127.0.0.1:8000' in the address bar\n10. The App should run on your browser - note that there will be no products/blog posts as you are running off your own blank database\n11. Log in to the admin panel by going to '127.0.0.1:8000/admin' \u0026 log in using the credentials you created for the superuser\n12. You can add products from here\n\n## Running the tests\n\nAutomated tests can be viewed in the tests.py file within the separate Apps. \nTo run the tests, in your terminal navigate to the folder with your project in, activate your virtual environment and type:\n\n`$ python manage.py test \u003capp name\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorc470%2Fdjango-ecommerce-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconorc470%2Fdjango-ecommerce-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconorc470%2Fdjango-ecommerce-project/lists"}