{"id":16417345,"url":"https://github.com/dotja/django-example","last_synced_at":"2025-10-26T20:30:25.399Z","repository":{"id":135951209,"uuid":"564812430","full_name":"dotja/django-example","owner":"dotja","description":"Django project with various example apps.","archived":false,"fork":false,"pushed_at":"2023-03-28T11:12:06.000Z","size":22,"stargazers_count":41,"open_issues_count":1,"forks_count":11,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-11T07:11:49.524Z","etag":null,"topics":["celery","custom-user-model","django","photo-editing","stripe-payments"],"latest_commit_sha":null,"homepage":"","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/dotja.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":"2022-11-11T14:58:07.000Z","updated_at":"2024-09-29T19:08:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4e351f1-a556-4e37-b826-59c32d81d9e4","html_url":"https://github.com/dotja/django-example","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/dotja%2Fdjango-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotja%2Fdjango-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotja%2Fdjango-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotja%2Fdjango-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotja","download_url":"https://codeload.github.com/dotja/django-example/tar.gz/refs/heads/main","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":["celery","custom-user-model","django","photo-editing","stripe-payments"],"created_at":"2024-10-11T07:11:27.292Z","updated_at":"2025-10-26T20:30:25.022Z","avatar_url":"https://github.com/dotja.png","language":"Python","readme":"# Django examples\n\nA Django project with example apps.\n\nThis repo will be updated when new apps are added to it.\n\nThe current list of apps include:\n\n1. app_users\nAn app to demonstrate using a custom user model in Django.\n\n2. user_payment\nAn app to receive user payments through Stripe.\n\n3. edit_photo\nAn app that converts JPEG images into sketch using Celery.\n\n4. flashcards\nAn app that uses MongoDB to store flashcards.\n\n\n## Running this project\n\n* start by installing the requirements:\n\n```\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n* the following environment variables need to be exported prior to use:\n\n```\nexport SECRET_KEY='your django secret key'\n\nexport STRIPE_PUBLIC_KEY_TEST='pk_test_12345...'\nexport STRIPE_SECRET_KEY_TEST='sk_test_12345...'\nexport STRIPE_WEBHOOK_SECRET_TEST='whsec_12345..'\nexport PRODUCT_PRICE='price_12345...'\n\nexport MONGO_USER='user'\nexport MONGO_PASSWORD='password'\nexport MONGO_HOST='0.0.0.0'\nexport MONGO_DB='flashcard_db'\nexport MONGO_COLLECTION='cards'\n```\n\n* to run the photo editing app you need to have rabbitmq and a Celery worker running as follows:\n\n```\n## run the rabbitmq docker container\ndocker run -d -p 5672:5672 rabbitmq\n\n## start the Celery worker\ncd django-example\ncelery -A django_examples worker --loglevel=INFO\n```\n\n* to run the flashcards app you need to have a mongodb container running:\n\n```\ndocker run --rm -d -p 27017:27017 --name mongodb -v 001_initial.js:/docker-entrypoint-initdb.d/001_initial.js:ro -v mongodb:/data/db -e MONGO_INITDB_DATABASE=flashcard_db mongo --auth\n```\n\n* after that you can run the following:\n\n```\npython manage.py makemigrations\npython manage.py migrate\npython manage.py runserver\n```","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotja%2Fdjango-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotja%2Fdjango-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotja%2Fdjango-example/lists"}