Commit Graph

365 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
1d7beadf96 Merge pull request 'Agregar método de pago crédito #20' (#36) from add_credit_pay_method_#20 into main
Reviewed-on: #36
2026-03-14 23:46:27 -05:00
mono
5442a52ff6 feat(Payment): add CREDIT payment method 2026-03-14 23:45:52 -05:00
b852772c76 Merge pull request 'Agregando rol administrativo #31' (#35) from add_administrative_rol_#31 into main
Reviewed-on: #35
2026-03-14 18:26:31 -05:00
1e16e6e983 feat: Add exernal_id to serializer issue #34 2026-03-14 18:07:44 -05:00
648207192c doc: products endpoint 2026-03-14 18:06:38 -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
mono
2ab328b913 docs: add AGENTS.md with project context for opencode 2026-03-07 17:52:48 -05:00
a05061c14e Merge pull request 'Cambiando autenticación de api a JWT #29' (#33) from add_jwt_authentication_#29 into main
Reviewed-on: #33
2026-02-14 15:57:03 -05:00
7c0047b4d3 fix: rm duplicate file. 2026-02-14 15:55:59 -05:00
c021104b62 doc(API): add sample requests. 2026-02-14 15:50:30 -05:00
7a9034943a feat(API): change to jwt authentication. 2026-02-14 15:12:32 -05:00
4812160ea2 Merge pull request 'Se adiciona autenticación a django' (#30) from add_authentication_#29 into main
Reviewed-on: #30
2025-12-13 17:35:34 -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
6261d64206 Merge pull request '#27 fix: reconciliation jar.' (#28) from test_decimal_error_jar_#27 into main
Reviewed-on: #28
0.1.9
2025-11-15 17:51:31 -05:00
64f07a2ce2 #27 fix: reconciliation jar. 2025-11-15 17:50:06 -05:00
308e2d08c1 Merge pull request 'feat(tryton): add comment to tryton sale.' (#26) from add_payment_method_to_tryton_sale_on_notes_field_#21 into main
Reviewed-on: #26
0.1.8
2025-11-08 15:38:44 -05:00
e1ff427856 feat(tryton): add comment to tryton sale. 2025-11-08 15:34:45 -05:00
bf70c47551 Merge pull request 'Se adiciona el método de pago en la descripción de la venta de tryton #21' (#25) from add_payment_method_to_tryton_sale_on_notes_field_#21 into main
Reviewed-on: #25
2025-09-05 20:26:10 -05:00
f02f754ae7 feat(tryton): add payment method to tryton sale description. 2025-09-05 20:24:13 -05:00
1668a37091 Merge pull request 'Adicionando autorecogida a las ventas que se envian a tryton #23' (#24) from add_self_pick_up_to_sales_in_tryton_#23 into main
Reviewed-on: #24
2025-09-05 19:24:54 -05:00
b33937d4a5 feat(Tryton): add self_pick_up in send sale to tryton. 2025-09-05 19:15:26 -05:00
a265b94460 Merge pull request 'Enviando ventas a Tryton así alguna de las ventas falle #16' (#19) from send_sales_to_tryton_in_a_no_bloqueant_way_#16 into main
Reviewed-on: #19
0.1.7
2025-08-30 15:48:26 -05:00
253fcbae27 fix(Tryton): add try except at send sales to tryton. #16 2025-08-30 15:45:13 -05:00
d127609508 Merge pull request 'Adicionando external id en venta y customers en la API #17' (#18) from add_external_id_in_api_sale_fields_#17 into main
Reviewed-on: #18
2025-08-30 15:32:57 -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
477405a094 Merge pull request 'agregada direccion de envio y facturación al enviar las compras a tryton #14' (#15) from add_shipment_address_to_tryton_sale_#14 into main
Reviewed-on: #15
0.1.6
2025-08-16 16:37:46 -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
7ac28154eb Merge branch 'handle_duplicate_product_name_from_tryton_#11' 2025-08-16 10:32:32 -05:00
e7eda79c69 Merge branch 'main' into handle_duplicate_product_name_from_tryton_#11 2025-08-16 10:28:28 -05:00
5f40b4098c feat(Tryton): handle duplicate named products from tryton. 2025-08-16 10:27:17 -05:00
rodia
80864137b6 Merge branch 'main' of https://gitea.onecluster.org/OneTeam/don_confiao_backend 2025-08-16 12:10:27 -03:00
rodia
2e8e956b69 feat: Add env_example 2025-08-16 12:09:41 -03:00
2e4c6592a3 fix test. 2025-08-16 09:55:20 -05:00
6b149b0134 Merge pull request 'Exportando ventas directamente al tryton' (#12) from export_sales_to_tryton_#9 into main
Reviewed-on: #12
2025-08-09 15:39:40 -05:00