Commit Graph

288 Commits

Author SHA1 Message Date
bf69fe88d9 feat: Add staging environment for local production testing
- Add docker-compose.staging.yml with PostgreSQL and Django
- Add .env.staging.example with staging-specific environment variables
- Configure staging settings (DEBUG=False, no SSL redirect for localhost)
- Update settings/__init__.py to support staging environment detection
- Update AGENTS.md with staging environment documentation
- Update .gitignore to exclude .env.staging
- Optimize docker-compose.prod.yml configuration

Staging environment simulates production configuration locally:
- PostgreSQL database (port 5433 to avoid conflicts)
- Gunicorn with 4 workers
- DEBUG=False but HTTP allowed for easier testing
- Separate volumes for static files, media, and logs

Usage:
  cp .env.staging.example .env.staging
  docker compose -f docker-compose.staging.yml up -d
2026-05-10 20:32:42 -05:00
8818246870 feat: Add WhiteNoise for static files serving
- Add whitenoise==6.6.0 to requirements.txt
- Configure WhiteNoise middleware in base settings
- Add WhiteNoise STORAGES configuration for all environments
- Reorder CORS middleware to correct position (before CommonMiddleware)
- Enable automatic Gzip compression and cache busting
- Configure environment-specific settings:
  * Development: autorefresh enabled, use finders
  * Staging: 10min cache, autorefresh for testing
  * Production: 1 year cache, strict mode, optimized

Fixes issue with Django REST Framework static files returning 404
in staging/production environments (DEBUG=False).

WhiteNoise now serves all static files (CSS, JS, images) with:
- Automatic Gzip compression (~84% size reduction)
- Cache busting with content hashing
- Optimized cache headers
- No nginx required for static files
2026-05-10 20:32:30 -05:00
294dbdee91 feat: Add deploy environment, Add pyprojectoml 2026-05-09 19:09:31 -05:00
6bc76282d1 chore: Add external_id to representation 2026-05-09 15:52:56 -05:00
d45dbc4658 Merge pull request 'feat/add_external_id_serializer' (#38) from feat/add_external_id_serializer into main
Reviewed-on: #38
2026-04-11 16:49:46 -05:00
mono
5442a52ff6 feat(Payment): add CREDIT payment method 2026-03-14 23:45:52 -05:00
1e16e6e983 feat: Add exernal_id to serializer issue #34 2026-03-14 18:07:44 -05:00
mono
0d5a34d366 feat: add IsAdministrator permission and protect admin endpoints 2026-03-14 16:37:44 -05:00
mono
7e2c03c81b test: add tests for user role field 2026-03-14 16:27:44 -05:00
mono
83029afd5b feat: add role field to user serializer for menu control
- Endpoint /me/ now returns 'role': 'administrator' or 'role': 'user'
- Uses Django's is_staff to determine administrator role
2026-03-07 17:58:12 -05:00
7c0047b4d3 fix: rm duplicate file. 2026-02-14 15:55:59 -05:00
7a9034943a feat(API): change to jwt authentication. 2026-02-14 15:12:32 -05:00
fb4c82a94c #29 refactor(Tests): extract to mixin class. 2025-12-13 17:35:20 -05:00
fb3124246c #29 refactor(Tests): extract to mixin class. 2025-12-13 17:34:40 -05:00
f3d3681bc4 #29 fix(Tests): add auth to tests. 2025-12-13 17:10:00 -05:00
e6d2160d2e #29 feat(Auth): add logout and profile. 2025-12-13 16:31:20 -05:00
f323873d80 #29 feat(Auth): add logout and profile. 2025-12-13 16:30:53 -05:00
b730d24855 #29 feat(Auth): add login. 2025-12-13 12:24:35 -05:00
64f07a2ce2 #27 fix: reconciliation jar. 2025-11-15 17:50:06 -05:00
e1ff427856 feat(tryton): add comment to tryton sale. 2025-11-08 15:34:45 -05:00
f02f754ae7 feat(tryton): add payment method to tryton sale description. 2025-09-05 20:24:13 -05:00
b33937d4a5 feat(Tryton): add self_pick_up in send sale to tryton. 2025-09-05 19:15:26 -05:00
253fcbae27 fix(Tryton): add try except at send sales to tryton. #16 2025-08-30 15:45:13 -05:00
604bbd3ab9 #17 feat(API): add external id to sales on api. 2025-08-30 15:28:50 -05:00
e17b8f6973 style. 2025-08-30 15:25:33 -05:00
e3f571afc5 #17 feat(API): add external id to customers on api. 2025-08-30 15:24:42 -05:00
4dae669397 #14 fix(Tryton): add address on updated customers from tryton. 2025-08-16 16:36:06 -05:00
937fe06de4 #14 feat(Tryton): add address on update customers from tryton. 2025-08-16 16:09:20 -05:00
69185f2460 fix(Tryton Shop): add shops. 2025-08-16 12:24:05 -05:00
5f40b4098c feat(Tryton): handle duplicate named products from tryton. 2025-08-16 10:27:17 -05:00
2e4c6592a3 fix test. 2025-08-16 09:55:20 -05:00
271f9b2942 fix(Tryton): fix import customers from tryton. 2025-08-09 15:27:17 -05:00
4734636b4f feat (Tryton): get customers from tryton. 2025-08-09 14:12:31 -05:00
59fbc8872a #9 feat(Tryton): get products salables from tryton only. 2025-07-27 23:34:07 -05:00
d1e137d387 #9 feat(Tryton): untouched products on sync from tryton. 2025-07-27 23:22:58 -05:00
c33c6f630a #9 feat(Tryton): update products from tryton. 2025-07-27 23:11:34 -05:00
76e525735d #9 feat(Tryton): create products from tryton. 2025-07-27 22:57:44 -05:00
3a5e13624f #9 config(Tryton): read tryton params from environment. 2025-07-20 22:01:34 -05:00
3d9feeac43 #9 feat(Tryton): add address_external_id to tryton. 2025-07-19 19:09:53 -05:00
81e4c0bc0d #9 feat(Customer): add address_external_id field. 2025-07-19 19:04:58 -05:00
cf0f6dc4b5 #9 feat(Tryton): enviar_ventas_a_tryton 2025-07-19 19:00:33 -05:00
1d3160ae92 #9 feat(Product): add unit_external_id field. 2025-07-19 18:17:18 -05:00
ba9ef039f4 #9 feat(Product): add external_id field. 2025-07-19 17:32:35 -05:00
46e7181653 #9 feat(Sale): add external_id field. 2025-07-19 17:28:47 -05:00
62d39c97c0 #9 feat(Sale): add external_id field. 2025-07-19 10:57:28 -05:00
c7e1af9c81 fix(CSV): report tryton csv. 2025-04-12 12:06:07 -05:00
8791c5fa2d fix(Sale): allow decimal on quantity products. 2025-04-06 16:02:44 -05:00
5ecf0f4bf5 feat(Api): export sales for tryton from api. 2025-03-02 23:33:26 -05:00
0e38255a9d refactor(View): public function. 2025-03-02 23:15:52 -05:00
2364583952 refactor(views): extract to method. 2025-03-02 23:14:55 -05:00