This file contains 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
Original urls.py: notice `pykaboo_django` | |
--------------------------------------------------------------------------------------------------- | |
from django.conf.urls.defaults import patterns, include, url | |
import pykaboo_django.core.views | |
from django.contrib import admin | |
admin.autodiscover() | |
urlpatterns = patterns('', (r'^$', pykaboo_django.core.views.home), (r'^home$', pykaboo_django.core.views.home), (r'^install$', pykaboo_django.core.views.install), (r'Install', pykaboo_django.core.views.install), url(r'^admin/', include(admin.site.urls)), | |
) |
This file contains 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
(env_pykaboo_django)~/django1.3_projects/pykaboo_django$ tree | |
. | |
├── core | |
│ ├── admin.py | |
│ ├── admin.pyc | |
│ ├── __init__.py | |
│ ├── __init__.pyc | |
│ ├── models.py | |
│ ├── models.pyc | |
│ ├── static |
This file contains 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
Tree I | |
app | |
└──├── core | |
├── __init__.py | |
├── manage.py | |
├── requirements.txt | |
├── settings.py | |
├── templates | |
└── urls.py |
This file contains 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.db import models | |
from django.contrib import admin | |
class DateTime(models.Model): | |
datetime = models.DateTimeField(auto_now_add = True) | |
def __unicode__(self): | |
return unicode(self.datetime) | |
class Item(models.Model): | |
name = models.CharField(max_length = 60) |
This file contains 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
Traceback (most recent call last): | |
File "ircex.py", line 55, in <module> | |
pyglet.app.run() | |
File "/usr/local/lib/python2.7/dist-packages/pyglet/app/__init__.py", line 264, in run | |
EventLoop().run() | |
File "/usr/local/lib/python2.7/dist-packages/pyglet/app/xlib.py", line 93, in run | |
sleep_time = self.idle() | |
File "/usr/local/lib/python2.7/dist-packages/pyglet/app/__init__.py", line 193, in idle | |
window.dispatch_event('on_draw') | |
File "/usr/local/lib/python2.7/dist-packages/pyglet/window/__init__.py", line 1219, in dispatch_event |
This file contains 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 pyglet | |
def sprite_type(type_ = "standing"): | |
if type_ == "moving-forward": | |
moving_forward_image_list = [pyglet.image.load('assassin2.png'), pyglet.image.load('assassin3.png')] | |
moving_forward_animation = pyglet.image.Animation.from_image_sequence(moving_forward_image_list, 0.3) | |
return moving_forward_animation | |
if type_ == "standing": | |
standing_animation = pyglet.image.load("assassin1.png") | |
return standing_animation |
This file contains 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 flask import Flask, render_template | |
app = Flask('flaskwp1') | |
#webcode = open('webcode.html').read() | |
@app.route('/') | |
def webprint(): | |
return render_template('webcode.html') | |
if __name__ == '__main__': |
This file contains 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 flask | |
app = flask.Flask('flaskwp1') | |
webcode = open('webcode.html').read() | |
@app.route('/') | |
def webprint(): | |
flask.url_for('static', filename='webcodestyle.css') | |
return webcode |
This file contains 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 flask | |
app = flask.Flask('flaskwp1') | |
webcode = open('webcode.html').read() | |
@app.route('/') | |
def webprint(): | |
return webcode | |
if __name__ == '__main__': |