Skip to content

Instantly share code, notes, and snippets.

from django.urls import include, path
from rest_framework import routers
from api import views
router = routers.DefaultRouter()
router.register(r'users', views.UserViewSet)
router.register(r'groups', views.GroupViewSet)
router.register(r'characters', views.CharacterViewSet)
# Setup automatic URL routing
@jwalt39
jwalt39 / App.js
Created September 12, 2020 20:22
import React, { Component } from "react";
import { render } from "react-dom";
import {
BrowserRouter as Router,
Switch,
Route,
Link,
Redirect,
withRouter,
} from "react-router-dom";
@jwalt39
jwalt39 / App.js
Created September 12, 2020 19:49
import React, { Component } from "react";
import { render } from "react-dom";
import {
BrowserRouter as Router,
Switch,
Route,
Link,
Redirect,
} from "react-router-dom";
import { AuthenticatedRoute, Login } from "./Authentication";