Skip to content

InternetSemLimites/PublicAPI

Repository files navigation

Internet Sem Limites: CMS & API

Build Status Updates Coverage Status Code Climate

CMS and API for InternetSemLimites colaborative project.

Entry points

API

List existing providers

Create new provider

Edit existing provider

API Headers

All API requests returns a JSON with list(s) of providers (providers, hall-of-fame or hall-of-shame). Each provider is an obejct with the following properties:

  • category: Hall of Fame or for Hall of Shame
  • coverage: List os states covered by this provider
  • created_at: Dated the provider was submitted to our server
  • name: Name of the provider
  • other: General information (e.g.: cities covered, residential and/or corporative only etc.)
  • source: URL for the source of the info (usually an archive.is link)
  • url: URL of the provider
  • status: (only for provider detail endpoint) moderation status
  • moderation_reason: (only for provider detail endpoint) moderation justification for the status above

CMS

Anyone can suggest new providers using our form.

Auto generated markdown files (main repository)

Install

Requirements

The CMS is based in Python 3.6 and Django. Once you have pipenv available, install the dependencies:

pipenv install --dev

Settings

Copy contrib/.env.sample as .env in the project's root folder and adjust your settings. These are the main environment settings:

Django settings

Database

Email settings

  • DEFAULT_FROM_EMAIL (string) default e-maill address to be used as the sender (e.g. [email protected])
  • EMAIL_BACKEND (string) Django e-mail backend (e.g. django.core.mail.backends.console.EmailBackend)
  • SMTP e-mail settings: EMAIL_HOST (string), EMAIL_PORT (integer), EMAIL_USE_TLS (boolean), EMAIL_HOST_USER (string), and EMAIL_HOST_PASSWORD (string)

Migrations

Once you're done with requirements, dependencies and settings, create the basic structure at the database and create a super-user for you:

pipenv run python manage.py migrate
pipenv run python manage.py createsuperuser

Generate static files

We serve static files through WhiteNoise, so depending on your configuration you might have to run:

pipenv run python manage.py collectstatic

Ready?

Not sure? Run pipenv run python manage.py check and pipenv run python manage.py test --parallel just in case.

Ready!

Run the server with pipenv run python manage.py runserver and load localhost:8000 in your favorite browser.

If you created a super-user account, you can also use Django Admin at /admin/.