{"id":21915054,"url":"https://github.com/awaisdar001/django-trips","last_synced_at":"2026-03-04T13:30:57.739Z","repository":{"id":44166667,"uuid":"295779719","full_name":"awaisdar001/django-trips","owner":"awaisdar001","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-14T12:42:56.000Z","size":491,"stargazers_count":6,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-20T11:54:02.096Z","etag":null,"topics":["api","database","django","docker","hacktoberfest","trips"],"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/awaisdar001.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-09-15T16:02:20.000Z","updated_at":"2025-06-14T12:42:30.000Z","dependencies_parsed_at":"2025-04-18T04:47:32.806Z","dependency_job_id":"8ae18bfc-58da-401e-b7ea-7d308ef040c0","html_url":"https://github.com/awaisdar001/django-trips","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/awaisdar001/django-trips","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaisdar001%2Fdjango-trips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaisdar001%2Fdjango-trips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaisdar001%2Fdjango-trips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaisdar001%2Fdjango-trips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/awaisdar001","download_url":"https://codeload.github.com/awaisdar001/django-trips/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/awaisdar001%2Fdjango-trips/sbom","scorecard":{"id":218748,"data":{"date":"2025-08-11","repo":{"name":"github.com/awaisdar001/django-trips","commit":"e2548c583e7f11760ab9e7ce4c55964236ad3911"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"15 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'contents' permission set to 'write': .github/workflows/release.yaml:122","Warn: no topLevel permission defined: .github/workflows/quality.yaml:1","Warn: no topLevel permission defined: .github/workflows/release.yaml:1","Warn: no topLevel permission defined: .github/workflows/unit-tests.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yaml:99"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 1.0.4 not signed: https://api.github.com/repos/awaisdar001/django-trips/releases/225332514","Warn: release artifact 1.0.3 not signed: https://api.github.com/repos/awaisdar001/django-trips/releases/224833124","Warn: release artifact 1.0.4 does not have provenance: https://api.github.com/repos/awaisdar001/django-trips/releases/225332514","Warn: release artifact 1.0.3 does not have provenance: https://api.github.com/repos/awaisdar001/django-trips/releases/224833124"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/quality.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/quality.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/quality.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:125: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:130: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:94: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yaml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yaml:115: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/awaisdar001/django-trips/unit-tests.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:2: pin your Docker image by updating python:3.11-slim to python:3.11-slim@sha256:539abdd47f4bf0ef07d17bd79b41d2bcd98866485b868cac911d486df8d68132","Warn: pipCommand not pinned by hash: Dockerfile:33","Warn: pipCommand not pinned by hash: Dockerfile:34","Warn: pipCommand not pinned by hash: .github/workflows/quality.yaml:23","Warn: pipCommand not pinned by hash: .github/workflows/release.yaml:78","Warn: pipCommand not pinned by hash: .github/workflows/release.yaml:79","Warn: pipCommand not pinned by hash: .github/workflows/unit-tests.yml:28","Warn: pipCommand not pinned by hash: .github/workflows/unit-tests.yml:29","Info:   0 out of  11 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   7 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T02:06:47.067Z","repository_id":44166667,"created_at":"2025-08-17T02:06:47.067Z","updated_at":"2025-08-17T02:06:47.067Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30081404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","database","django","docker","hacktoberfest","trips"],"created_at":"2024-11-28T19:08:40.113Z","updated_at":"2026-03-04T13:30:57.701Z","avatar_url":"https://github.com/awaisdar001.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Trips API\n\nThis is a Django Rest API for fetching and creating trips and schedules.\n## Installation\nSimply do:\n```bash\npip install django-trips\n```\n\n## Usage\nAdd the app into your installed apps in your project's settings file. \n```\nINSTALLED_APPS = [\n    ...\n    'django_trips',\n]\n```\n## Migrate\n```\npython manage.py migrate \n```\nAdd the following to your root `urls.py` or to your desired file location.   \n```\nurlpatterns = [\n    ...\n    path('trips/', include(('django_trips.api.urls', 'trips-api'), namespace='trips-api')),\n]\n```\nYou can replace `trips/` to any namespace you like for the api.\n\n## Generate random trips.\nBefore you generate random scripts, make sure you have the required settings available in your project. If you want to use the default settings set `USE_DEFAULT_TRIPS=True`. \nThe script depends upon these variables, if you don't want to use the default settings set the \nfollowing settings. \n1. `TRIP_DESTINATIONS`\n2. `TRIP_DEPARTURE_LOCATION`\n3. `TRIP_LOCATIONS = TRIP_DEPARTURE_LOCATION + TRIP_DESTINATIONS`\n4. `TRIP_HOSTS`\n5. `TRIP_FACILITIES`\n6. `TRIP_CATEGORIES`\n7. `TRIP_GEARS`\n\n```\npython manage.py generate_trips --batch_size=100\n``` \nChange the `batch_size` variable to create as much of trips you want. \n\n## API Endpoints\nThe following pages are served in the development:\n\n| Page                 |  Method          | URL                                                        |\n|----------------------|------------------|-----------------------------------------------             |\n| Scheduled Trips List | GET              | http://localhost:8000/api/trips/                           |\n| Available Trips List | GET              | http://localhost:8000/api/trips/by/availability/           |\n| Search Trip          | GET              | http://localhost:8000/api/trips?name=Boston/            |\n| Single Trip          | GET              | http://localhost:8000/api/trip/trip-id-or-slug/            |\n| Update Trip          | PUT              | http://localhost:8000/api/trip/trip-id-or-slug/            |\n| Update Trip          | PATCH            | http://localhost:8000/api/trip/trip-id-or-slug/            |\n| Delete Trip          | DELETE           | http://localhost:8000/api/trip/trip-id-or-slug/            |\n| Destination          | GET              | http://localhost:8000/api/destinations/                    |\n| Destination Detail   | GET              | http://localhost:8000/api/destination/location-slug        |\n| All Trip Bookings    | GET              | http://localhost:8000/api/trip/bookings                    |\n| Single Bookings      | GET              | http://localhost:8000/api/trip/booking/id                  |\n| Single Trip Bookings | GET              | http://localhost:8000/api/trip/\u003ctrip-slug\u003e/bookings        |       |\n\n\n### API permissions\n| Authentication            \n|-------------------------- |\n| `SessionAuthentication`   |\n| `BasicAuthentication`     |\n\n| Permissions               |\n|-------------------------  |\n|   `IsAuthenticated`       | \n\n\n### Trip List\n`http://localhost:8000/api/trips/`\n\nThis endpoint is used to list all the trips by schedule using the **GET** request type. These trips have specified \n(fixed) schedule. These trips use django model `TripSchedule` for creating their schedule. Once the schedule is expired,\nthese trips do not renew automatically. \nThese are the trip with \"**static**\" schedule data.\n\n### Trip List by Availability\n`http://localhost:8000/api/trips/by/availability/`\n\nThere is another mechanism which would like you to define dynamic trips schedule. Which is using `TripAvailability` \nmodel. In this model you can define the recurrence of any trip, weekly, daily, or monthly and these trip may\nauto-renew themselves. They come handy when you have dynamic trips schedule.    \n\n### Search Trip\n`http://localhost:8000/api/trip/id-or-slug?destination=\u003cdestination name, destination name 2,\u003e`\n\nSearch specific trips. Here are the params that can be passed while searching. You can also mix the params together to\nnarrow down the search. \n\n| param                 | description                                                           | example                           |\n| ---                   | ---                                                                   |---                                |\n| name (str)               | Find trips that contains specific name.                               | `/api/trips/?name=Boston`\n| destination[]         | Filter trips with specific destinations.                              | `destination=Boston,London`\n| price_from (str)      | Find trips that has price greater than or equal to the given amount   | `/api/trips/?price_from=200`\n| price_to (str)        | Find trips that has price less than or equal to the given amount      | `/api/trips/?price_to=200`\n| duration_from (int)   | Find trips having duration greater than or equal to the given number  | `/api/trips/?duration_from=2`\n| duration_to (int)     | Find trips having duration less  than or equal to the given number    | `/api/trips/?duration_to=10`\n| date_from (date)      | Find trips that are scheduled greater than or specified date `\u003cyyyy-mm-dd\u003e`          | `/api/trips/?date_from=2020-01-02`\n| date_to (date)        | Find trips that are scheduled less than or equal to specified date`\u003cyyyy-mm-dd\u003e`    | `/api/trips/?date_from=2020-01-02`\n\n\n\n### Single Trip\n`http://localhost:8000/api/trip/id-or-slug`\n\nThis endpoint is used to fetch a single trip using GET request type.\n\n### Update Trip (using PUT)\n`http://localhost:8000/api/trip/trip-id-or-slug/`\n\nThis endpoint is used to update a single trip using PUT request type. You would need to pass the complete trip object. \n```python\nreset_of_params = {}\ndata = {\n    'age_limit': 39,\n    **reset_of_params,\n}\n```\n### Update Trip (using PATCH)\n`http://localhost:8000/api/trip/trip-id-or-slug/`\n```python\ndata = {\n    'age_limit': 39,\n}\n```\n### Update Trip (using PUT)\n`http://localhost:8000/api/trip/trip-id-or-slug/`\n\nThis endpoint is used to delete a single trip using DELETE request type. \n\n### Get Destinations List\n`http://localhost:8000/api/destinations/`\n\nThis endpoint is used to fetch all destinations available.  \n\n### Get Destination Detail\n`http://localhost:8000/api/destination/destination-slug`\n\nGiven a slug, this endpoint provides detail about a single trip.\n\n### Create Trip booking\n`http://localhost:8000/api/trip/bookings`\n\n#### GET:\nGet all the trips list using the `GET` request method. \n#### POST:\nCreate trip booking by giving the following \"example\" data in the `POST` request.\n```\n{\n    \"name\": \"tom latham\",\n    \"trip\": \"5-days-trip-to-city-center\",\n    \"phone_number\": \"tom\",\n    \"cnic_number\": \"1234234-23423\",\n    \"email\": \"a@gmail.com\",\n    \"target_date\": \"2021-09-01\",\n    \"message\": \"Tom booking# 1\"\n}\n```\n\n### Single Trip booking Operations \n`http://localhost:8000/api/trip/booking/\u003cbooking-id\u003e/`\n\nRetrieve, Update \u0026 Delete a single trip booking. \n\n### All Trip Bookings\n`http://localhost:8000/api/trip/\u003ctrip-slug\u003ebookings/`\n\nRetrieve all bookings of a single trip.\n\n## Develop Django Trips\nKick the docker build using the following command. \n```\nmake build\n``` \nThis task may take few minutes. \n\n \nOnce the build has been completed, spin up the docker and migrate the database. \n```bash\n\u003e make run\n\u003e make shell \n\u003e make update_db\n```\nCreate a superuser with username `admin`.\n\n``` bash\n\u003e make shell\n\u003e python manage.py createsuperuser\n```\n\nCreate batch of trips. Run the following command inside docker shell.\n```bash\n\u003e python manage.py  generate_trips --batch_size=100\nOR\n\u003e make random_trips\n```\n\n## Test\nRun tests using the following command.\n```\nmake tests\n```\n## Docker Commands\n\n| Action                            |  Command          |\n|-----------------------------------|-------------------|\n| Run Server                        | `make run`        |\n| Trail Logs                        | `make logs`       |\n| Attach sever                      | `make attach`     |\n| Stop server                       | `make stop`       |\n| * Destroy docker container.       | `make destory`    |\n\n_* caution, this will remove all your data._\n\n## How to Contribute\nContributions are welcome!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaisdar001%2Fdjango-trips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fawaisdar001%2Fdjango-trips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fawaisdar001%2Fdjango-trips/lists"}