I’m new in Django, and need to use it in couple with Django REST Framework.
The point of service is commands transfer between A to B services (for example B is mine) and do some actions after that
Process is:
Get data -> Validate data -> Do some action -> Save some data in DB (maybe logs, history, result of action, etc, ) -> Do Response
Problem 1:
Data format is XML. Yes I know there is XML parser for Django, but there is nuances: encoding of XML document is shift-jis and content type is multipart/form-data. It is easy to set encoding, but there is no “boundary” separator inside body, so I get error “ultipart form parse error - Invalid boundary in multipart: None”. And now I need to change MultiPartParcer or create my own one
Problem 2:
My application don’t has standard views like “List Objects and show it as is in json/xml” or “Get Object and show it…”. So if my understandings of Django is right, there is no short way to use Django benefits if my needs are non-standard. So I need to create View by myself.
Problem 3:
My response must be as weird as request (xml, shift-jis, multipart/form-data, custom body). So I can’t use default Response class as is.
Problem 4:
Data validation logic is specific and I can’t use standard Django Admin model.
After thinking about it I decide that Django features and use ways are tight. I used Flask before and it was pretty customizable for specific tasks and easy for understanding (Django has tones of code that I need to understand for deep customizing and class overriding). I prefer Flask for specific tasks
But other members like Django and don’t understand Flask, so can you recommend, what will be better and speedy: try to learn Flask or try to customize Django for my tasks?
Sorry, my question is very bad and hard to do some recommendations, but I really confusing in this situation, so any hints and thoughts will be welcome.
Maybe my undestanding of Django fundamentals is still bad…
And, sorry for my English it is still not perfect yet.