Commit 12bdb625 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

organized imports in accounts app

parent 268815a1
from allauth.account.adapter import DefaultAccountAdapter
# standard library imports
from datetime import datetime, timedelta
# core django imports
from django.conf import settings
from django.shortcuts import resolve_url
from datetime import datetime, timedelta
# third party imports
from allauth.account.adapter import DefaultAccountAdapter
class AccountAdapter(DefaultAccountAdapter):
......
# core django imports
from django.contrib import admin
from accounts.models import Student, Major
# imports from your apps
from .models import Student, Major
# Register your models here.
admin.site.register(Major)
admin.site.register(Student)
# core django imports
from django.contrib.auth.models import User
from accounts.models import Student
from django.conf import settings
# third party imports
import requests
# imports from your apps
from .models import Student
def pfinfo(uname):
base_url = "http://peoplefinder.b1.akshaykarthik.com/"
......
# core django imports
from django import forms
# third party imports
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field, HTML
from crispy_forms.bootstrap import PrependedText, AppendedText, FormActions
from accounts.models import Student
# imports from your apps
from .models import Student
# form to create student
class StudentForm( forms.ModelForm ):
......
# standard library imports
import re
# third party imports
import requests
from bs4 import BeautifulSoup
import re
#import io
try:
page = requests.get('http://catalog.gmu.edu/content.php?catoid=25&navoid=4959')
......
# standard library imports
import hashlib
# core django imports
from django.db import models
from model_utils.models import TimeStampedModel
from django.contrib.auth.models import User
from autoslug import AutoSlugField
from django.core.urlresolvers import reverse
# third party imports
from autoslug import AutoSlugField
from allauth.socialaccount.models import SocialAccount
# imports from your apps
from housing.models import Building, Room, Class
from allauth.socialaccount.models import SocialAccount
import hashlib
class Major(TimeStampedModel):
name = models.CharField(max_length = 50)
......
# standard libary imports
import datetime
# third party imports
from haystack import indexes
# imports from your apps
from .models import Student
class StudentIndex(indexes.SearchIndex, indexes.Indexable):
# search results
......
# core django imports
from django.test import TestCase
# Create your tests here.
# core django imports
from django.conf.urls import patterns, include, url
from accounts.views import DetailStudent, UpdateStudent, DetailStudentSettings, DetailCurrentStudent, DetailCurrentStudentSettings, UpdateStudentMajor
from accounts.models import Student
# imports from your apps
from .views import DetailStudent, UpdateStudent, DetailStudentSettings,\
DetailCurrentStudent, DetailCurrentStudentSettings, UpdateStudentMajor
from .models import Student
urlpatterns = patterns('',
......
# core django imports
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponseForbidden
from django.views.generic import DetailView, ListView, UpdateView, UpdateView, DeleteView
from accounts.models import Student
# third party imports
from braces.views import LoginRequiredMixin
# imports from your apps
from .models import Student
# update a student (students are *created* on first login via CAS)
class UpdateStudent(LoginRequiredMixin, UpdateView):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment