Rename the minecraft app to profiles

This commit is contained in:
Trever Fischer
2012-02-18 15:39:50 -05:00
parent db6d0c29d8
commit 6c55e65226
10 changed files with 9 additions and 9 deletions

View File

View File

@@ -1,4 +0,0 @@
import models
from django.contrib import admin
admin.site.register(models.MinecraftProfile)
admin.site.register(models.Quote)

View File

@@ -1,7 +0,0 @@
import models
def random_quote(request):
quote = models.Quote.objects.order_by('?')
if len(quote) > 0:
return {'quote': quote[0]}
return {}

View File

@@ -1,15 +0,0 @@
from django.db import models
from django.contrib.auth.models import User
class MinecraftProfile(models.Model):
user = models.OneToOneField(User)
mc_username = models.CharField(max_length=30)
def __unicode__(self):
return self.mc_username
class Quote(models.Model):
text = models.CharField(max_length=50)
def __unicode__(self):
return self.text

View File

@@ -1,16 +0,0 @@
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)

View File

@@ -1,5 +0,0 @@
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('minecraft',
url(r'^profile$', 'views.profile', name='user_profile'),
)

View File

@@ -1,7 +0,0 @@
from django.contrib.auth.decorators import login_required
from django.shortcuts import render_to_response
from django.template import RequestContext
@login_required
def profile(request):
return render_to_response('minecraft/profile.html', context_instance = RequestContext(request))