4👍
✅
You can use the test client from Django. It’s very easy to use.
Example from Django docs:
>>> c = Client()
>>> with open('wishlist.doc') as fp:
... c.post('/customers/wishes/', {'name': 'fred', 'attachment': fp})
- [Django]-Formating Django Datetime objects outside template
- [Django]-Prefetching unrelated model on arbitrary field equivalence
Source:stackexchange.com