This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# backend/trade/views.py | |
from django.shortcuts import render_to_response | |
from django.http import JsonResponse | |
from geopy import distance | |
from . models import Store, StoreType | |
def google_map(request, obj): | |
our_store = Store.objects.get(id=obj) | |
fields = Store.objects.list_stores(obj) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## control.js script ############################################### | |
var meter; | |
var settick1; | |
var offsetsorted = []; | |
// Angular script for control module | |
var app = angular.module('myApp', []); | |
app.factory('asinc', function($http) { | |
return { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########### backend code example, views module, Python 3.5, Django 2.0 ################### | |
@login_required(redirect_field_name='registration/login') | |
def Device(request, system=None, controltype=None): | |
#print("ARXIV_SOBYTIY: {}".format(settings.EMAIL)) | |
#user_language = 'en' | |
#translation.activate(user_language) | |
#request.session[translation.LANGUAGE_SESSION_KEY] = user_language |