{"id":26127721,"url":"https://github.com/project-travel-mate/server","last_synced_at":"2025-04-13T17:22:52.771Z","repository":{"id":32776797,"uuid":"122350373","full_name":"project-travel-mate/server","owner":"project-travel-mate","description":"Django server for Travel Mate (Project: nomad)","archived":false,"fork":false,"pushed_at":"2024-04-17T19:21:13.000Z","size":187,"stargazers_count":46,"open_issues_count":3,"forks_count":66,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-04-17T20:34:50.640Z","etag":null,"topics":["django","django-rest-framework","python","travel-mate"],"latest_commit_sha":null,"homepage":"https://project-travel-mate.github.io","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/project-travel-mate.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":"2018-02-21T14:58:57.000Z","updated_at":"2024-03-12T03:02:08.000Z","dependencies_parsed_at":"2022-08-30T01:41:47.624Z","dependency_job_id":"339fe746-5f48-4855-8c10-bef7345e0f72","html_url":"https://github.com/project-travel-mate/server","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/project-travel-mate%2Fserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-travel-mate%2Fserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-travel-mate%2Fserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-travel-mate%2Fserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project-travel-mate","download_url":"https://codeload.github.com/project-travel-mate/server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248750872,"owners_count":21155797,"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","django-rest-framework","python","travel-mate"],"created_at":"2025-03-10T18:36:14.264Z","updated_at":"2025-04-13T17:22:52.752Z","avatar_url":"https://github.com/project-travel-mate.png","language":"Python","funding_links":[],"categories":["Django"],"sub_categories":[],"readme":"# [Travel Mate](https://github.com/project-travel-mate/Travel-Mate) Server (Project: Nomad)\n[![Build Status](https://travis-ci.org/project-travel-mate/server.svg?branch=master)](https://travis-ci.org/project-travel-mate/server)\n\u003e [Django 2.0](https://docs.djangoproject.com/en/2.0/releases/2.0/) server for Travel Mate\n\n## Contribute\n+ For new feature request in the app, open a [new feature request](https://github.com/project-travel-mate/Travel-Mate/issues) on the main repository\n+ For reporting bug in existing APIs, open a [new issue](https://github.com/project-travel-mate/server/issues) on this repository\n\n## Local setup instructions\n+ Clone the project from source\n```shell\ngit clone https://github.com/project-travel-mate/server \u0026\u0026 cd server\n```\n+ Setup virtual environment\n```shell\npip install virtualenv\nvirtualenv venv --python=python3.6\n```\nNow activate the environment shell with:\n```shell\nsource venv/bin/activate  # On Linux\n```\nor\n```bat\nvenv\\Scripts\\activate  \u0026 :: On Windows\n```\n+ Install all dependencies\n```shell\npip install -r requirements.txt\n```\n+ Setup Postgres database and user\n*(assuming Postgres is already installed on system; See [postgres setup instructions](http://postgresguide.com/setup/install.html))*\n\nFor Linux-\n```\n$ sudo -u postgres createuser nomad\n$ sudo -u postgres createdb nomad\n\n$ sudo -u postgres psql\npsql=# alter user nomad with encrypted password 'pass';\npsql=# grant all privileges on database nomad to nomad ;\npsql=# ALTER USER nomad CREATEDB ;\n```\nFor Windows-\n```\nThe complete path\u003epsql -U postgres -h localhost\nPassword:The one given during setup of postgres.\npostgres=# create database nomad;\npostgres=# create user nomad;\npostgres=# alter user nomad with encrypted password 'pass';\npostgres=# grant all privileges on database nomad to nomad ;\npostgres=# ALTER USER nomad CREATEDB ;\n```\n\n+ Database migrations\n```\npython manage.py makemigrations\npython manage.py migrate\n```\n\n+ Run Tests\n```\npython manage.py test\n```\n\n+ Finally! Run server\n```\npython manage.py runserver\n```\n\nOpen [localhost:8000](http://localhost:8000)\n\n+ To access Django Admin\n```\npython manage.py createsuperuser\n```\n\nWhen prompted, type your username (lowercase, no spaces), email address, and password.\nFor example, the output should look like this:\n\n```\nUsername: nomadadmin\nEmail address: nomadadmin@nomad.com\nPassword:\nPassword (again):\nSuperuser created successfully.\n```\n\n+ Re-run the server\n```\npython manage.py runserver\n```\n\nOpen [localhost:8000/admin](http://localhost:8000/admin)\n\n## Working with authenticated APIs\n\n\u003e You would need to have a registered user, with which you can generate a authentication token. Follow the following steps to generate a token *(You can download [Postman client](https://www.getpostman.com/) to make the following POST calls)*\nReference: [TokenAuthentication API docs](http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication)\n\n+ Make a POST call to `/api/sign-up` with 4 form-data body objects: `email`, `password`, `firstname`, `lastname`. You should get *\"Successfully registered\"* response with 201 status code.\n+ Make a POST call to `/api/sign-in` with 2 form-data body objects: `username` (which is your email Id you used for sign up), `password`. You will get a token in JSON response, store it somewhere.\n+ For making any subsequent request, use the above token by sending it as an \"Authorization HTTP Header\", eg: `Authorization: Token \u003cyour token\u003e`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-travel-mate%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-travel-mate%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-travel-mate%2Fserver/lists"}