{"id":23272646,"url":"https://github.com/toweringcloud/airbnb-clone-django","last_synced_at":"2025-04-06T09:53:46.906Z","repository":{"id":265919821,"uuid":"859122795","full_name":"toweringcloud/airbnb-clone-django","owner":"toweringcloud","description":"airbnb backend clone with python v3.12 + django v5.1","archived":false,"fork":false,"pushed_at":"2025-01-17T15:26:43.000Z","size":148,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T15:43:55.599Z","etag":null,"topics":["django","postgresql","render","sentry"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toweringcloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-09-18T06:01:59.000Z","updated_at":"2025-01-17T15:26:44.000Z","dependencies_parsed_at":"2024-12-01T15:20:23.339Z","dependency_job_id":"1beaddba-aedc-46b2-a543-97e6eb674dcc","html_url":"https://github.com/toweringcloud/airbnb-clone-django","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"72886a2cb760080aed8f0e4dee54cdbbbc0843e7"},"previous_names":["toweringcloud/airbnb-clone-django"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toweringcloud%2Fairbnb-clone-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toweringcloud%2Fairbnb-clone-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toweringcloud%2Fairbnb-clone-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toweringcloud%2Fairbnb-clone-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toweringcloud","download_url":"https://codeload.github.com/toweringcloud/airbnb-clone-django/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463934,"owners_count":20942951,"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":["django","postgresql","render","sentry"],"created_at":"2024-12-19T19:18:13.354Z","updated_at":"2025-04-06T09:53:46.885Z","avatar_url":"https://github.com/toweringcloud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# airbnb-clone-django\r\ndjango restframework v5 based backend service with python v3.12\r\n\r\n\r\n## how to run\r\n\r\n### setup\r\n\r\n- install python 3.10 ~ 3.12 LTS and add system path on python \u0026 pip\r\n\r\n```sh\r\n$ python --version\r\nPython 3.12.7 (or 3.10.11 or 3.11.9 or 3.12.8)\r\n\r\n$ pip --version\r\npip 24.2 from /usr/lib/python3/dist-packages/pip (python 3.12)\r\n\r\n$ pip install poetry==1.8.5\r\n$ poetry --version\r\nPoetry (version 1.8.5)\r\n```\r\n\r\n### configure\r\n\r\n- setup poetry virtual environment\r\n\r\n```sh\r\n$ poetry init\r\n$ poetry shell\r\n$ poetry install\r\n$ poetry show\r\n$ poetry env info\r\n$ exit\r\n```\r\n\r\n- set runtime configuration\r\n\r\n```sh\r\n$ cat .env\r\nSECRET_KEY=\"...\"\r\n```\r\n\r\n- create superuser account\r\n\r\n```sh\r\n$ ./manage.py createsuperuser \r\n...\r\nSuperuser created successfully.\r\n```\r\n\r\n- apply database schema\r\n\r\n```sh\r\n$ ./manage.py makemigrations\r\nNo changes detected\r\n\r\n$ ./manage.py migrate\r\nOperations to perform:\r\n  Apply all migrations: admin, auth, authtoken, bookings, categories, contenttypes, direct_messages, experiences, medias, reviews, rooms, sessions, users, wishlists\r\nRunning migrations:\r\n  Applying contenttypes.0001_initial... OK\r\n  ...\r\n  Applying wishlists.0002_alter_wishlist_experiences_alter_wishlist_rooms_and_more... OK\r\n```\r\n\r\n### launch\r\n\r\n- run django app in poertry environment\r\n\r\n```sh\r\n$ poetry shell\r\n$ ./manage.py runserver_plus\r\nWARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.\r\n * Running on http://127.0.0.1:8000\r\nPress CTRL+C to quit\r\n * Restarting with stat\r\n * Debugger is active!\r\n * Debugger PIN: 627-132-328\r\n```\r\n\r\n### browse\r\n\r\n- check django admin service in web browser\r\n\r\n```sh\r\n$ curl https://localhost:8000/admin\r\n```\r\n\r\n- login to admin service with superuser account\r\n\r\n\r\n### query\r\n\r\n- run orm query in django shell\r\n\r\n```sh\r\n$ poetry shell\r\n$ ./manage.py shell_plus\r\n# Shell Plus Model Imports\r\nfrom bookings.models import Booking\r\nfrom categories.models import Category\r\nfrom direct_messages.models import ChattingRoom, Message\r\nfrom django.contrib.admin.models import LogEntry\r\nfrom django.contrib.auth.models import Group, Permission\r\nfrom django.contrib.contenttypes.models import ContentType\r\nfrom django.contrib.sessions.models import Session\r\nfrom experiences.models import Experience, Perk\r\nfrom medias.models import Photo, Video\r\nfrom rest_framework.authtoken.models import Token, TokenProxy\r\nfrom reviews.models import Review\r\nfrom rooms.models import Amenity, Room\r\nfrom users.models import User\r\nfrom wishlists.models import Wishlist\r\n# Shell Plus Django Imports\r\nfrom django.core.cache import cache\r\nfrom django.conf import settings\r\nfrom django.contrib.auth import get_user_model\r\nfrom django.db import transaction\r\nfrom django.db.models import Avg, Case, Count, F, Max, Min, Prefetch, Q, Sum, When\r\nfrom django.utils import timezone\r\nfrom django.urls import reverse\r\nfrom django.db.models import Exists, OuterRef, Subquery\r\nPython 3.12.7 (tags/v3.12.7:0b05ead, Oct  1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]\r\nType 'copyright', 'credits' or 'license' for more information\r\nIPython 8.31.0 -- An enhanced Interactive Python. Type '?' for help.\r\n\r\nIn [1]: User.objects.all()\r\nOut[1]: \u003cQuerySet []\u003e\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoweringcloud%2Fairbnb-clone-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoweringcloud%2Fairbnb-clone-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoweringcloud%2Fairbnb-clone-django/lists"}