{"id":19681412,"url":"https://github.com/mejia-dev/ice_cream_shop","last_synced_at":"2026-04-16T18:04:30.256Z","repository":{"id":229038071,"uuid":"775599200","full_name":"mejia-dev/ice_cream_shop","owner":"mejia-dev","description":"Django/MySQL storefront for an ice cream shop","archived":false,"fork":false,"pushed_at":"2024-03-25T18:12:30.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T16:55:16.260Z","etag":null,"topics":["admin","django","many-to-many","mysql","python","webserver"],"latest_commit_sha":null,"homepage":"https://mejiadev.pythonanywhere.com/shop/","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/mejia-dev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-21T17:27:43.000Z","updated_at":"2024-03-25T18:15:12.000Z","dependencies_parsed_at":"2024-03-24T20:24:18.915Z","dependency_job_id":"de66c25c-081a-45ea-a2c7-51c078c76b46","html_url":"https://github.com/mejia-dev/ice_cream_shop","commit_stats":null,"previous_names":["mejia-dev/ice_cream_shop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mejia-dev/ice_cream_shop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mejia-dev%2Fice_cream_shop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mejia-dev%2Fice_cream_shop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mejia-dev%2Fice_cream_shop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mejia-dev%2Fice_cream_shop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mejia-dev","download_url":"https://codeload.github.com/mejia-dev/ice_cream_shop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mejia-dev%2Fice_cream_shop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269734150,"owners_count":24466554,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["admin","django","many-to-many","mysql","python","webserver"],"created_at":"2024-11-11T18:07:47.054Z","updated_at":"2026-04-16T18:04:30.221Z","avatar_url":"https://github.com/mejia-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django's Ice Cream Shop\n This is a Django-powered inventory tracking application for an ice cream shop. Users can navigate to `/shop` to check out what the store has to offer. Admins can use the `/admin` page to add and remove treats in different flavors. \n\n Created by: [github.com/mejia-dev](https://github.com/mejia-dev)\n\n# Features:\n* Treats and Flavors have a many-to-many relationship; one treat can have multiple flavors, and one flavor can have multiple treats.\n* Django admin system is utilized for ease of administration.\n* Shop pages are extensions of a base template for ease of making global changes.\n\n## 1 - Setup/Installation Prerequisite Requirements\nThis section will cover how to install MySQL Community Server which is **required**. If this application is already installed and running at version 8.0 or above, proceed to the section [Project Setup Requirements](#2---project-setup-requirements) section below.\n\n#### MacOS Instructions:\n\n##### MacOS Step 1: Download the MySQL Community Server Installer\n* Start by downloading the MySQL Community Server .dmg file from the MySQL Community Server page:\n\n  For [Catalina and above, AND an M2 chip](https://dev.mysql.com/downloads/file/?id=518602)\n\n  For [Catalina and above, AND an M1 chip](https://dev.mysql.com/downloads/file/?id=508094)\n\n  For [Catalina and above, AND an Intel chip](https://dev.mysql.com/downloads/file/?id=508095)\n\n  For [High Sierra or Mojave](https://dev.mysql.com/downloads/file/?id=484914)\n\n\n##### MacOS Step 2: Install MySQL Community Server\n* Launch the installer. Accept all prompts until reaching the Configuration page. Upon reaching Configuration, select or set the following options (use default if not specified):\n\n  * Use Legacy Password Encryption.\n  * Set the password. This password will become necessary later for project setup.\n  * Select \"Finish\".\n\n\n##### MacOS Step 3: Configure Environment Variables\n* Open the terminal to set environment variables using either of the following commands. When finished, close all terminal windows.\n\n  * For bash users:\n    ```bash\n    echo 'export PATH=\"/usr/local/mysql/bin:$PATH\"' \u003e\u003e ~/.bash_profile\n    ```\n\n  * For zsh users:\n    ```bash\n    echo 'export PATH=\"/usr/local/mysql/bin:$PATH\"' \u003e\u003e ~/.zshrc\n    ```\n\n\n##### MacOS Step 4: Test Installation (MySQL Community Server)\n* From a new terminal window, attempt to login to mysql to confirm it is configured properly.\n  Substitute \"YOUR_PASSWORD_HERE\" for the password that was set during installation.\n\n  ```bash\n  mysql -uroot -pYOUR_PASSWORD_HERE\n  ```\n  There will be an intro message, and the prompt should change to: `mysql\u003e `. This confirms that mysql is installed and everything is working as expected.\n  If the terminal instead displays the `mysql: command not found` error, attempt to uninstall any versions of the applications that are previously installed, then follow this installation guide again.\n\n\n#### Windows 10/11 Instructions:\n\n##### Windows Step 1: Download the MySQL Web Installer\n* Download the MySQL Web Installer from the [MySQL Downloads](https://downloads.mysql.com/archives/get/p/25/file/mysql-installer-web-community-8.0.19.0.msi) page. \n\n\n##### Windows Step 2: Install the MySQL Web Programs\n* Follow along with the installer as described below. If a step is not specifically listed, accept the defaults.\n\n  * Select \"Yes\" if prompted to update.\n  * Accept license terms.\n  * Choose \"Custom\" setup type.\n  * In the \"Select Products and Features\" menu, choose the following:\n    * Check the box titled \"Enable the Select Features page to customize product features\".\n    * Under *MySQL Servers \u003e MySQL Server \u003e MySQL Server 8.0*, select \"MySQL Server 8.0.19\" (or latest available version).\n    * Under *Applications \u003e MySQL Workbench \u003e MySQL Workbench 8.0*, select \"MySQL Workbench 8.0.19\" (or latest available version).\n  * Select \"Next\", then \"Execute\". Wait for download and installation. This can take some time.\n  * Continue through the following Configuration steps:\n    * Set \"High Availability\" to \"Standalone\".\n    * Set \"Type and Networking\" to \"Defaults are OK\".\n    * Set \"Authentication Method\" to \"Use Legacy Authentication Method\".\n    * Set the password. This password will become necessary later for project setup.\n    * Set \"Windows Service\" to \"Defaults are OK\". Ensure that the following options are selected:\n      * \"Configure MySQL Server as a Windows Service\".\n      * \"Start the MySQL Server at System Startup\".\n      * \"Run Windows Service\" should be set to \"Standard System Account\".\n  * Complete the installation as prompted.\n\n\n##### Windows Step 3: Configure Environment Variables\n* The terminal (CLI, PowerShell, and GitBash) now need to be configured to recognize the mysql command. This can be done through changing the environment variables.\n\n  * Press the **Windows** key and **R** key simultaneously to bring up the Run prompt. \n  * In the run prompt, type in `sysdm.cpl`, then press Enter.\n  * In the System Properties window that appears, navigate to the \"Advanced\" tab, then select \"Environment Variables...\".\n    * In the Environment Variables window, under the \"System Variables\" section, double-click on the \"Path\" variable to launch the editing window.\n      * In the editing window, select the \"New\" button in the top right, then enter the installation path of the MySQL Server. \n      For most installations, this should be `C:\\Program Files\\MySQL\\MySQL Server 8.0\\bin`, but may vary depending on the version installed.\n      * When finished, select \"OK\".\n    * Select \"OK\".\n  * Select \"Apply\", then select \"OK\".\n\n\n##### Windows Step 4: Test Installation (MySQL Community Server)\n* Finally, from a new PowerShell window, attempt to login to mysql to confirm it is configured properly.\n  Substitute \"YOUR_PASSWORD_HERE\" for the password set during installation.\n\n  ```powershell\n  mysql -uroot -pYOUR_PASSWORD_HERE.\n  ```\n\n  There will be an intro message, and the prompt should change to: `mysql\u003e `. This confirms that mysql is installed and everything is working as expected.\n  If the terminal instead displays a `The term 'mysql' is not recognized as the name of a cmdlet, function, script file, or operable program` error, double-check that the environment variables were set up correctly. If all else fails, attempt to uninstall any versions of the applications that are previously installed, then follow this installation guide again.\n\n\n\n## 2 - Project Setup Requirements\n\n#### Step 1: Clone Repo\n* Clone this repository by running the following command from in the Git Bash terminal:\n  ```bash\n   git clone https://github.com/mejia-dev/ice_cream_shop.git\n   ```\n\n#### Step 2: .env Setup\n* This project requires a file titled `.env` residing in the project directory (not the root directory).\n  * Navigate to the project directory:\n    ```bash\n    cd ice_cream_shop/icecreamshop\n    ```\n  * Create the file:\n    ```bash\n    touch .env\n    ```\n  * Using any text editor, modify the file to include the following lines. Replace any of the values with the necessary values for the database environment being used. **Please note:** Django is unable to create a MySQL database. This must be done manually in order for Django to use it:\n    ```javascript\n    DBCONFIG_NAME = \"django-icecreamshop\"\n    DBCONFIG_USER = \"YOUR_USERNAME_HERE\"\n    DBCONFIG_PASSWORD = \"YOUR_PASSWORD_HERE\"\n    DBCONFIG_HOST = \"localhost\"\n    DBCONFIG_PORT = \"3306\"\n    ```\n  * Create a new secret key using:\n      ```python\n      from django.core.management.utils import get_random_secret_key\n      print(get_random_secret_key())\n      ```\n  * Save the key in `.env`.\n  * In `settings.py`, change `DEBUG` to False and set `SECRET_KEY = os.getenv(\"SECRET_KEY\")`.\n\n\n\n## 3 - Run the Project\n\n* Create a virtual environment for the project. This can be named anything (though `venv` is common) and can be stored anywhere (storing it in the `ice_cream_shop` directory is acceptable, but make sure it is excepted in the gitignore if pushing changes to GitHub). For more information on virtual environments, refer to the [official Python documentation](https://docs.python.org/3/tutorial/venv.html). \n  ```bash\n  cd ice_cream_shop\n  python -m venv venv\n  ```\n\n* Activate the virtual environment in the terminal:\n\n  * Windows:\n    ```cmd\n    venv\\Scripts\\activate\n    ```\n  * Unix / MacOS:\n    ```cmd\n    source venv/bin/activate\n    ```\n\n* Install the requirements from the ice_cream_shop root directory:\n  ```bash\n  pip install -r requirements.txt\n  ```\n\n* Create the database:\n  ```bash\n  ./manage.py migrate\n  ```\n\n* Create a Django admin account. A prompt will appear for a username, email address, and password.\n  ```bash\n  manage.py createsuperuser\n  ```\n\n* Run the Django development server:\n  ```bash\n  ./manage.py runserver\n  ```\n\n* View the project in a browser by navigating to http://127.0.0.1:8000/shop (for the Shop page) or http://127.0.0.1:8000/admin (for the Admin page).\n  ```bash\n  dotnet run\n  ```\n\n\n## Known Bugs\n\n* none\n\nIf a bug has been discovered, please add it to the [Issues tracker](https://github.com/mejia-dev/ice_cream_shop/issues).\n\n\n## License\n\nMIT License\n\nCopyright (c) 2023 github.com/mejia-dev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmejia-dev%2Fice_cream_shop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmejia-dev%2Fice_cream_shop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmejia-dev%2Fice_cream_shop/lists"}