mirror of https://github.com/fspc/workstand.git
Drew Larson
8 years ago
6 changed files with 49 additions and 2 deletions
@ -0,0 +1,22 @@ |
|||||
|
import React from 'react'; |
||||
|
import ReactDOM from 'react-dom'; |
||||
|
import injectTapEventPlugin from 'react-tap-event-plugin'; |
||||
|
|
||||
|
// Needed for onTouchTap |
||||
|
// http://stackoverflow.com/a/34015469/988941 |
||||
|
injectTapEventPlugin(); |
||||
|
|
||||
|
|
||||
|
class App extends React.Component { |
||||
|
render() { |
||||
|
return ( |
||||
|
<div className="mdl-grid"> |
||||
|
<div className="mdl-cell mdl-cell--12-col"> |
||||
|
<h1>Bikes</h1> |
||||
|
</div> |
||||
|
</div> |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
ReactDOM.render(<App />, document.getElementById('root')); |
@ -0,0 +1,7 @@ |
|||||
|
{% extends 'dashboard.html' %} |
||||
|
{% load render_bundle from webpack_loader %} |
||||
|
{% block content %} |
||||
|
<div id="root"></div> |
||||
|
{% render_bundle 'webpack' %} |
||||
|
{% render_bundle 'bikes' %} |
||||
|
{% endblock %} |
@ -0,0 +1,7 @@ |
|||||
|
from django.conf.urls import url |
||||
|
|
||||
|
from .views import BikesView |
||||
|
|
||||
|
urlpatterns = [ |
||||
|
url(r'^$', BikesView.as_view(), name='bikes') |
||||
|
] |
@ -1,3 +1,11 @@ |
|||||
from django.shortcuts import render |
from django.contrib.auth.decorators import login_required |
||||
|
from django.utils.decorators import method_decorator |
||||
|
from django.views.generic import TemplateView |
||||
|
|
||||
# Create your views here. |
|
||||
|
@method_decorator(login_required, name='dispatch') |
||||
|
class BikesView(TemplateView): |
||||
|
template_name = 'bikes.html' |
||||
|
|
||||
|
def get(self, request): |
||||
|
return self.render_to_response({}) |
||||
|
Loading…
Reference in new issue