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
// bootstrapify the default django-allauth forms | |
$('form p').replaceWith(function() { return '<div>' + this.innerHTML + '</div>'; }); | |
$('form input').each(function(index){ | |
$input = $(this) | |
var t = $input.attr('type') | |
if (t == 'text' || t == 'email' || t == 'password' || typeof t == 'undefined' ) { | |
$input.addClass('form-control') | |
$input.closest('div').addClass('form-group') | |
} | |
if (t == 'radio' || t == 'checkbox' ) { |
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
python manage.py shell |
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
<script src="https://gist.githubusercontent.com/Brachamul/e3a12e19ef00ba47c8ff/raw/ae9dc74e8b203b036f2a7a21f9aeb6a4a882860f/script.js"></script> |
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
{% extends request.is_ajax|yesno:"app/base_ajax.html,app/base.html" %} |
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
class Feature(models.Model): | |
# A feature is what occupies a slot, it can be a man-made constuct or natural terrain. | |
name = models.CharField(max_length=255) |
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.contrib import admin | |
# Register your models here. | |
from .models import Item, Feature, RequiredMaterial, DevelopmentProject | |
class ItemAdmin(admin.ModelAdmin): | |
model = Item |