Project: shcp
Apps:
-
authentication
Uses djangorestframework-simplejwt.
-
shortcode
Main
-
front
For integration with the Angular site.
-
Models
-
Product
-
ProductBackup
-
Field
-
ColumnProfile
-
ColumnProfileField
-
ProductChangeLog
-
ProductFile
-
-
Serializers
-
ProductSerializer, ProductListSerializer
-
ProductBackupSerializer
-
FieldSerializer, FieldListSerializer
-
ColumnProfileSerializer
-
ColumnProfileFieldSerializer, ColumnProfileFieldListSerializer, ColumnProfileFieldDetailSerializer
-
ProductChangeLogSerializer
-
-
Views
- UploadFileView - ProductFileSerializer
-
APIs
-
ProductViewSet - ProductSerializer
/products/
ProductView: POST
/products-bulk/?log=0 - products update, make backup here (calls celery task - backup_products())
/products-bulk/?log=1 - product shortcodes update, make log of changed fields
-
ProductBackupViewSet - ProductBackupSerializer
/products-backup/
-
FieldViewSet - FieldSerializer
/fields/
FieldView: POST
/fields-bulk/ - fields bulk insert
-
ColumnProfileViewSet - ColumnProfileSerializer
/column-profiles/ - column profiles of the current user (get_queryset - user=self.request.user)
-
ColumnProfileFieldViewSet - ColumnProfileFieldSerializer
/column-profile-fields/
ColumnProfileFieldView: POST, PUT
/column-profile-fields-bulk/?column_profile=n - column profile fields bulk insert, update
ColumnProfileFieldDetailView: GET
/column-profile-fields-detail/?column_profile=n - column profile fields get details (field name, field label)
-
SyncColumnProfileView: GET
/sync/column-profile-fields/ - if column profile has missing fields, fill them
Default value of column profile field is (order=field.pk, visible=field.field_type is SHORTCODE or DATA?)
-
-
Import
-
read from url, and convert XML string to python dict
-
Make event log
-
Add new fields
-
Sync column profile fields
-
Update shortcodes
-
Update results
-
Update database
-
-
Export
-
Read from database
-
Make Excel (XLSX) file
-
FTP or local file
-
- Create a model
- Create a serializer
- Add to admin
- Create a view set
- Configure url