Skip to content

Instantly share code, notes, and snippets.

Avatar

Giorgi Jambazishvili Jambazishvili

View GitHub Profile
View django_auth_views.py
from django.http import HttpResponse
from django.http import JsonResponse
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.shortcuts import render
from django.shortcuts import render_to_response
from django.shortcuts import redirect
from django.views.generic import View
from django.views.generic import TemplateView
from django.views.generic import RedirectView
View django_auth_forms.py
from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import Account
class AccountForm(forms.ModelForm):
SEX_CHOICE = (
("U", _("Unspecified")),
("M", _("Male")),
("F", _("Female")),
View django_auth_models.py
from django.contrib.auth.models import AbstractBaseUser
from django.contrib.auth.models import BaseUserManager
from django.utils.translation import ugettext_lazy as _
from django.db import models
# Create your models here.
class AccountManager(BaseUserManager):
def create_user(self, email, password=None, **kwargs):
if not email:
View django_auth_urls.py
from django.contrib.auth.decorators import login_required
from django.conf.urls import url
from .views import HomeView
from .views import SigninView
from .views import SignupView
from .views import SignoutView
urlpatterns = [
url('^$', login_required(HomeView.as_view()), name='index'),
View GoogleTakeout.py
#imports
import os
import shutil
from tkinter import *
from fnmatch import fnmatch
from datetime import datetime
from threading import Thread
#global variables
takeoutPaths = []
You can’t perform that action at this time.