Basic Vue Router Example using Official Vue Router plugin
Libraries used Vuejs : http://vuejs.org/ Vue-Router: https://github.com/vuejs/vue-router/
A Pen by Timothy Olaleke on CodePen.
| package supercat1; | |
| import java.awt.*; | |
| import java.awt.event.*; | |
| import javax.swing.*; // Using Swing components and containers | |
| import java.util.Timer | |
| // A Swing application extends javax.swing.JFrame | |
| public class supercat1 extends JFrame { | |
| private JTextField tfCount; | |
| // Use Swing's JTextField instead of AWT's TextField |
| #!/usr/bin/python | |
| import curses | |
| import random | |
| stdscr = curses.initscr() | |
| curses.noecho() | |
| curses.cbreak() | |
| stdscr.keypad(1) | |
| curses.halfdelay(1) |
| <div id="vueApp"> | |
| <header> | |
| <div class="wrapper"> | |
| <h1>Vue-Resource</h1> | |
| <a href="#" class="btn" @click.stop="loadUsers">Load Users</a> | |
| </div> | |
| </header> | |
| <div class="posts"> |
Basic Vue Router Example using Official Vue Router plugin
Libraries used Vuejs : http://vuejs.org/ Vue-Router: https://github.com/vuejs/vue-router/
A Pen by Timothy Olaleke on CodePen.
| <script type="text/x-template" id="dropdown-template"> | |
| <div class="dropdown" v-show="show" v-bind:class="originClass" transition="dropdown"> | |
| <slot>No dropdown content!</slot> | |
| </div> | |
| </script> | |
| <script type="text/x-template" id="datagrid-template"> | |
| <table id="{{ id }}" class="table-striped datagrid"> | |
| <thead> | |
| <tr> |
| import weather | |
| import smtp | |
| ''' | |
| Send a greeting email to our customer email list | |
| with the daily weather forecast and schedule | |
| ''' | |
| def get_emails(): | |
| # Reading emails from a file |
| ''' | |
| Add CORS headers for tastypie APIs | |
| Usage: | |
| class MyModelResource(CORSModelResource): | |
| ... | |
| class MyResource(CORSResource): | |
| ... | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Vue Axios Example</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.4.2/vue.js"></script> | |
| <script src="https://unpkg.com/axios/dist/axios.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="app"> | |
| <ul> |
| <div id="app"> | |
| <h2>Firebase List</h2> | |
| <div v-for="item in items" class="item"> | |
| <button @click="removeItem(item)">×</button> {{item.value}} <small>{{new Date(item.ts).toGMTString()}}</small> | |
| </div> | |
| <div> | |
| <form><input v-model="tempItem"><button @click="addItem(tempItem); tempItem = ''" :disabled="tempItem===''"> + </button> </form> | |
| </div> | |
| </div> |
Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"
I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)
Main features: