These are chat archives for django/django
@sabin20 I do not know about react but in angular you need to run a different server for the client app and the django app. Yyou only need to create a consumable Rest Api using django-rest-framework which i prefer in your back end, map that endpoint for your client to consume via http request.
The main architecture here is to separate the client side to server side. Do not use a single app although this is also possible (tried it in angular but i prefer to seperate server from client side). It is also possible for mobile app to consume those apis thats another benefits. But make sure to look out for CORS but django-cors-header has a solution for that.
It means setting up a SPA like angular/react with django means you have to give up the templating engine of django, you give up using the traditional workflow of django. But that is not an issue. You only need to use django to list, create, delete, update, view a record. Rest API is merely a representation (GET) and manupulation (POST) of data.
It is very easy. I suppose looking to google, there are bunch of guys that already did that, you can also talk to @elcolie saw his repo in github to be a react guy.
This code works on local host but not on pythonanywhere. I am trying to download the displayed db. Anyone?
def downloadChemical(request): response = HttpResponse(content_type='text/csv') response['Content-Disposition'] = 'attachment; filename=operator.csv' writer = csv.writer(response) writer.writerow(["Date", "Time", "Operator", "Innoculant", "Drying Agent Required", "Actual Drying Agent"]) operator_name = request.session['operator'] comp_data = db.get(request.session['uid']).each() count = 0 operators =  for chota_db in comp_data: if count == 1: operator = chota_db.val() break else: count += 1 for key, value in operator.items(): for k, v in value.items(): if v['operatorId'] == operator_name: writer.writerow([str(key), str(k), str(v['operatorId']), str(v['innoculant']), str(v["dryingAgentRequired"]), str(v["dryingAgentActual"])]) return response