{"id":15465994,"url":"https://github.com/osmcha/osmcha-django","last_synced_at":"2025-11-17T07:00:42.277Z","repository":{"id":35871553,"uuid":"40156760","full_name":"OSMCha/osmcha-django","owner":"OSMCha","description":"A database manager and API for OSMCha","archived":false,"fork":false,"pushed_at":"2024-10-24T05:42:01.000Z","size":2406,"stargazers_count":35,"open_issues_count":41,"forks_count":20,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-24T23:48:40.710Z","etag":null,"topics":["django","gis","openstreetmap","osm","qa"],"latest_commit_sha":null,"homepage":"https://osmcha.org","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OSMCha.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2015-08-04T01:33:13.000Z","updated_at":"2024-10-01T01:34:22.000Z","dependencies_parsed_at":"2023-02-14T05:47:13.058Z","dependency_job_id":"bf565ac0-7a66-4bf0-84d1-82cddfa1144f","html_url":"https://github.com/OSMCha/osmcha-django","commit_stats":{"total_commits":985,"total_committers":18,"mean_commits":54.72222222222222,"dds":0.4852791878172589,"last_synced_commit":"329df5f59505cb9b3c97b96e2939c7d5a4fe0d53"},"previous_names":["osmcha/osmcha-django","willemarcel/osmcha-django"],"tags_count":100,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSMCha%2Fosmcha-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSMCha%2Fosmcha-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSMCha%2Fosmcha-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OSMCha%2Fosmcha-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OSMCha","download_url":"https://codeload.github.com/OSMCha/osmcha-django/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248675434,"owners_count":21143763,"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","gis","openstreetmap","osm","qa"],"created_at":"2024-10-02T01:04:31.521Z","updated_at":"2025-11-17T07:00:42.196Z","avatar_url":"https://github.com/OSMCha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"osmcha-django\n==============\n\n.. image:: https://coveralls.io/repos/github/osmcha/osmcha-django/badge.svg?branch=master\n    :target: https://coveralls.io/github/willemarcel/osmcha-django?branch=master\n\n.. image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg\n    :target: code_of_conduct.md\n\n\nThe aim of OSMCHA is to help identify and fix harmful edits in the OpenStreetMap.\nIt relies on `OSMCHA \u003chttps://github.com/willemarcel/osmcha\u003e`_ to analyse the changesets.\n\nThis project provides a Django application that gets changesets from the\nOpenStreetMap API, analyses and stores them in a database and finally provides a\nREST API to interact with the changeset data.\n\nThis repository contains the backend code. You can report errors or request new features in the\n`osmcha-frontend repository \u003chttps://github.com/osmcha/osmcha-frontend\u003e`_.\n\nLicense: BSD 2-Clause\n\nOSMCha is an `OpenStreetMap US \u003chttps://www.openstreetmap.us/\u003e` charter project. You can support this project by `making a donation \u003chttps://openstreetmap.app.neoncrm.com/forms/osmcha\u003e`.\n\nSettings\n------------\n\nosmcha-django relies extensively on environment settings which **will not work with\nApache/mod_wsgi setups**. It has been deployed successfully with both Gunicorn/Nginx\nand uWSGI/Nginx.\n\nFor configuration purposes, the following table maps the 'osmcha-django' environment\nvariables to their Django settings:\n\n\n======================================= ================================= ========================================= ===========================================\nEnvironment Variable                    Django Setting                    Development Default                       Production Default\n======================================= ================================= ========================================= ===========================================\nDJANGO_CACHES                           CACHES (default)                  locmem                                    redis\nDJANGO_DEBUG                            DEBUG                             True                                      False\nDJANGO_SECRET_KEY                       SECRET_KEY                        CHANGEME!!!                               raises error\nDJANGO_SECURE_BROWSER_XSS_FILTER        SECURE_BROWSER_XSS_FILTER         n/a                                       True\nDJANGO_SECURE_SSL_REDIRECT              SECURE_SSL_REDIRECT               n/a                                       True\nDJANGO_SECURE_CONTENT_TYPE_NOSNIFF      SECURE_CONTENT_TYPE_NOSNIFF       n/a                                       True\nDJANGO_SECURE_FRAME_DENY                SECURE_FRAME_DENY                 n/a                                       True\nDJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS   HSTS_INCLUDE_SUBDOMAINS           n/a                                       True\nDJANGO_SESSION_COOKIE_HTTPONLY          SESSION_COOKIE_HTTPONLY           n/a                                       True\nDJANGO_SESSION_COOKIE_SECURE            SESSION_COOKIE_SECURE             n/a                                       False\nDJANGO_DEFAULT_FROM_EMAIL               DEFAULT_FROM_EMAIL                n/a                                       \"osmcha-django \u003cnoreply@example.com\u003e\"\nDJANGO_SERVER_EMAIL                     SERVER_EMAIL                      n/a                                       \"osmcha-django \u003cnoreply@example.com\u003e\"\nDJANGO_EMAIL_SUBJECT_PREFIX             EMAIL_SUBJECT_PREFIX              n/a                                       \"[osmcha-django] \"\nDJANGO_CHANGESETS_FILTER                CHANGESETS_FILTER                 None                                      None\nPOSTGRES_USER                           POSTGRES_USER                     None                                      None\nPOSTGRES_PASSWORD                       POSTGRES_PASSWORD                 None                                      None\nPGHOST                                  PGHOST                            localhost                                 localhost\nOAUTH_OSM_KEY                           SOCIAL_AUTH_OPENSTREETMAP_KEY     None                                      None\nOAUTH_OSM_SECRET                        SOCIAL_AUTH_OPENSTREETMAP_SECRET  None                                      None\nDJANGO_ANON_USER_THROTTLE_RATE          ANON_USER_THROTTLE_RATE           None                                      30/min\nDJANGO_COMMON_USER_THROTTLE_RATE        COMMON_USER_THROTTLE_RATE         None                                      180/min\nDJANGO_NON_STAFF_USER_THROTTLE_RATE     NON_STAFF_USER_THROTTLE_RATE      3/min                                     3/min\nOAUTH_REDIRECT_URI                      OAUTH_REDIRECT_URI                http://localhost:8000/oauth-landing.html  http://localhost:8000/oauth-landing.html\nDJANGO_ENABLE_CHANGESET_COMMENTS        ENABLE_POST_CHANGESET_COMMENTS    False                                     False\nDJANGO_OSM_COMMENTS_API_KEY             OSM_COMMENTS_API_KEY              ''                                        ''\n======================================= ================================= ========================================= ===========================================\n\nYou can set each of these variables with:\n\n    $ export VAR=VALUE\n\nDuring the development, you can define the values inside your virtualenv ``bin/activate`` file.\n\n\nFiltering Changesets\n---------------------\n\nYou can filter the changesets that will be imported by defining the variable CHANGESETS_FILTER\nwith the path to a GeoJSON file containing a polygon with the geographical area you want to filter.\n\n\nGetting up and running\n----------------------\n\nBasics\n^^^^^^\n\nThe steps below will get you up and running with a local development environment.\nWe assume you have the following installed:\n\n* pip\n* virtualenv\n* PostgreSQL\n\nBefore installing the python libraries, we need to install some packages in the\noperational system::\n\n    $ sudo ./install_os_dependencies.sh install\n\nFor the next step, make sure to create and activate a virtualenv_, then open a terminal at the project root and install the\nrequirements for local development::\n\n    $ pip install -r requirements/local.txt\n\n.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/\n\nCreate a local PostgreSQL database::\n\n    $ createdb osmcha\n\nRun ``migrate`` on your new database::\n\n    $ python manage.py migrate\n\nYou can now run the ``runserver_plus`` command::\n\n    $ python manage.py runserver_plus\n\nOpen up your browser to http://127.0.0.1:8000/ to see the site running locally.\n\nSetting Up Your Users\n^^^^^^^^^^^^^^^^^^^^^\n\nTo create a **normal user account**, just go to Sign Up and fill out the form. Once you submit it, you'll see a \"Verify Your E-mail Address\" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.\n\nTo create a **superuser account**, use this command::\n\n    $ python manage.py createsuperuser\n\nFor convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.\n\nHow to login using the OAuth api\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n* Make a POST request to ``\u003cyour_base_url\u003e/api/v1/social-auth/`` to receive the ``oauth_token``, ``oauth_token_secret`` keys.\n* Take the ``oauth_token`` and redirect the user to ``https://www.openstreetmap.org/oauth/authorize?oauth_token=\u003coauth_token\u003e``.\n* You'll be redirected to the URL that you configured in your OSM OAuth key settings. That redirect url will contain the ``oauth_verifier`` param.\n* Make another POST request to ``\u003cyour_base_url\u003e/api/v1/social-auth/`` and send the ``oauth_token``, ``oauth_token_secret`` and ``oauth_verifier`` as the data. You'll receive a token that you can use to make authenticated requests.\n* The token key should be included in the Authorization HTTP header. The key should be prefixed by the string literal \"Token\", with whitespace separating the two strings. For example: ``Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b``.\n\nFrontend\n^^^^^^^^\n\n`osmcha-frontend \u003chttps://github.com/osmcha/osmcha-frontend\u003e`_ is a web\ninterface that you can use to interact with the API. The web interface can be\ndeployed separately and configured to talk to this Django app when making API\nrequests. See the README in that repository for more details.\n\nFeature creation endpoint\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe feature creation endpoint allows only admin users to create features. You can\nuse the admin site to create a token for a user.\n\nInstances\n---------\n\nThe main instance is https://osmcha.org/. You can check the API\ndocumentation at https://osmcha.org/api-docs/.\n\nThere is currently no official staging instance.\n\nDeployment\n------------\n\nCheck the `Deploy \u003cDEPLOY.rst\u003e`_ file for instructions on how to deploy with Heroku and Dokku.\n\n\nGet in contact\n---------------\n\nIf you use, deploy or are interested in helping develop OSMCha, subscribe to our\n`mailing list \u003chttps://lists.openstreetmap.org/listinfo/osmcha-dev\u003e`_. You can\nreport errors or request new features in the\n`osmcha-frontend repository \u003chttps://github.com/osmcha/osmcha-frontend\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmcha%2Fosmcha-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosmcha%2Fosmcha-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosmcha%2Fosmcha-django/lists"}