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
def facebook_entry(request): | |
response = {} | |
response['success'] = True | |
form_data = json.loads(request.session['form_data']) | |
new_contestant = Contestant(first_name=form_data['first_name'], | |
last_name=form_data['last_name'], | |
time_entered=datetime.datetime.now(), | |
is_18=form_data['is_18'], | |
agreed_to_terms=form_data['agreed_to_terms'], |
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
def index(request, template_name="contest/index.html"): | |
if request.method == 'POST': | |
form = ContestantForm(request.POST) | |
if form.is_valid(): | |
new_contestant = form.save() | |
new_contestant.ticket_type = 'Register' | |
new_contestant.save() | |
response = redirect('thank-you') | |
response.set_cookie('p4k-emusic-register', 'true') |
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> | |
var timestamp = new Date().getTime(); | |
$('body').append('<IMG SRC="http://ad.doubleclick.net/ad/N5364.126668.PITCHFORKMEDIA/B6464942.30;sz=1x1;pc=[TPAS_ID];ord=['+timestamp+']?" BORDER=0 WIDTH=1 HEIGHT=1 ALT="Advertisement">'); | |
$('body').append('<IMG SRC="http://ad.doubleclick.net/ad/N5364.126668.PITCHFORKMEDIA/B6464942.32;sz=1x1;pc=[TPAS_ID];ord=['+timestamp+']?" BORDER=0 WIDTH=1 HEIGHT=1 ALT="Advertisement">'); | |
console.log('written'); | |
</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
@font-face {font-family: 'Calluna-Semibold';src: url('http://pitchfork.com/static/desktop/css/webfonts/206049_3_0.eot?#iefix') format('embedded-opentype');} |
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 Command(NoArgsCommand): | |
def handle_noargs(self, **options): | |
users = User.objects.all() | |
response = HttpResponse(mimetype='text/csv') | |
response['Content-Disposition'] = 'attachment; filename=incomplete.csv' | |
writer = csv.writer(response) | |
for u in users: | |
if not u.first_name or not u.last_name: |
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
def middle_part(s): | |
if len(s.strip()) > 6: | |
s = s.strip()[3:(len(s.strip())-3)] | |
else: | |
s = '' | |
return s |
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
def middle_part(s): | |
if len(s.strip()) > 6: | |
new_str = s.strip()[3:(len(s.strip())-3)] | |
else: | |
new_str = '' | |
return new_str |
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
1. add a tumblr column to the users_userprofile table: alter table users_userprofile add column tumblr varchar(60); | |
2. add display_email column to users_userprofile table: alter table users_userprofile add column display_email tinyint(1) default 0; | |
3. merge in author-pages branch | |
4. create profiles for Mark-specified old staffers. run: ./manage.py user_adjustments FILE_PATH (will email file) | |
5. rebuild search index |
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
Before: | |
Kemp | |
Upton | |
Kipnis | |
C Santana | |
Moustakas | |
[one of: Hosmer / Jennings / Desmond / Rios] | |
Profar | |
[Bogaerts / Olt] |
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
{% if now > datetime.datetime(2013, 2, 14, 22, 45, 0) and now < datetime.datetime(2013, 2, 15, 0, 45, 0) %} |
OlderNewer