Integrate Google Sign-in (Popup method) with Nuxt.js - Works in Incognito mode as well
export default {
...
head: {
...| """ | |
| Find user/database entries within a km radius based on long/lat co-ords. | |
| i.e. return all objects where longlat lies within 10km of my current long/lat. | |
| Using with Django REST Framework but approach is same for any similar req. | |
| """ | |
| import math | |
| def get_queryset(self): | |
| user = self.request.user | |
| lat = self.request.query_params.get('lat', None) |
| version: '3' | |
| services: | |
| strapi: | |
| image: strapi/strapi | |
| environment: | |
| DATABASE_CLIENT: postgres | |
| DATABASE_NAME: strapi | |
| DATABASE_HOST: postgres | |
| DATABASE_PORT: 5432 | |
| DATABASE_USERNAME: strapi |
| methods: { | |
| uploadImage(event) { | |
| let img = new FormData(); | |
| img.append("avatar", event.target.files[0]); | |
| const base = { | |
| baseURL: this.$store.state.endpoints.baseUrl, | |
| headers: { | |
| // JWT token !!! | |
| Authorization: `JWT ${this.$store.state.jwt}`, | |
| "Content-Type": "multipart/form-data" |
| <v-btn | |
| color="green" | |
| x-small | |
| <!-- v-show="!$store.state.authUser.avatar" Iam using vuex to show the button when user is having no avatar--> | |
| outlined | |
| :loading="isSelecting" | |
| @click="onButtonClick" | |
| > | |
| <v-icon left>mdi-cloud-upload-outline</v-icon>upload picture | |
| </v-btn> |
| #docker version | |
| version: '3' | |
| services: | |
| web: | |
| #this sets build directory | |
| build: . | |
| #making migrations and fire up server | |
| command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py runserver 0.0.0.0:8000" | |
| container_name: music_api |
| # official Python runtime as a parent image | |
| FROM python:3.6 | |
| # enviroment variables | |
| ENV PYTHONUNBUFFERED 1 | |
| # create root directory | |
| RUN mkdir /music_api | |
| # Set the working directory |
| ⣿⣿⣿⣿⣿⣍⠀⠉⠻⠟⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ | |
| ⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ | |
| ⣿⣿⣿⣿⣿⣿⠓⠀⠀⢒⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ | |
| ⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⣿ | |
| ⣿⡿⠋⠋⠀⠀⠀⠀⠀⠀⠈⠙⠻⢿⢿⣿⣿⡿⣿⣿⡟⠋⠀⢀⣩ | |
| ⣿⣿⡄⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠈⠉⠛⢷⣭⠉⠁⣿⣿ | |
| ⣇⣀. jai hind ⠘⣿⣿⣿ ⣶⣿ | |
| ⣿⣄⠀⣰⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢀⣠⣿⣿⣿⣾⣿⣿⣿ | |
| ⣿⣿⣿⣿⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⢀⣠⣿⣿⣿⣿⣿⣿⣿⣿⣿ | |
| ⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀ ⠀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿ |
| import Vue from 'vue' | |
| import VueRouter from 'vue-router' | |
| import Signup from '../views/Signup.vue' | |
| import Portfolio from '@/components/Portfolio'; | |
| import Songs from '@/components/Songs' | |
| Vue.use(VueRouter) | |
| const routes = [ | |
| { |
| <template> | |
| <v-app> | |
| <v-app-bar | |
| app | |
| color="primary_bg" | |
| dark | |
| dense | |
| > | |
| <div class="d-flex align-center"> | |
| <v-toolbar-title>Ronix</v-toolbar-title> |