Rename the minecraft app to profiles
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
import models
|
||||
from django.contrib import admin
|
||||
admin.site.register(models.MinecraftProfile)
|
||||
admin.site.register(models.Quote)
|
@@ -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 {}
|
@@ -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
|
@@ -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)
|
@@ -1,5 +0,0 @@
|
||||
from django.conf.urls.defaults import patterns, include, url
|
||||
|
||||
urlpatterns = patterns('minecraft',
|
||||
url(r'^profile$', 'views.profile', name='user_profile'),
|
||||
)
|
@@ -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))
|
Reference in New Issue
Block a user