fix
This commit is contained in:
parent
8af3e6cfb7
commit
bed195770e
@ -180,7 +180,7 @@ def login_status(request):
|
||||
"last_name": user.profile.last_name,
|
||||
"address": user.profile.address,
|
||||
"racers": [{
|
||||
"invoice_id": racer.invoice.invoice_id,
|
||||
"invoice_id": racer.invoice_id,
|
||||
"first_name": racer.first_name,
|
||||
"last_name": racer.last_name,
|
||||
"email": racer.email,
|
||||
@ -331,6 +331,7 @@ def payment_state(request):
|
||||
def products(request):
|
||||
return HttpResponse(json.dumps([
|
||||
{
|
||||
'id': product.id,
|
||||
'name': product.name,
|
||||
'description': product.description,
|
||||
'img': product.img.url,
|
||||
|
@ -25,6 +25,7 @@ class Main extends Component {
|
||||
gallery_open: undefined,
|
||||
page: window.location.hash,
|
||||
photos: [],
|
||||
products: [],
|
||||
photoIsOpen: false,
|
||||
progress: false,
|
||||
currentImage: 0,
|
||||
@ -37,6 +38,9 @@ class Main extends Component {
|
||||
fetch(addr_prefix + "/api/photos").then(resp => resp.json()).then(json => {
|
||||
this.setState({photos: json})
|
||||
})
|
||||
fetch(addr_prefix + "/api/products").then(resp => resp.json()).then(json => {
|
||||
this.setState({products: json})
|
||||
})
|
||||
fetch(addr_prefix + "/api/login_status").then(resp => resp.json()).then(json => {
|
||||
this.setState({login_status: json})
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user