Permalink
Browse files

Sync'd with github staging

  • Loading branch information...
jnorthrop committed Feb 12, 2012
2 parents 7bae3f5 + 52f2fb1 commit bbb6ec1b86df60dc04583ecab3848fc7617d4a40
View
@@ -3,5 +3,4 @@
/lib
*.pyc
*.db
-.gitignore
.Python
View
@@ -1,8 +1,8 @@
-from placeholder.models import Email
-from django.contrib import admin
+#from placeholder.models import Email
+#from django.contrib import admin
-admin.site.register(Email)
+#admin.site.register(Email)
-class EmailInline(admin.TabularInline):
- model = Email
- extra = 3
+#class EmailInline(admin.TabularInline):
+# model = Email
+# extra = 3
View
@@ -3,16 +3,16 @@
import datetime
-class Email(models.Model):
- email = models.EmailField(max_length=300)
- entry_date = models.DateTimeField()
+#class Email(models.Model):
+# email = models.EmailField(max_length=300)
+# entry_date = models.DateTimeField()
- def __unicode__(self):
- return self.email
+# def __unicode__(self):
+# return self.email
-class EmailForm(forms.ModelForm):
- entry_date = forms.DateTimeField(widget=forms.HiddenInput(), initial=datetime.datetime.now().replace(microsecond=0))
+#class EmailForm(forms.ModelForm):
+# entry_date = forms.DateTimeField(widget=forms.HiddenInput(), initial=datetime.datetime.now().replace(microsecond=0))
- class Meta:
- model = Email
+# class Meta:
+# model = Email
View
@@ -1,4 +1,5 @@
-import os.path
+import os
+PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -69,7 +70,7 @@
# Additional locations of static files
STATICFILES_DIRS = (
- os.path.join(os.path.dirname(__file__), 'static'),
+ os.path.join(PROJECT_ROOT, 'static'),
)
# List of finder classes that know how to find static files in
@@ -101,7 +102,7 @@
ROOT_URLCONF = 'placeholder.urls'
TEMPLATE_DIRS = (
- os.path.join(os.path.dirname(__file__), 'templates'),
+ os.path.join(PROJECT_ROOT, 'templates'),
)
INSTALLED_APPS = (
@@ -204,27 +204,7 @@ <h1>Sign Up Now</h1>
<div class="span3">&nbsp;
</div>
<div class="span6">
- {% if messages %}
- {% for message in messages %}
- <div class="marketing-byline" style="color: #b94a48;">{{ message }}</div>
- {% endfor %}
- {% else %}
- <p>If you want to recieve updates on how we are progressing as well as get a first shot at WODWatts when it is available, enter your email below.</p>
- <div style="padding: 0 30px;">
- <form method="POST" action="#signup">
- {% csrf_token %}
- {{ form.non_field_errors }}
- {{ form.entry_date.errors }}
- {{ form.entry_date }}
- <div>
- {{ form.email.errors }}
- <label for="id_email" style="font-weight:bold;">Your email address:</label>
- {{ form.email }}
- </div>
- <input type="submit" name="submit" value="Submit">
- </form>
- </div>
- {% endif %}
+ <div style="width:100%; text-align: center">A signup form will be back here soon.</div>
</div>
<div class="span3">&nbsp;
</div>
View
@@ -3,7 +3,7 @@
admin.autodiscover()
urlpatterns = patterns('',
- url(r'^$', 'placeholder.views.index', name='index'),
- # url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'placeholder.html'}),
- url(r'^admin/', include(admin.site.urls)),
+ #url(r'^$', 'placeholder.views.index', name='index'),
+ url(r'^$', 'django.views.generic.simple.direct_to_template', {'template': 'placeholder.html'}),
+ url(r'^admin/', include(admin.site.urls)),
)
View
@@ -1,22 +1,22 @@
from django.shortcuts import render_to_response, redirect
from django.http import HttpResponseRedirect, HttpResponse
from django.template import RequestContext
-from placeholder.models import EmailForm
+#from placeholder.models import EmailForm
from django.forms.util import ErrorList
from django.contrib import messages
def index(request):
- if request.method == 'POST':
- form = EmailForm(request.POST)
- if form.is_valid():
- new_form = form.save()
- messages.success(request, "Got it! We'll keep you posted.")
- return redirect('/#signup', new_form)
- else:
- return render_to_response('placeholder.html', {'form': form},
- context_instance=RequestContext(request))
- else:
- form = EmailForm()
- return render_to_response('placeholder.html', {'form': form},
- context_instance=RequestContext(request))
+# if request.method == 'POST':
+# form = EmailForm(request.POST)
+# if form.is_valid():
+# new_form = form.save()
+# messages.success(request, "Got it! We'll keep you posted.")
+# return redirect('/#signup', new_form)
+# else:
+# return render_to_response('placeholder.html', {'form': form},
+# context_instance=RequestContext(request))
+# else:
+# form = EmailForm()
+# return render_to_response('placeholder.html', {'form': form},
+# context_instance=RequestContext(request))
View
@@ -1,4 +1,5 @@
Django==1.3.1
-psycopg2==2.4.4
-wsgiref==0.1.2
+distribute==0.6.24
gunicorn==0.13.4
+#psycopg2==2.4.4
+wsgiref==0.1.2

0 comments on commit bbb6ec1

Please sign in to comment.