Skip to content

Instantly share code, notes, and snippets.

View vovagod's full-sized avatar

Vladimir Godovalov vovagod

  • NLMK
  • Moscow
View GitHub Profile
@vovagod
vovagod / gist:6fa44f46d19af5a3a0bc88e44e3f54bb
Created September 17, 2019 14:24
angular code example
######################################## 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 {
@vovagod
vovagod / alles
Last active October 1, 2019 07:28
Just code exchange
# 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)
########### 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