Commit 33aefe7a authored by Daniel W Bond's avatar Daniel W Bond
Browse files

Merge branch 'master' of https://github.com/jrouly/srct-vahack into daniel

BIG ASS MERGE
parents e1a5ea1c 3eaf2b6f
......@@ -78,7 +78,6 @@ STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
'/opt/vahack/volunteer/hackathon/static',
'static/',
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
......
......@@ -7,59 +7,63 @@
<div class ="row">
<div class="col-md-6 back-tiles pull-left"><h3>Interest Feed</h3>
<div class="row">
<div class="front-tiles"><h4>Opportunities matching with your tags. Query all opportunities and filtering by the user's tags and the date posted in reverse order.</h4></div>
<div class="front-tiles"><h4>Opportunities matching with your tags.</h4>
<div class="feed">
{% for entry in tag_feed %}
{{ entry }}
<a href="{{ entry.get_absolute_url }}">{{entry }}</a><br />
{% endfor %}
</div>
</div>
</div>
</div>
<div class="col-md-6 back-tiles pull-right"><h3>Org Feed</h3>
<div class="col-md-6 back-tiles pull-right"><h3>Organizational Feed</h3>
<div class="row">
<div class="front-tiles"><h4>All of the activity from your organizations. All opportunities from your selected organization sorted by reverse date.</h4></div>
<div class="front-tiles"><h4>All of the activity from your organizations.</h4>
<div class="feed">
{% for entry in org_feed %}
{{ entry }}
<a href="{{ entry.get_absolute_url }}">{{entry }}</a><br />
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 back-tiles pull-left"><h3>Recommendations</h3>
<div class="col-md-6 back-tiles pull-left"><h3>Trending Feed</h3>
<div class="row">
<div class="front-tiles"><h4>Will show recommended events by your previous activity at some point, but for the time being, it wil merely newly created tags and organizations.</h4></div>
<div class="front-tiles"><h4>This feed shows trending, popular
events and tags in the community.</h4>
<div class="feed">
{% for entry in tags_and_orgs_feed %}
{{ entry }}
<a href="{{ entry.get_absolute_url }}">{{entry }}</a><br />
{% endfor %}
</div>
</div>
</div>
</div>
<div class="col-md-6 back-tiles pull-right"><h3>Everything</h3>
<div class="col-md-6 back-tiles pull-right"><h3>Platform Opportunities</h3>
<div class="row">
<div class="front-tiles"><h4>Query all the things</h4></div>
<div class="front-tiles"><h4>Displays all of the opportunities
currently present on the platform.</h4>
<div class="feed">
{% for entry in combined_feed %}
{{ entry }}
{% for entry in global_opp_feed %}
<a href="{{ entry.get_absolute_url }}">{{entry }}</a><br />
{% endfor %}
</div>
</div>
</div>
</div>
</div>
......
......@@ -36,6 +36,6 @@
</div>
{% enblock %}
{% endblock %}
{% load comments %}
......@@ -13,79 +13,68 @@
<div class="row">
<div class="col-md-3">
<a href="#" class="thumbnail">
<img src="/static/img/avatar-org.png" alt="profile photo">
<img src="/static/img/logo2.png" alt="profile photo">
</a>
</div>
<div class="text-left col-md-3">
<h4 class="profile-heading">Name</h4>
<h2 class="profile-value">Abdullah Abdurrah Sahyouni</h2>
<h2 class="profile-value">{{requested_org.name}}</h2>
<h4 class="profile-heading">Location</h4>
<h2 class="profile-value">Fairfax, Honda</h2>
<h2 class="profile-value">{{requested_org.city}}</h2>
<h4 class="profile-heading">Favourite Colour</h4>
<h2 class="profile-value">Orange</h2>
</div>
<div class="col-md-6 text-left">
<h2>Previous Events</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam
posuere mi non sem tincidunt consequat. Mauris consectetur orci ligula.
Aliquam id felis bibendum, consectetur mi ut, dapibus ante. Ut a metus
et arcu commodo imperdiet. Donec eget odio malesuada, congue risus a,
mattis orci. Aenean vehicula dui auctor pulvinar eleifend. Nulla
adipiscing molestie dui, sit amet blandit purus tincidunt non. Duis
tempor orci eu purus mattis, in pretium purus placerat. Quisque eu nibh
rhoncus, malesuada nulla in, facilisis nisl. Nam sed urna at velit
ullamcorper aliquam. Vivamus tincidunt tempor nunc eget laoreet. Nulla
facilisi.</p>
{% for event in global_events %}
<p>{{ event }}</p>
{% endfor %}
</div>
</div>
<div class="row">
<div class="col-md-12 text-left">
<h2>Brief Biography</h2>
<p>Description of bullshit that might be relevant who the fuck actually
knows holy shit I need a beer. Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Nullam posuere mi non sem tincidunt consequat. Mauris
consectetur orci ligula. Aliquam id felis bibendum, consectetur mi ut,
dapibus ante. Ut a metus et arcu commodo imperdiet. Donec eget odio
malesuada, congue risus a, mattis orci. Aenean vehicula dui auctor
pulvinar eleifend. Nulla adipiscing molestie dui, sit amet blandit
purus tincidunt non. Duis tempor orci eu purus mattis, in pretium purus
placerat. Quisque eu nibh rhoncus, malesuada nulla in, facilisis nisl.
Nam sed urna at velit ullamcorper aliquam. Vivamus tincidunt tempor
nunc eget laoreet. Nulla facilisi.</p>
<p>Nam molestie, nunc eget porta tristique, ipsum orci elementum nunc, et
ornare leo massa a ligula. Etiam ut quam blandit, sollicitudin neque
vel, adipiscing lectus. Curabitur viverra volutpat blandit. Sed
vehicula ipsum et dolor varius luctus. Cum sociis natoque penatibus et
magnis dis parturient montes, nascetur ridiculus mus. Aliquam erat
volutpat. Mauris porttitor, mauris in ultrices egestas, magna lorem
gravida elit, at varius odio nisl nec leo. Suspendisse egestas suscipit
mi eu scelerisque. Mauris nec tincidunt nisi. Nunc lectus nibh,
imperdiet ac porttitor nec, scelerisque sed orci. Nulla placerat sed
sapien ac tincidunt.</p>
<p>Nunc facilisis egestas massa non mattis. Nunc lacinia placerat augue id
dignissim. Suspendisse in justo quam. Ut quis purus et ipsum hendrerit
suscipit. Vivamus suscipit ullamcorper sagittis. Vestibulum vitae ante
sed mauris aliquet gravida eu a risus. In consectetur vitae mauris eu
varius. Curabitur sit amet condimentum arcu, iaculis scelerisque lacus.
Pellentesque molestie justo at neque porttitor pulvinar. </p>
<h2>Brief Description</h2>
<p>{{requested_org.description}}</p>
</div>
</div>
<div class="row">
<div class="col-md-6 text-left">
<h2>Schedule of Availability</h2>
<p>Description of bullshit that might be relevant who the fuck actually
knows holy shit I need a beer.</p>
{% if sunday > 2 %}
<p>sunday: Available</p>
{% endif %}
{% if monday > 2 %}
<p>monday: Available</p>
{% endif %}
{% if tuesday > 2 %}
<p>tuesday: Available</p>
{% endif %}
{% if wednesday > 2 %}
<p>wednesday: Available</p>
{% endif %}
{% if thursday > 2 %}
<p>thursday: Available</p>
{% endif %}
{% if friday > 2 %}
<p>friday: Available</p>
{% endif %}
{% if saturday > 2 %}
<p>saturday: Available</p>
{% endif %}
</div>
<div class="col-md-6 text-left">
<h2>Tags</h2>
<p>[Small Boys] [Roofalin] [Unsafe Sex]</p>
<p>
{% for tag in requested_tags %}
[{{ tag }}]
{% endfor %}
</p>
</div>
</div>
......
......@@ -45,22 +45,8 @@
<div class="col-md-6 text-left">
<h2>Schedule of Availability</h2>
{% if sunday > 2 %}
<p>sunday: Available
{% if '0' in sunday %}
morning
{% endif %}
{% if '1' in sunday %}
afternoon
{% endif %}
{% if '2' in sunday %}
evening
{% endif %}
{% if '3' in sunday %}
night
{% endif %}
</p>
<p>sunday: Available</p>
{% endif %}
</p>
{% if monday > 2 %}
<p>monday: Available</p>
{% endif %}
......
......@@ -92,6 +92,6 @@ body {
.feed {
min-width: 100px;
height: 200px;
overflow-x: scroll;
height: 150px;
overflow-y: scroll;
}
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Tag.slug'
db.add_column(u'stepup_tag', 'slug',
self.gf('django.db.models.fields.SlugField')(default=None, max_length=50),
keep_default=False)
# Adding M2M table for field attendees on 'Opportunity'
m2m_table_name = db.shorten_name(u'stepup_opportunity_attendees')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('opportunity', models.ForeignKey(orm[u'stepup.opportunity'], null=False)),
('person', models.ForeignKey(orm[u'stepup.person'], null=False))
))
db.create_unique(m2m_table_name, ['opportunity_id', 'person_id'])
# Adding M2M table for field events on 'Person'
m2m_table_name = db.shorten_name(u'stepup_person_events')
db.create_table(m2m_table_name, (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('person', models.ForeignKey(orm[u'stepup.person'], null=False)),
('opportunity', models.ForeignKey(orm[u'stepup.opportunity'], null=False))
))
db.create_unique(m2m_table_name, ['person_id', 'opportunity_id'])
def backwards(self, orm):
# Deleting field 'Tag.slug'
db.delete_column(u'stepup_tag', 'slug')
# Removing M2M table for field attendees on 'Opportunity'
db.delete_table(db.shorten_name(u'stepup_opportunity_attendees'))
# Removing M2M table for field events on 'Person'
db.delete_table(db.shorten_name(u'stepup_person_events'))
models = {
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Group']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "u'user_set'", 'blank': 'True', 'to': u"orm['auth.Permission']"}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'stepup.opportunity': {
'Meta': {'object_name': 'Opportunity'},
'attendees': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Person']", 'symmetrical': 'False', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'date_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True'}),
'description': ('django.db.models.fields.TextField', [], {}),
'friday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'monday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'organizations': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Organization']", 'symmetrical': 'False', 'blank': 'True'}),
'saturday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'sunday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Tag']", 'symmetrical': 'False', 'blank': 'True'}),
'thursday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'tuesday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'wednesday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'})
},
u'stepup.organization': {
'Meta': {'object_name': 'Organization'},
'admins': ('django.db.models.fields.related.ManyToManyField', [], {'related_name': "'admin'", 'symmetrical': 'False', 'to': u"orm['stepup.Person']"}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'description': ('django.db.models.fields.TextField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'opportunities': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Opportunity']", 'symmetrical': 'False', 'blank': 'True'}),
'people': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Person']", 'symmetrical': 'False', 'blank': 'True'}),
'picture': ('django.db.models.fields.files.ImageField', [], {'max_length': '100'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'stepup.person': {
'Meta': {'object_name': 'Person'},
'admingroups': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'admin'", 'blank': 'True', 'to': u"orm['stepup.Organization']"}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'events': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Opportunity']", 'symmetrical': 'False', 'blank': 'True'}),
'friday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'maxdistance': ('django.db.models.fields.IntegerField', [], {}),
'monday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'organizations': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Organization']", 'symmetrical': 'False', 'blank': 'True'}),
'picture': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'blank': 'True'}),
'saturday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'sunday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'tags': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Tag']", 'symmetrical': 'False', 'blank': 'True'}),
'thursday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'tuesday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['auth.User']", 'unique': 'True'}),
'wednesday': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'})
},
u'stepup.tag': {
'Meta': {'object_name': 'Tag'},
'description': ('django.db.models.fields.TextField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'opportunities': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Opportunity']", 'symmetrical': 'False', 'blank': 'True'}),
'people': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['stepup.Person']", 'symmetrical': 'False', 'blank': 'True'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50'})
}
}
complete_apps = ['stepup']
\ No newline at end of file
......@@ -97,6 +97,7 @@ class Organization(models.Model):
class Tag(models.Model):
name = models.CharField(max_length=200)
description = models.TextField()
slug = models.SlugField(max_length=50)
people = models.ManyToManyField(Person, through=Person.tags.through,
blank=True)
opportunities = models.ManyToManyField(Opportunity,
......
......@@ -66,12 +66,23 @@ def index(request):
for org in current_orgs:
opportunity = Opportunity.objects.filter(organizations=org).all()
org_opportunities.append( opportunity )
tags_and_orgs = []
global_tags = Tag.objects.all()
for tag in global_tags:
tags_and_orgs.append( tag )
global_orgs = Organization.objects.all()
for org in global_orgs:
tags_and_orgs.append( org )
global_opps = Opportunity.objects.all()
return render_to_response('index.html', {
"current_user" : current_user,
"tag_feed" : tag_opportunities,
"org_feed" : org_opportunities,
"tags_and_orgs_feed" : tags_and_orgs,
"global_opp_feed" : global_opps,
},
context_instance = RequestContext(request),
)
......@@ -96,7 +107,6 @@ def all_opportunity(request):
@login_required
def person(request, slug):
return render_to_response('person.html', {
"current_user" : request.user,
"requested_user" : Person.objects.get(user__username=slug),
"requested_tags" : Person.objects.get(user__username=slug).tags.all(),
#"global_tags" : Tag.objects.all(),
......@@ -124,7 +134,17 @@ def all_person(request):
@login_required
def organization(request, slug):
return render_to_response('organization.html', {
# put the variables you need here
"requested_org" : Organization.objects.get(user__username=slug),
"requested_tags" : Organization.objects.get(user__username=slug).tags.all(),
#"global_tags" : Tag.objects.all(),
"global_events" : Opportunity.objects.all(),
"sunday" : len(Organization.objects.get(user__username=slug).sunday),
"monday" : len(Organization.objects.get(user__username=slug).monday),
"tuesday" : len(Organization.objects.get(user__username=slug).tuesday),
"wednesday" : len(Organization.objects.get(user__username=slug).wednesday),
"thursday" : len(Organization.objects.get(user__username=slug).thursday),
"friday" : len(Organization.objects.get(user__username=slug).friday),
"saturday" : len(Organization.objects.get(user__username=slug).saturday),
},
context_instance = RequestContext(request),
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment