This file contains hidden or 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
import os | |
from datetime import datetime | |
import settings | |
from django.conf import settings as dsettings | |
from fdfgen import forge_fdf | |
from tempfile import NamedTemporaryFile | |
from subprocess import call |
This file contains hidden or 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
import os | |
from datetime import datetime | |
import settings | |
from django.conf import settings as dsettings | |
from fdfgen import forge_fdf | |
from tempfile import NamedTemporaryFile | |
from subprocess import call |
This file contains hidden or 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 "main-site/base.html" %} | |
{% load sekizai_tags %} | |
{% block content %} | |
<div id="menu-editor"> | |
<h1>Your Menus</h1> | |
{% for menu in menus %} | |
<div class="menu sortableCats" rel="{{ menu.id }}"> |
This file contains hidden or 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.syndication.views import Feed | |
from django.utils.feedgenerator import Rss201rev2Feed | |
from apps.news.models import Article | |
class RssNewsFeedGenerator(Rss201rev2Feed): | |
def add_item_elements(self, handler, item): | |
super(RssNewsFeedGenerator, self).add_item_elements(handler, item) | |
if 'image' in item: | |
handler.addQuickElement(u'enclosure', '', { |
This file contains hidden or 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
Joshua | |
have you heard of jHtmlArea? | |
me | |
Now hat is it? | |
Joshua | |
something like tiny | |
you recommend tiny? |
This file contains hidden or 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.shortcuts import render_to_response | |
from django.template import RequestContext, Context, loader | |
from django.http import Http404, HttpResponse | |
from django.utils import simplejson | |
from apps.menus.models import Menu, Category, Label, Item, Recommend | |
from apps.menus.forms import CategoryForm, ItemForm | |
def json_response(x): | |
return HttpResponse(simplejson.dumps(x, sort_keys=True, indent=2), |
This file contains hidden or 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 "main-site/base.html" %} | |
{% load sekizai_tags %} | |
{% block content %} | |
<div id="menu-editor"> | |
<h1>Your Menus</h1> | |
{% for menu in menus %} | |
<div class="menu sortableCats" rel="{{ menu.id }}"> |
This file contains hidden or 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
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. | |
'NAME': '/Users/robert/Desktop/test/development/forknsite/database.db', # Or path to database file if using sqlite3. | |
'USER': '', # Not used with sqlite3. |
This file contains hidden or 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
import os | |
from ast import literal_eval | |
from datetime import datetime | |
import pytz | |
from django.db import models | |
from django.conf import settings | |
from apps.themes.models import Template |
This file contains hidden or 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
@property | |
def render_business_hours(self): | |
today = datetime.today() | |
day_table = [ | |
'mon', | |
'tues', | |
'wed', | |
'thurs', | |
'fri', | |
'sat', |