This file contains hidden or 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
from os import name | |
from django.db import models | |
#from django.contrib.auth.models import User | |
#this is the user model with my desire fields | |
# Create your models here. | |
class User(models.Model): | |
name = models.CharField(max_length=200, null=True, blank=True) | |
email = models.EmailField(max_length=200, null=True, blank=True) | |
occupation = models.CharField(max_length=200, null=True, blank=True) |
This file contains hidden or 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
class EngineeringAdmin(AdminSite): | |
site_header = "Circulation Engineering Admin" | |
def get_urls(self): | |
urls = super().get_urls() | |
uda_gps_events_urls = [ | |
url( | |
r'uda_gps_events/', | |
self.admin_view( | |
self.uda_gps_events_view |
This file contains hidden or 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
from django.core.mail import send_mail, send_mass_mail, EmailMultiAlternatives | |
from emailapp.models import SendIntroSignUpEmailModel, SendEmailModel | |
from django.template.loader import render_to_string, get_template | |
class SendEmailMessage: | |
def __init__(self, **kwargs): | |
if not kwargs['email']: | |
raise ValueError('Please include an object instance of SendEmailModel named email.') |
This file contains hidden or 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
class UserCreateView(generics.CreateAPIView): | |
parser_class = (FileUploadParser, FormParser, MultiPartParser) | |
serializer_class = UserFrontendSerializer | |
def create(self, request, *args, **kwargs): | |
serializer = self.get_serializer(data=request.data) | |
serializer.is_valid(raise_exception=True) | |
self.perform_create(serializer) |
This file contains hidden or 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
import React, { useEffect, useState } from 'react' | |
import { Wave } from 'better-react-spinkit' | |
// now-ui views | |
import ProfilePageHeader from '../components/Headers/ProfilePageHeader' | |
import IndexNavbar from '../components/Navbars/IndexNavbar' | |
import DarkFooter from '../components/Footers/DarkFooter' | |
// Reactstrap components |
This file contains hidden or 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
import React, { useState } from "react" | |
// localhost | |
import { localhost } from '../../backendConstants' | |
// components | |
import CreateAccountModal from '../../components/Modals/CreateAccountModal' | |
import NeedHelpModal from '../../components/Modals/NeedHelpModal' | |
// third party packages |
This file contains hidden or 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
import React, { Component } from 'react' | |
import { Route, Switch, Redirect } from "react-router-dom" | |
// now-ui import | |
import LoginPage from './examples/LoginPage' | |
import Index from './Index' | |
// user developed views | |
import HomePage from './HomePage' | |
import BlogPage from './BlogPage' |
This file contains hidden or 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
import React, { useState, useEffect } from 'react' | |
import { ChasingDots } from 'better-react-spinkit' | |
// reactstrap components | |
import { | |
Container, | |
Card, | |
CardBody, | |
Row, | |
Col, |
This file contains hidden or 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
import React, { useState, useEffect } from "react" | |
// reactstrap components | |
import { | |
Collapse, | |
DropdownToggle, | |
DropdownMenu, | |
DropdownItem, | |
UncontrolledDropdown, | |
NavbarBrand, |