Skip to content

chore: make hosts configurable and enrich project documentation #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 26, 2025

Conversation

RandomProgramm3r
Copy link
Owner

  • feat: Load ALLOWED_HOSTS from DJANGO_ALLOWED_HOSTS env var (comma‑separated) in promo_code/settings.py; update .env.example
  • docs: Add OpenAPI 3.0 spec (api.yml) covering all B2B/B2C endpoints, including schemas, parameters, and status codes
  • docs: Include database schema diagrams (black_schema.excalidraw.png & white_schema.excalidraw.png) in media/ and update README.md
  • docs: Add GitHub Actions and Ruff status badges to README.md for CI and linting visibility

This commit enhances security by replacing the wildcard `ALLOWED_HOSTS` setting with a configurable list loaded from the `DJANGO_ALLOWED_HOSTS` environment variable.

- The `promo_code/settings.py` file now parses a comma-separated string from the environment variable.
- The `.env.example` file has been updated to include `DJANGO_ALLOWED_HOSTS` with a default value of `localhost,127.0.0.1,0.0.0.0`.
This commit introduces comprehensive API documentation and enhances the project's overall documentation.

Key additions:
- **OpenAPI Specification:** A new `api.yml` file has been added, providing a detailed OpenAPI 3.0 specification for all B2B and B2C endpoints. This includes request/response schemas, parameters, and status codes.
- **Database Schema:** New schema diagrams (`black_schema.excalidraw.png` and `white_schema.excalidraw.png`) have been added to the `media/` directory to visualize the database structure.
- **README Update:** The `README.md` has been updated to include the new documentation and schema diagrams, providing a more complete project overview.
This commit adds a document emoji to the "API Specification" section header in the `README.md` file to improve visual appeal.
This commit adds GitHub Actions and Ruff status badges to the `README.md` to provide a quick, visible status of the project's CI and code quality.
@RandomProgramm3r RandomProgramm3r merged commit fe82d03 into main Jul 26, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant