# HG changeset patch # User Brian Neal # Date 1333832331 18000 # Node ID 0176eca97d1d9f612a3eb12c4e3c10a8fbeffa9c # Parent d958e59d6fc682c2a9936d9f336b03a1d60d71ee In the middle of revamping the band application. Moved the base and home templates out of the band directory. Started hacking on the band models, finally getting rid of older models and views. Not everything works yet in this commit. diff -r d958e59d6fc6 -r 0176eca97d1d madeira/band/admin.py --- a/madeira/band/admin.py Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/band/admin.py Sat Apr 07 15:58:51 2012 -0500 @@ -4,189 +4,80 @@ """ from django.contrib import admin -from band.models import Article from band.models import Album -from band.models import Album_Merchant -from band.models import Album_Track -from band.models import Band -from band.models import City -from band.models import Country -from band.models import Fan +from band.models import AlbumMerchant +from band.models import AlbumTrack from band.models import Gear -from band.models import Gig -from band.models import Label_Release +from band.models import LabelRelease from band.models import Member from band.models import Merchandise -from band.models import Mp3 -from band.models import Mp3_Set -from band.models import News -from band.models import Record_Label -from band.models import State -from band.models import Venue -from band.models import Video -from band.models import Video_Set +from band.models import RecordLabel class GearInline(admin.TabularInline): - model = Gear + model = Gear class GearAdmin(admin.ModelAdmin): - list_display = ('item', 'member') - list_filter = ('member', ) + list_display = ['item', 'member'] + list_filter = ['member'] class MemberAdmin(admin.ModelAdmin): - list_display = ('name', 'instrument', 'is_active') - inlines = [ - GearInline, - ] + list_display = ['name', 'instrument', 'is_active'] + inlines = [GearInline] -class CityInline(admin.TabularInline): - model = City +class AlbumTrackInline(admin.TabularInline): + model = AlbumTrack -class CityAdmin(admin.ModelAdmin): - list_display = ('name', 'state', 'country') - list_filter = ('state', ) - search_fields = ('name', ) +class AlbumTrackAdmin(admin.ModelAdmin): + list_display = ['track_name', 'album'] + list_filter = ['album'] -class StateAdmin(admin.ModelAdmin): - inlines = [ - CityInline, - ] +class LabelReleaseInline(admin.TabularInline): + model = LabelRelease -class VenueAdmin(admin.ModelAdmin): - list_filter = ('city', ) - list_display = ('name', 'city', ) - search_fields = ('name', ) +class LabelReleaseAdmin(admin.ModelAdmin): + list_display = ['catalog_number', 'album', 'record_label', 'release_date'] + list_filter = ['record_label', 'album'] -class BandAdmin(admin.ModelAdmin): - search_fields = ('name', ) +class RecordLabelAdmin(admin.ModelAdmin): + inlines = [LabelReleaseInline] -class GigAdmin(admin.ModelAdmin): - list_filter = ('date', 'venue') - save_on_top = True - filter_horizontal = ('bands', ) +class AlbumMerchantInline(admin.TabularInline): + model = AlbumMerchant -class NewsAdmin(admin.ModelAdmin): - save_on_top = True - list_filter = ('date', ) - list_display = ('date', 'title') - search_fields = ('text', 'title') - - -class ArticleAdmin(admin.ModelAdmin): - save_on_top = True - list_filter = ('date', ) - list_display = ('title', 'date') - search_fields = ('text', 'title') - - -class Mp3Inline(admin.TabularInline): - model = Mp3 - - -class Mp3Admin(admin.ModelAdmin): - prepopulated_fields = {'slug' : ('title', 'desc')} - - -class Mp3_SetAdmin(admin.ModelAdmin): - list_filter = ('date', ) - list_display = ('title', 'date') - inlines = [ - Mp3Inline, - ] - - -class VideoInline(admin.TabularInline): - model = Video - - -class Video_SetAdmin(admin.ModelAdmin): - list_filter = ('date', ) - list_display = ('title', 'date') - inlines = [ - VideoInline, - ] - - -class Album_TrackInline(admin.TabularInline): - model = Album_Track - - -class Album_TrackAdmin(admin.ModelAdmin): - list_display = ('track_name', 'album') - list_filter = ('album', ) - - -class Label_ReleaseInline(admin.TabularInline): - model = Label_Release - - -class Label_ReleaseAdmin(admin.ModelAdmin): - list_display = ('catalog_number', 'album', 'record_label', 'release_date') - list_filter = ('record_label', 'album') - - -class Record_LabelAdmin(admin.ModelAdmin): - inlines = [ - Label_ReleaseInline, - ] - - -class Album_MerchantInline(admin.TabularInline): - model = Album_Merchant - - -class Album_MerchantAdmin(admin.ModelAdmin): - list_display = ('name', 'album') - list_filter = ('album', ) +class AlbumMerchantAdmin(admin.ModelAdmin): + list_display = ['name', 'album'] + list_filter = ['album'] class AlbumAdmin(admin.ModelAdmin): - save_on_top = True - inlines = [ - Album_TrackInline, - Label_ReleaseInline, - Album_MerchantInline, - ] + save_on_top = True + inlines = [ + AlbumTrackInline, + LabelReleaseInline, + AlbumMerchantInline, + ] class MerchandiseAdmin(admin.ModelAdmin): - list_display = ('name', 'price', 'in_stock') - list_filter = ('in_stock', ) + list_display = ['name', 'price', 'in_stock'] + list_filter = ['in_stock'] -class FanAdmin(admin.ModelAdmin): - list_display = ('name', 'email', 'current_status') - search_fields = ('name', 'email') - - -admin.site.register(Video) admin.site.register(Gear, GearAdmin) admin.site.register(Member, MemberAdmin) -admin.site.register(City, CityAdmin) -admin.site.register(Country) -admin.site.register(State, StateAdmin) -admin.site.register(Venue, VenueAdmin) -admin.site.register(Band, BandAdmin) -admin.site.register(Gig, GigAdmin) -admin.site.register(News, NewsAdmin) -admin.site.register(Article, ArticleAdmin) -admin.site.register(Mp3, Mp3Admin) -admin.site.register(Mp3_Set, Mp3_SetAdmin) -admin.site.register(Video_Set, Video_SetAdmin) -admin.site.register(Album_Track, Album_TrackAdmin) -admin.site.register(Label_Release, Label_ReleaseAdmin) -admin.site.register(Record_Label, Record_LabelAdmin) -admin.site.register(Album_Merchant, Album_MerchantAdmin) +admin.site.register(AlbumTrack, AlbumTrackAdmin) +admin.site.register(LabelRelease, LabelReleaseAdmin) +admin.site.register(RecordLabel, RecordLabelAdmin) +admin.site.register(AlbumMerchant, AlbumMerchantAdmin) admin.site.register(Album, AlbumAdmin) admin.site.register(Merchandise, MerchandiseAdmin) -admin.site.register(Fan, FanAdmin) diff -r d958e59d6fc6 -r 0176eca97d1d madeira/band/admin_views.py --- a/madeira/band/admin_views.py Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -""" -Admin views for the Madeira website. - -""" -from django import forms -from django.core.urlresolvers import reverse -from django.core.mail import EmailMessage -from django.template import RequestContext -from django.http import HttpResponseRedirect -from django.shortcuts import render_to_response -from django.contrib.admin.views.decorators import staff_member_required -from django.conf import settings - -from band.models import Fan - -####################################################################### - -unsubscribeText = ''' - ----- -You are receiving this message because you are subscribed to our mailing list. -If you would like to unsubscribe please visit %s. -''' - -####################################################################### - -class EmailForm(forms.Form): - subject = forms.CharField(max_length=255, required=True, label='Subject:', - widget=forms.TextInput(attrs={'class': 'vTextField required', 'size': '60'})) - message = forms.CharField(label='Message:', - widget=forms.Textarea(attrs={'class': 'vLargeTextField required'})) - -####################################################################### - -def email_sent(request): - return render_to_response('admin/band/email_sent.html', {}, - context_instance=RequestContext(request)) - -####################################################################### - -def email(request): - - config = settings.BAND_CONFIG - bandTag = '[%s] ' % config['BAND_NAME'] - - if request.method == 'POST': - form = EmailForm(request.POST) - if form.is_valid(): - subject = form.cleaned_data['subject'] - message = form.cleaned_data['message'] - - unsubscribe_url = "http://%s%s" % (config['BAND_DOMAIN'], - reverse('band-mail')) - - footer = unsubscribeText % unsubscribe_url - message += footer - - bcc = list(Fan.objects.values_list('email', flat=True)) - - email = EmailMessage(subject, message, config['BAND_EMAIL'], - [config['BAND_EMAIL']], bcc) - email.send() - return HttpResponseRedirect(reverse(email_sent)) - - else: - form = EmailForm(initial={'subject': bandTag}) - - return render_to_response('admin/band/email.html', - {'form': form }, - context_instance=RequestContext(request)) - -email = staff_member_required(email) diff -r d958e59d6fc6 -r 0176eca97d1d madeira/band/models.py --- a/madeira/band/models.py Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/band/models.py Sat Apr 07 15:58:51 2012 -0500 @@ -1,376 +1,111 @@ +""" +Models for the band application. + +""" from django.db import models -from django.contrib.localflavor.us.models import USStateField -from django.contrib.localflavor.us.models import PhoneNumberField from photologue.models import Photo -import datetime -import random -import string -####################################################################### class Member(models.Model): - name = models.CharField(max_length = 50, db_index = True) - nickname = models.CharField(max_length = 50, blank = True) - instrument = models.CharField(max_length = 255) - bio = models.TextField(blank = True) - photo = models.FileField(upload_to = 'images/bio/', blank = True) - order = models.SmallIntegerField(help_text = '''Controls order of display on the bio page, lower numbers displayed - first''') - is_active = models.BooleanField(db_index = True) - start_date = models.DateField() - end_date = models.DateField(blank = True, help_text = 'Only used if the member is not active', - default = datetime.date(1985, 1, 1)) - email = models.EmailField() - - def __unicode__(self): - return self.name - - class Meta: - ordering = ('-is_active', 'name') - -####################################################################### - -class Gear(models.Model): - member = models.ForeignKey(Member) - item = models.CharField(max_length = 255) - - def __unicode__(self): - return self.item - - class Meta: - verbose_name_plural = 'Gear List' - -####################################################################### - -class Country(models.Model): - name = models.CharField(max_length=64) - - class Meta: - ordering = ('name', ) - verbose_name_plural = 'Countries' + name = models.CharField(max_length=50) + nickname = models.CharField(max_length=50, blank=True) + instrument = models.CharField(max_length=255) + bio = models.TextField(blank=True) + photo = models.ImageField(upload_to='images/bio/', blank=True) + order = models.SmallIntegerField( + help_text = "Controls order of display; lower numbers displayed first") + is_active = models.BooleanField() + start_date = models.DateField() + end_date = models.DateField(blank=True, + null=True, + help_text="Only used if the member is not active") + email = models.EmailField() def __unicode__(self): return self.name -####################################################################### + class Meta: + ordering = ['-is_active', 'name'] -class State(models.Model): - name = models.CharField(max_length = 16) - abbrev = USStateField() - class Meta: - ordering = ('name', ) +class Gear(models.Model): + member = models.ForeignKey(Member) + item = models.CharField(max_length=255) - def __unicode__(self): - return self.name + def __unicode__(self): + return self.item -####################################################################### + class Meta: + verbose_name_plural = 'Gear List' -class City(models.Model): - name = models.CharField(max_length = 50) - state = models.ForeignKey(State, null = True, blank = True) - country = models.ForeignKey(Country, null=True, blank=True) - class Meta: - verbose_name_plural = 'Cities' - ordering = ('name', ) +class RecordLabel(models.Model): + name = models.CharField(max_length=64) + url = models.URLField(verify_exists=False, max_length=200) - def __unicode__(self): - if self.state: - return self.name + u', ' + self.state.abbrev - return self.name + def __unicode__(self): + return self.name -####################################################################### - -class Venue(models.Model): - name = models.CharField(max_length = 50, db_index = True) - url = models.URLField(verify_exists = False, blank = True) - address = models.CharField(max_length = 255, blank = True) - phone = PhoneNumberField(help_text = "Format: XXX-XXX-XXXX", blank = True) - city = models.ForeignKey(City) - - class Meta: - ordering = ('name', ) - - def __unicode__(self): - return self.name - -####################################################################### - -class Band(models.Model): - name = models.CharField(max_length = 64) - url = models.URLField(verify_exists = False, blank = True) - - class Meta: - ordering = ('name', ) - - def __unicode__(self): - return self.name - -####################################################################### - -class Gig(models.Model): - title = models.CharField(max_length = 50, blank = True, help_text = "Optional; e.g. Some Festival") - url = models.URLField(verify_exists = False, blank = True, help_text = "Optional; e.g. Some Festival's Website") - date = models.DateField(db_index = True) - time = models.TimeField(null = True, blank = True) - venue = models.ForeignKey(Venue, null = True, blank = True) - notes = models.TextField(blank = True) - bands = models.ManyToManyField(Band, blank = True) - flyer = models.ForeignKey(Photo, null = True, blank = True) - - def __unicode__(self): - if self.title: - return u'%s %s %s' % (self.date.strftime('%m/%d/%Y'), self.title, self.venue.name) - elif self.venue: - return u'%s %s' % (self.date.strftime('%m/%d/%Y'), self.venue.name) - else: - return u'' + self.date.strftime('%m/%d/%Y') - - class Meta: - ordering = ('-date', 'time') - -####################################################################### - -class News(models.Model): - title = models.CharField(max_length = 64, blank = True) - date = models.DateField(db_index = True) - author = models.CharField(max_length = 50, blank = True) - text = models.TextField() - markup_enabled = models.BooleanField(default = True, - help_text = 'Check this box to allow Textile style markup in the text field') - photo = models.FileField(upload_to = 'images/news/%Y/%m/%d/', blank = True) - photo_caption = models.CharField(max_length = 50, blank = True) - - def __unicode__(self): - return u'%s %s' % (self.date.strftime('%m/%d/%Y'), self.title) - - class Meta: - ordering = ('-date', ) - verbose_name_plural = "News" - -####################################################################### - -class Article(models.Model): - title = models.CharField(max_length = 64) - date = models.DateField(db_index = True) - text = models.TextField() - markup_enabled = models.BooleanField(default = True, - help_text = 'Check this box to allow Textile style markup in the text field') - source = models.TextField(help_text = '''Enter the source/author for the article, copyright info, etc; it will appear under - the article.''') - url = models.URLField(blank = True, help_text = 'Link to original article; optional') - pdf = models.FileField(upload_to = 'pdf/articles/%Y/%m/%d/', blank = True, - help_text = '''If you want to make the original article available as a PDF download, you may upload it - here.''') - - def __unicode__(self): - return self.title - - class Meta: - ordering = ('date', ) - -####################################################################### - -class Mp3_Set(models.Model): - date = models.DateField(auto_now_add = True, editable = False) - title = models.CharField(max_length = 64) - text = models.TextField() - - def __unicode__(self): - return self.title - - class Meta: - ordering = ('date', ) - verbose_name = "MP3 Set" - -####################################################################### - -class Mp3(models.Model): - mp3_set = models.ForeignKey(Mp3_Set) - title = models.CharField(max_length = 64) - desc = models.CharField(max_length = 128, blank = True) - file = models.FileField(upload_to = 'mp3s/%Y/%m/%d/') - slug = models.SlugField(unique = True) - - def __unicode__(self): - return self.title - - class Meta: - ordering = ('title', ) - verbose_name = "MP3" - -####################################################################### - -class Video_Set(models.Model): - date = models.DateField(blank=True) - title = models.CharField(max_length = 64) - text = models.TextField() - - def __unicode__(self): - return self.title - - class Meta: - ordering = ('date', ) - verbose_name = "Video Set" - - def save(self, *args, **kwargs): - if not self.id: - self.date = datetime.date.today() - - super(Video_Set, self).save(*args, **kwargs) - -####################################################################### - -class Video(models.Model): - video_set = models.ForeignKey(Video_Set) - title = models.CharField(max_length = 64) - embed_code = models.CharField(max_length = 1024) - - def __unicode__(self): - return self.title - - class Meta: - ordering = ('title', ) - -####################################################################### - -class Record_Label(models.Model): - name = models.CharField(max_length = 64) - url = models.URLField(verify_exists = False, max_length = 200) - - def __unicode__(self): - return self.name - - class Meta: - verbose_name = 'Record Label' - -####################################################################### class Album(models.Model): - title = models.CharField(max_length = 64) - photo = models.ForeignKey(Photo) - desc = models.TextField(blank = True) + title = models.CharField(max_length=64) + photo = models.ForeignKey(Photo) + desc = models.TextField(blank=True) - def __unicode__(self): - return self.title + def __unicode__(self): + return self.title - class Meta: - pass -####################################################################### +class AlbumTrack(models.Model): + album = models.ForeignKey(Album) + track_number = models.SmallIntegerField() + track_name = models.CharField(max_length=64) -class Album_Track(models.Model): - album = models.ForeignKey(Album) - track_number = models.SmallIntegerField() - track_name = models.CharField(max_length = 64) + def __unicode__(self): + return self.track_name - def __unicode__(self): - return self.track_name + class Meta: + verbose_name = 'Album Track' + ordering = ['album', 'track_number'] - class Meta: - verbose_name = 'Album Track' - ordering = ('album', 'track_number', ) -####################################################################### +class LabelRelease(models.Model): + record_label = models.ForeignKey(RecordLabel) + album = models.ForeignKey(Album) + catalog_number = models.CharField(max_length=32) + release_date = models.DateField() -class Label_Release(models.Model): - record_label = models.ForeignKey(Record_Label) - album = models.ForeignKey(Album) - catalog_number = models.CharField(max_length = 32) - release_date = models.DateField() + def __unicode__(self): + return u'%s %s %s' % (self.record_label.name, self.album.title, + self.catalog_number) - def __unicode__(self): - return u'%s %s %s' % (self.record_label.name, self.album.title, self.catalog_number) + class Meta: + verbose_name = 'Label Release' - class Meta: - verbose_name = 'Label Release' -####################################################################### +class AlbumMerchant(models.Model): + album = models.ForeignKey(Album) + name = models.CharField(max_length=64) + url = models.URLField(verify_exists=False, max_length=200) -class Album_Merchant(models.Model): - album = models.ForeignKey(Album) - name = models.CharField(max_length = 64) - url = models.URLField(verify_exists = False, max_length = 200) + def __unicode__(self): + return u'%s (%s)' % (self.name, self.album.title) - def __unicode__(self): - return u'%s (%s)' % (self.name, self.album.title) + class Meta: + verbose_name = 'Album Merchant' + ordering = ['name'] - class Meta: - verbose_name = 'Album Merchant' - ordering = ('name', ) - -####################################################################### class Merchandise(models.Model): - name = models.CharField(max_length = 64) - desc = models.TextField() - price = models.DecimalField(max_digits = 5, decimal_places = 2) - in_stock = models.BooleanField() - photo = models.ForeignKey(Photo) + name = models.CharField(max_length=64) + desc = models.TextField() + price = models.DecimalField(max_digits=5, decimal_places=2) + in_stock = models.BooleanField() + photo = models.ForeignKey(Photo) - def __unicode__(self): - return self.name + def __unicode__(self): + return self.name - class Meta: - verbose_name_plural = "Merchandise" - -####################################################################### - -class Fan(models.Model): - statusCodes = (('P', 'Pending'), ('A', 'Active'), ('L', 'Leaving')) - keyLength = 16 - - name = models.CharField(max_length = 32, blank = True) - email = models.EmailField(db_index = True) - location = models.CharField(max_length = 64, blank = True) - status = models.CharField(max_length = 1, choices = statusCodes, default = 'A', - editable = False, db_index = True) - key = models.CharField(max_length = keyLength, editable = False, blank = True, db_index = True) - status_date = models.DateField(default = datetime.date.today, editable = False, db_index = True) - - def __unicode__(self): - if self.name: - return u'%s <%s>' % (self.name, self.email) - return self.email - - class Meta: - ordering = ('name', 'email') - - def setPending(self): - self.status = 'P' - self.status_date = datetime.date.today() - self.genKey() - - def setActive(self): - self.status = 'A' - self.status_date = datetime.date.today() - - def setLeaving(self): - self.status = 'L' - self.status_date = datetime.date.today() - self.genKey() - - def isPending(self): - return self.status == 'P' - - def isLeaving(self): - return self.status == 'L' - - def isActive(self): - return self.status == 'A' - - def current_status(self): - if self.status == 'P': - return 'Pending' - elif self.status == 'L': - return 'Leaving' - elif self.status == 'A': - return 'Active' - else: - return 'Unknown' - - def genKey(self): - self.key = ''.join(random.sample(string.ascii_letters + string.digits, self.keyLength)) - + class Meta: + verbose_name_plural = "Merchandise" diff -r d958e59d6fc6 -r 0176eca97d1d madeira/band/urls.py --- a/madeira/band/urls.py Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/band/urls.py Sat Apr 07 15:58:51 2012 -0500 @@ -1,28 +1,9 @@ from django.conf.urls.defaults import patterns, url urlpatterns = patterns('band.views', - (r'^$', 'index'), (r'^bio/$', 'bio'), (r'^buy/$', 'buy'), (r'^contact/$', 'contact'), - (r'^gigs_old/$', 'gigs'), - (r'^gigs_old/flyers$', 'flyers'), - url(r'^mail_old/$', 'mail', name='band-mail'), - url(r'^mail_old/confirm/([a-zA-Z0-9]+)$', 'mail_confirm', name='band-mail_confirm'), - (r'^mail_old/not_found$', 'mail_not_found'), - (r'^mail_old/thanks$', 'mail_thanks'), - (r'^mail_old/unsubscribe$', 'mail_unsubscribe'), - (r'^news_old/$', 'news'), (r'^photos/$', 'photos_index'), (r'^photos/(\d+)$', 'photo_detail'), - (r'^press_old/$', 'press_index'), - (r'^press_old/(\d+)$', 'press_detail'), - (r'^songs_old/$', 'songs'), - (r'^videos_old/$', 'videos_index'), - (r'^videos_old/(\d+)$', 'video_detail'), ) - -urlpatterns += patterns('band.admin_views', - (r'^admin/band/email/$', 'email'), - (r'^admin/band/email_sent/$', 'email_sent'), -) diff -r d958e59d6fc6 -r 0176eca97d1d madeira/band/views.py --- a/madeira/band/views.py Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/band/views.py Sat Apr 07 15:58:51 2012 -0500 @@ -2,52 +2,17 @@ Views for the band application. """ -import collections -import datetime import random -from django import forms -from django.core.urlresolvers import reverse -from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.shortcuts import get_object_or_404 from django.template import RequestContext -from django.template.loader import render_to_string -from django.core.mail import send_mail -from django.db import connection -from django.conf import settings -from band.models import Article -from band.models import Album -from band.models import Band -from band.models import Fan -from band.models import Gig from band.models import Member from band.models import Merchandise -from band.models import Mp3_Set -from band.models import News -from band.models import Video_Set from photologue.models import Gallery from photologue.models import Photo -####################################################################### - -def index(request): - carpe = Photo.objects.get(title_slug = 'carpe-noctem') - sandstorm = Photo.objects.get(title_slug = 'sandstorm-cover') - ruins = Photo.objects.get(title_slug = 'ruins-cover') - - upcomingDates = Gig.objects.filter(date__gte = datetime.date.today).order_by('date')[:5] - - return render_to_response('band/index.html', { - 'carpe' : carpe, - 'sandstorm' : sandstorm, - 'ruins' : ruins, - 'upcomingDates' : upcomingDates, - }, - context_instance = RequestContext(request)) - -####################################################################### def bio(request): members = Member.objects.exclude(is_active__exact = 0) @@ -56,109 +21,6 @@ { 'members' : members, }, context_instance = RequestContext(request)) -####################################################################### - -def gigs(request): - today = datetime.date.today() - gigs = Gig.objects.select_related('venue', 'flyer', 'venue__city', - 'venue__city__state', 'venue__city__country') - upcoming = [] - previous = [] - - # To avoid many, many database hits in the template, we get all the - # bands out at once. We also get the many-to-many intermediate table - # that Django generated for us so we can associate bands to gigs. - # Since we don't know about this table we drop into raw SQL to get - # the contents. - - bands = dict((band.id, band) for band in Band.objects.all()) - cursor = connection.cursor() - cursor.execute('SELECT * FROM band_gig_bands') - gig_bands = collections.defaultdict(list) - for row in cursor.fetchall(): - gig_bands[row[1]].append(bands[row[2]]) - - for gig in gigs: - gig.bands_ = gig_bands[gig.id] - if gig.date >= today: - upcoming.append(gig) - else: - previous.append(gig) - - upcoming.reverse() - - stats = {} - venues = set() - cities = set() - states = set() - countries = set() - for gig in previous: - venues.add(gig.venue.id) - cities.add(gig.venue.city.id) - if gig.venue.city.state: - states.add(gig.venue.city.state.id) - if gig.venue.city.country: - countries.add(gig.venue.city.country.id) - - stats['count'] = len(previous) - stats['venues'] = len(venues) - stats['cities'] = len(cities) - stats['states'] = len(states) - stats['countries'] = len(countries) - stats['bands'] = len(bands) - - flyerGigs = Gig.objects.exclude(flyer__isnull = True).select_related( - 'venue', 'flyer').order_by('-date') - - return render_to_response('band/gigs.html', { - 'upcoming' : upcoming, - 'previous' : previous, - 'stats' : stats, - 'flyerGigs' : flyerGigs, - }, - context_instance = RequestContext(request)) - -####################################################################### - -def news(request): - news = News.objects.order_by('-date') - - return render_to_response('band/news.html', - { - 'news' : news - }, - context_instance = RequestContext(request)) - -####################################################################### - -def press_index(request): - articles = Article.objects.order_by('-date') - - return render_to_response('band/press.html', - { - 'articles' : articles - }, - context_instance = RequestContext(request)) - -####################################################################### - -def press_detail(request, id): - article = get_object_or_404(Article, pk = id) - - return render_to_response('band/press_detail.html', - { 'article' : article }, - context_instance = RequestContext(request)) - -####################################################################### - -def songs(request): - mp3Sets = Mp3_Set.objects.order_by('-date', '-id') - - return render_to_response('band/songs.html', - { 'mp3Sets' : mp3Sets }, - context_instance = RequestContext(request)) - -####################################################################### def photos_index(request): galleries = Gallery.objects.values('title', 'id').order_by('-id') @@ -170,7 +32,6 @@ { 'galleries' : galleries, 'randomPhotos' : randomPhotos }, context_instance = RequestContext(request)) -####################################################################### def photo_detail(request, id): gallery = get_object_or_404(Gallery, pk = id) @@ -179,24 +40,6 @@ {'gallery' : gallery, 'photos': photos }, context_instance = RequestContext(request)) -####################################################################### - -def videos_index(request): - vidsets = Video_Set.objects.values('title', 'id').order_by('-date') - return render_to_response('band/videos.html', - { 'vidsets' : vidsets }, - context_instance = RequestContext(request)) - -####################################################################### - -def video_detail(request, id): - vidset = get_object_or_404(Video_Set, pk = id) - - return render_to_response('band/video_detail.html', - { 'vidset' : vidset }, - context_instance = RequestContext(request)) - -####################################################################### def buy(request): albums = Album.objects.all().order_by('-id') @@ -207,32 +50,6 @@ }, context_instance=RequestContext(request)) -####################################################################### - -def confirmEmail(to, subscribe, key): - config = settings.BAND_CONFIG - band = config['BAND_NAME'] - from_email = config['BAND_EMAIL'] - - url = "http://%s%s" % (config['BAND_DOMAIN'], - reverse('band-mail_confirm', args=[key])) - - if subscribe: - email_template = 'band/email_subscribe.txt' - else: - email_template = 'band/email_unsubscribe.txt' - - msg = render_to_string(email_template, { - 'band': band, - 'url': url, - 'band_domain': config['BAND_DOMAIN'], - }) - - subject = "[%s] Mailing List Confirmation" % band - - send_mail(subject, msg, from_email, [to]) - -####################################################################### def contact(request): band = Member.objects.exclude(is_active__exact = 0).order_by('order') @@ -241,91 +58,6 @@ }, context_instance=RequestContext(request)) -####################################################################### - -class ContactForm(forms.Form): - name = forms.CharField(max_length = 32, required = False, - widget = forms.TextInput(attrs = {'class' : 'form-box'})) - email = forms.EmailField(widget = forms.TextInput(attrs = {'class' : 'form-box'})) - location = forms.CharField(max_length = 32, required = False, - widget = forms.TextInput(attrs = {'class' : 'form-box'})) - option = forms.ChoiceField(choices = (('subscribe', 'Subscribe'), ('unsubscribe', 'Unsubscribe')), - widget = forms.Select(attrs = {'class' : 'form-box'})) - -def mail(request): - form = ContactForm() - if request.method == 'POST': - form = ContactForm(request.POST) - if form.is_valid(): - if form.cleaned_data['option'] == 'unsubscribe': - try: - fan = Fan.objects.get(email = form.cleaned_data['email']) - except Fan.DoesNotExist: - return HttpResponseRedirect(reverse(mail_not_found)) - - fan.setLeaving() - fan.save() - confirmEmail(fan.email, False, fan.key) - return HttpResponseRedirect(reverse(mail_unsubscribe)) - - elif form.cleaned_data['option'] == 'subscribe': - try: - fan = Fan.objects.get(email = form.cleaned_data['email']) - except Fan.DoesNotExist: - fan = Fan(name = form.cleaned_data['name'], - email = form.cleaned_data['email'], - location = form.cleaned_data['location']) - - fan.setPending() - fan.save() - confirmEmail(fan.email, True, fan.key) - return HttpResponseRedirect(reverse(mail_thanks)) - - return render_to_response('band/mail.html', - { 'form' : form }, - context_instance = RequestContext(request)) - -####################################################################### - -def mail_not_found(request): - return render_to_response('band/mail_not_found.html', - {}, - context_instance = RequestContext(request)) - -####################################################################### - -def mail_thanks(request): - return render_to_response('band/mail_thanks.html', - {}, - context_instance = RequestContext(request)) - -####################################################################### - -def mail_unsubscribe(request): - return render_to_response('band/mail_unsubscribe.html', - {}, - context_instance = RequestContext(request)) - -####################################################################### - -def mail_confirm(request, key): - fan = get_object_or_404(Fan, key = key) - - email = fan.email - action = 'subscribed' - - if fan.isPending(): - fan.setActive() - fan.save() - elif fan.isLeaving(): - fan.delete() - action = 'unsubscribed' - - return render_to_response('band/mail_confirm.html', - { 'email' : email, 'action' : action }, - context_instance = RequestContext(request)) - -####################################################################### def flyers(request): diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/articles/article_detail.html --- a/madeira/templates/articles/article_detail.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/articles/article_detail.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Press | {{ article.title }}{% endblock %} {% block content %}

{{ article.title }}

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/articles/article_list.html --- a/madeira/templates/articles/article_list.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/articles/article_list.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Press{% endblock %} {% block content %}

Madeira Press, Articles, & Reviews

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/base.html --- a/madeira/templates/band/base.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ - - -{% load url from future %} - -{% block title %}{% endblock %} - - - - - - - - - - - -{% block custom_css %}{% endblock %} -{% block custom_js %}{% endblock %} - - - -
- - - - - -
- {% block content %} - {% endblock %} -
- - - -
- - diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/bio.html --- a/madeira/templates/band/bio.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/band/bio.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Biography{% endblock %} {% block content %}

Band Biography

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/buy.html --- a/madeira/templates/band/buy.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/band/buy.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Merchandise{% endblock %} {% block content %}

Madeira Merchandise

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/contact.html --- a/madeira/templates/band/contact.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/band/contact.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Contact{% endblock %} {% block content %}

Madeira Contact Info

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/email_subscribe.txt --- a/madeira/templates/band/email_subscribe.txt Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -Hello, - -We have received a request for this email address to join the mailing list -for {{ band }}. In order for us to process this subscription, we need confirmation from you. - -If you did not request to join this mailing list, you may ignore this message. - -To subscribe to the mailing list, please go to the following confirmation URL: - -{{ url }} - -Thanks, - -{{ band }} -http://{{ band_domain }} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/email_unsubscribe.txt --- a/madeira/templates/band/email_unsubscribe.txt Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -Hello, - -We have received a request for this email address to unsubscribe from the mailing list -for {{ band }}. In order for us to process this request, we need confirmation from you. - -If you did not request to unsubscribe from this mailing list, you may ignore this message. - -To unsubscribe from the mailing list, please go to the following confirmation URL: - -{{ url }} - -Thanks, - -{{ band }} -http://{{ band_domain }} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/flyers.html --- a/madeira/templates/band/flyers.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -{% extends 'band/base.html' %} -{% block title %}The Madeira | Flyer Gallery{% endblock %} -{% block content %} -

Show Flyer Gallery

-{% if gigs %} -
- {% for gig in gigs %} -

- {% if gig.title %} - {{ gig.title }} - {% else %} - {{ gig.date|date: - {% endif %} -

- {% endfor %} -
-{% else %} -No flyers available at this time. -{% endif %} -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/gigs.html --- a/madeira/templates/band/gigs.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -{% extends 'band/base.html' %} -{% load url from future %} -{% block title %}The Madeira | Shows{% endblock %} -{% block custom_css %} - -{% endblock %} -{% block custom_js %} - - - -{% endblock %} -{% block content %} -

Show Dates

- -

Upcoming Shows

-{% if upcoming %} - {% for show in upcoming %} -

- {% if show.flyer %} - - - {{ show.flyer.caption }} - {% endif %} - {{ show.date|date:"F d, Y" }} - {% if show.time %}{{ show.time|time:"h:i A" }}{% endif %}
- - {% if show.title and show.url %} - {{ show.title }}
- {% else %} - {% if show.title %} - {{ show.title }}
- {% endif %} - {% endif %} - - {% if show.venue %} - {% if show.venue.url %} - {{ show.venue.name }}, - {% else %} - {{ show.venue }}, - {% endif %} - {% if show.venue.address %} - {{ show.venue.address }}, - {% endif %} - {% if show.venue.city.state %} - {{ show.venue.city.name }}, {{ show.venue.city.state.name }} - {% else %} - {{ show.venue.city.name }} - {% endif %} - {% ifnotequal show.venue.city.country.name "USA" %} - {{ show.venue.city.country.name }} - {% endifnotequal %} -
- {% if show.venue.phone %} - {{ show.venue.phone }} -
- {% endif %} - {% endif %} - - {% if show.bands_ %} - With: - {% for band in show.bands_ %} - {% if band.url %} - {{ band.name }} - {% else %} - {{ band.name }} - {% endif %} - {% if not forloop.last %} - • - {% endif %} - {% endfor %} -
- {% endif %} - - {% if show.notes %} - {{ show.notes|safe }} - {% endif %} -

- {% endfor %} -{% else %} -None at this time. -{% endif %} -
- -{% if flyerGigs %} -
-

Flyers

-
- {% for gig in flyerGigs %} -
- - - -
{{ gig.venue.name}}, {{ gig.date|date:"F 'y" }}
- - {{ gig.date|date: -
-
- {% endfor %} -
-
-

To see all our flyers in full size, check out our show flyer gallery.

-
-{% endif %} - -{% if previous %} -

Previous Shows

-
- - - {% for show in previous %} - - - - - - {% endfor %} -
DateVenueBands
{{ show.date|date:"M d, Y" }} - {% if show.title and show.url %} - {{ show.title }}, - {% else %} - {% if show.title %} - {{ show.title }}, - {% endif %} - {% endif %} - {% if show.venue.url %} - {{ show.venue.name }}, - {% else %} - {{ show.venue.name }}, - {% endif %} - {{ show.venue.city.name }}, {{ show.venue.city.state.abbrev }} - {% ifnotequal show.venue.city.country.name "USA" %} - {{ show.venue.city.country.name }} - {% endifnotequal %} - - {% for band in show.bands_ %} - {% if band.url %} - {{ band.name }} - {% else %} - {{ band.name }} - {% endif %} - {% if not forloop.last %} - • - {% endif %} - {% endfor %} -
-
-{% endif %} - -{% if stats %} -

Past Show Statistics

- - - - - - - -
Number of shows:{{ stats.count }}
Number of unique venues:{{ stats.venues }}
Number of unique cities:{{ stats.cities }}
Number of unique states:{{ stats.states }}
Number of unique countries:{{ stats.countries }}
Number of unique bands:{{ stats.bands }}
-{% endif %} - -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/index.html --- a/madeira/templates/band/index.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -{% extends 'band/base.html' %} -{% load url from future %} -{% load gig_tags %} -{% block title %}The Madeira{% endblock %} -{% block custom_css %} - -{% endblock %} -{% block custom_js %} - - - -{% endblock %} -{% load markup %} -{% block content %} -

The Madeira

-The Madeira 2008 - -

The Madeira plays surf music born of screaming wind over the sand dunes of the Sahara Desert, deafening echoes of waves pounding the Gibraltar Rock, joyous late-night gypsy dances in the small towns of Andalucia, and exotic cacophony of the Marrakesh town square. It is the surf music of the millennia-old Mediterranean mysteries.

- -

On these pages you will find the latest news from the band, show dates, songs & videos to download, photos, and merchandise information.

- -

Please also visit The Madeira on Myspace and The Madeira on Facebook. Send us email at: themadeira@themadeira.net.

-
- -{% upcoming_gigs %} - -
-
-

Sandstorm from Sound of the Surf

- -

Another clip from the upcoming film Sound of the Surf has just been released, and it is our performance of Sandstorm! This movie cannot come out soon enough!

-
-
-
-
-

New Song Preview!

- -

Check out this set of 6 videos from our show at Mahogany's in February. Five of the songs are new originals slated for our new album! Video courtesy of TikiTim.

-
-
- -
-
- - - - - - - - - - -

The Madeira Releases:

- Carpe Noctem Cover -
Available Now: Carpe Noctem!
-
Sandstorm CD Cover
Ruins EP Cover
Sandstorm
Ruins
-
-
- -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/mail.html --- a/madeira/templates/band/mail.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -{% extends 'band/base.html' %} -{% block title %}The Madeira | Mailing List{% endblock %} -{% block content %} -

Madeira Mailing List

-

Get on the Madeira mailing list to receive updates about upcoming shows, releases, and website updates. -This is a low volume list. We do not share your email address with anyone.

-
Mailing List -
{% csrf_token %} - - {% for field in form %} - - - - - {% endfor %} - -
{{ field.label_tag }}{% if field.field.required %}*{% endif %}:{{ field }} - {% if field.errors %}{{ field.errors }}{% endif %}
-
-
-{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/mail_confirm.html --- a/madeira/templates/band/mail_confirm.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -{% extends 'band/base.html' %} -{% block title %}The Madeira | Mailing List Confirmation{% endblock %} -{% block content %} -

Madeira Mailing List Confirmation

-

Your email address, {{ email }}, has been successfully {{ action }}.

-{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/mail_not_found.html --- a/madeira/templates/band/mail_not_found.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -{% extends 'band/base.html' %} -{% load url from future %} -{% block title %}The Madeira | Mailing List Confirmation{% endblock %} -{% block content %} -

Madeira Mailing List

-

Sorry, we did not find that email address in our database.

-

Back to contact page.

-{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/mail_thanks.html --- a/madeira/templates/band/mail_thanks.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -{% extends 'band/base.html' %} -{% block title %}The Madeira | Mailing List Confirmation{% endblock %} -{% block content %} -

Madeira Mailing List

-

Thanks for subscribing to our email list! You should shortly receive a confirmation email -with instructions on how to complete the subscription process.

-

Please check your spam folders for this email. Sometimes it ends up in there. -Thanks.

-{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/mail_unsubscribe.html --- a/madeira/templates/band/mail_unsubscribe.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -{% extends 'band/base.html' %} -{% block title %}The Madeira | Mailing List Confirmation{% endblock %} -{% block content %} -

Madeira Mailing List

-

We're sorry to see you unsubscribing from our email list! You should shortly receive a confirmation email -with instructions on how to complete the removal process. Please check your spam folders for -this email.

-{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/news.html --- a/madeira/templates/band/news.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -{% extends 'band/base.html' %} -{% load markup %} -{% block title %}The Madeira | News{% endblock %} -{% block content %} -

News

-{% if news %} - {% for story in news %} -

{{ story.date|date:"F d, Y" }}  - {% if story.title %} - • {{ story.title }} - {% endif %} -

-
- {% if story.photo %} - {{ story.photo_caption }} - {% endif %} - {% if story.markup_enabled %} - {{ story.text|textile }} - {% else %} - {{ story.text|safe|linebreaks }} - {% endif %} - {% if story.author %} -

-- {{ story.author }}

- {% endif %} -
- {% endfor %} -{% else %} -No news at this time. -{% endif %} -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/photo_detail.html --- a/madeira/templates/band/photo_detail.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/band/photo_detail.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% load url from future %} {% load markup %} {% block title %}The Madeira | Photos: {{ gallery.title }}{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/photos.html --- a/madeira/templates/band/photos.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/band/photos.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% load url from future %} {% block title %}The Madeira | Photo Galleries{% endblock %} {% block custom_css %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/press.html --- a/madeira/templates/band/press.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -{% extends 'band/base.html' %} -{% load markup %} -{% block title %}The Madeira | Press{% endblock %} -{% block content %} -

Madeira Press, Articles, & Reviews

-{% if articles %} - -

Contents

- - - {% for article in articles %} -   -

{{ article.title }}

- {% if article.markup_enabled %} - {{ article.text|textile }} - {% else %} - {{ article.text|safe|linebreaks }} - {% endif %} -
- {{ article.source|safe|linebreaks }} -
- {% if article.url %} - Original article - {% endif %} - {% if article.pdf and article.url %} - | - {% endif %} - {% if article.pdf %} - Original article as PDF - - Adobe Reader - {% endif %} -

Top

- {% endfor %} - -{% else %} -No articles at this time. -{% endif %} -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/press_detail.html --- a/madeira/templates/band/press_detail.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -{% extends 'band/base.html' %} -{% load url from future %} -{% load markup %} -{% block title %}The Madeira | Press{% endblock %} -{% block content %} -

Madeira Press, Articles, & Reviews

-

{{ article.title }}

-{% if article.markup_enabled %} - {{ article.text|textile }} -{% else %} - {{ article.text|safe|linebreaks }} -{% endif %} -
-{{ article.source|safe|linebreaks }} -
-{% if article.url %} -Original article -{% endif %} -{% if article.pdf and article.url %} -| -{% endif %} -{% if article.pdf %} -Original article as PDF - - Adobe Reader -{% endif %} -

Press index

-{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/songs.html --- a/madeira/templates/band/songs.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -{% extends 'band/base.html' %} -{% block title %}The Madeira | Songs{% endblock %} -{% block content %} -

Madeira Songs

-{% if mp3Sets %} -

Check out some Madeira MP3 downloads!

- {% for set in mp3Sets %} -

{{ set.title }}

- {{ set.text|safe|linebreaks }} - - {% endfor %} -{% else %} -No downloads available at this time. -{% endif %} -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/video_detail.html --- a/madeira/templates/band/video_detail.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -{% extends 'band/base.html' %} -{% load url from future %} -{% block title %}The Madeira | Videos: {{ vidset.title }}{% endblock %} -{% block content %} -

Madeira Videos: {{ vidset.title }}

-{{ vidset.text|safe|linebreaks }} - -
- -{% for video in vidset.video_set.all %} - -{% endfor %} -
{{ video.title }}{{ video.embed_code|safe }}
-
-
-
Videos index
- -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/band/videos.html --- a/madeira/templates/band/videos.html Sat Mar 31 15:39:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -{% extends 'band/base.html' %} -{% load url from future %} -{% block title %}The Madeira | Videos{% endblock %} -{% block content %} -

Madeira Videos

-{% if vidsets %} - -{% else %} -No videos available at this time. -{% endif %} -{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/base.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/madeira/templates/base.html Sat Apr 07 15:58:51 2012 -0500 @@ -0,0 +1,65 @@ + + +{% load url from future %} + +{% block title %}{% endblock %} + + + + + + + + + + + +{% block custom_css %}{% endblock %} +{% block custom_js %}{% endblock %} + + + +
+ + + + + +
+ {% block content %} + {% endblock %} +
+ + + +
+ + diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/email_list/subscribe_form.html --- a/madeira/templates/email_list/subscribe_form.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/email_list/subscribe_form.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Mailing List{% endblock %} {% block content %}

Madeira Mailing List

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/email_list/subscribe_request.html --- a/madeira/templates/email_list/subscribe_request.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/email_list/subscribe_request.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Mailing List Subscription Confirmation{% endblock %} {% block content %}

Madeira Mailing List Subscription Confirmation

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/email_list/subscribed.html --- a/madeira/templates/email_list/subscribed.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/email_list/subscribed.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Mailing List Subscription Confirmation{% endblock %} {% block content %}

Madeira Mailing List Subscription Confirmation

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/email_list/unsubscribe_request.html --- a/madeira/templates/email_list/unsubscribe_request.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/email_list/unsubscribe_request.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Mailing List Unsubscribe Confirmation{% endblock %} {% block content %}

Madeira Mailing List Unsubscribe Confirmation

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/email_list/unsubscribed.html --- a/madeira/templates/email_list/unsubscribed.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/email_list/unsubscribed.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Mailing List Subscription Removal{% endblock %} {% block content %}

Madeira Mailing List Subscription Removal

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/flatpages/default.html --- a/madeira/templates/flatpages/default.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/flatpages/default.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | {{ flatpage.title }}{% endblock %} {% block content %} {{ flatpage.content }} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/gigs/flyers.html --- a/madeira/templates/gigs/flyers.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/gigs/flyers.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Flyer Gallery{% endblock %} {% block content %}

Show Flyer Gallery

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/gigs/gigs.html --- a/madeira/templates/gigs/gigs.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/gigs/gigs.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% load url from future %} {% block title %}The Madeira | Shows{% endblock %} {% block custom_css %} @@ -103,7 +103,7 @@ {% endfor %}
-

To see all our flyers in full size, check out our show flyer gallery.

+

To see all our flyers in full size, check out our show flyer gallery.

{% endif %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/madeira/templates/index.html Sat Apr 07 15:58:51 2012 -0500 @@ -0,0 +1,67 @@ +{% extends 'base.html' %} +{% load url from future %} +{% load gig_tags %} +{% block title %}The Madeira{% endblock %} +{% block custom_css %} + +{% endblock %} +{% block custom_js %} + + + +{% endblock %} +{% load markup %} +{% block content %} +

The Madeira

+The Madeira 2008 + +

The Madeira plays surf music born of screaming wind over the sand dunes of the Sahara Desert, deafening echoes of waves pounding the Gibraltar Rock, joyous late-night gypsy dances in the small towns of Andalucia, and exotic cacophony of the Marrakesh town square. It is the surf music of the millennia-old Mediterranean mysteries.

+ +

On these pages you will find the latest news from the band, show dates, songs & videos to download, photos, and merchandise information.

+ +

Please also visit The Madeira on Myspace and The Madeira on Facebook. Send us email at: themadeira@themadeira.net.

+
+ +{% upcoming_gigs %} + +
+
+ + + + + + + + + + + + +

The Madeira Releases:

+ Tribal Fires Cover +
Tribal Fires +
+ Carpe Noctem Cover +
Carpe Noctem! +
Sandstorm CD Cover
Ruins EP Cover
Sandstorm
Ruins
+
+
+ +
+
+

Sandstorm from Sound of the Surf

+ +

Another clip from the upcoming film Sound of the Surf has just been released, and it is our performance of Sandstorm! This movie cannot come out soon enough!

+
+
+ +
+{% endblock %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/mp3/collection_list.html --- a/madeira/templates/mp3/collection_list.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/mp3/collection_list.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | Songs{% endblock %} {% block content %}

Madeira Songs

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/news/news_detail.html --- a/madeira/templates/news/news_detail.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/news/news_detail.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | News{% endblock %} {% block content %} {% if story.title %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/news/news_list.html --- a/madeira/templates/news/news_list.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/news/news_list.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% block title %}The Madeira | News{% endblock %} {% block content %}

News

diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/videos/collection_detail.html --- a/madeira/templates/videos/collection_detail.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/videos/collection_detail.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% load url from future %} {% block title %}The Madeira | Videos: {{ collection.title }}{% endblock %} {% block content %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/templates/videos/collection_list.html --- a/madeira/templates/videos/collection_list.html Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/templates/videos/collection_list.html Sat Apr 07 15:58:51 2012 -0500 @@ -1,4 +1,4 @@ -{% extends 'band/base.html' %} +{% extends 'base.html' %} {% load url from future %} {% block title %}The Madeira | Videos{% endblock %} {% block content %} diff -r d958e59d6fc6 -r 0176eca97d1d madeira/urls.py --- a/madeira/urls.py Sat Mar 31 15:39:53 2012 -0500 +++ b/madeira/urls.py Sat Apr 07 15:58:51 2012 -0500 @@ -1,11 +1,15 @@ -from django.conf.urls.defaults import patterns, include +from django.conf.urls.defaults import patterns, include, url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings +from django.views.generic import TemplateView admin.autodiscover() urlpatterns = patterns('', + url(r'^$', + TemplateView.as_view(template_name='index.html'), + name='home'), (r'^', include('band.urls')), (r'^gigs/', include('gigs.urls')), (r'^mail/', include('email_list.urls')),