I have a template showing a list of events. To prepare list of events I'm using generic views, and set 'paginate_by' parameter. Strangely when I load my page I see :
TemplateSyntaxError at /event/latest/
Caught an exception while rendering: 'int' object is not iterable
in 9th line of pagination.html template :
{% if is_paginated %}
{...
I have a form (not a model one) for a rsync front-end type. So I would like that when the user selects the source, it will get deleted from the destination choice. I'm new to python and django so forgive my ignorance. This is my forms.py:
from django import forms
class ChoiceForm(forms.Form):
source = forms.ChoiceField(choices=[(1,...
I have a custom model fields, that can have 'chain' argument.
from django.db import models
class ChainField(object):
def __init__(self, *args, **kwargs):
chain = kwargs.get('chain', False)
if chain:
self.chain = chain
del kwargs['chain']
super(self.__class__.__mro__[2], self).__init...
I'm building a Django management command which is creating website screenshots using Paul Hammond's webkit2png script (http://www.paulhammond.org/webkit2png/) and stores them into my DB.
For this command I'm using the 'call' command from 'subprocess'. How do I execute this command in specific directory (temp/ under django project in thi...
Assume a Django app, shop, whose urls.py is included in the main urls.py:
# main urls.py
urlpatterns = patterns('',
(r'^[^/]+/shop/', include('shop.urls')),
)
Note, that there is an arbitrary prefix before /shop. This is of no interest for the shop app, it's only interesting to some middleware.
The shop.urls could look like this:...
I and trying to use djangoappengine, but I am unsure how can I write model to incorporate standard
ListProperty(db.Key)
I know that djangotoolbox provides this field types but I am unable to figure out the exact syntax.
...
Hi,
I've got a website http://www.mydomain.com made with Django, and I'd like to use the domain to host a facebook application written in PHP, in something like http://www.mydomain.com/facebook/myapp/.
Is that possible? How can I do that?
Thanks
Jul
...
hi, I'm currently using Open Flash Chart 2 on my django website, but I find it insufficiently customizable. (It's great when you want the usual barcharts, piecharts, but what about homemade shapes...). Although it's open source, I don't feel like diving in the Flex code.
I'm thinking a lot about matplotlib but the documentation is rathe...
Has anyone of you done evaluation of a django project and how to improve/refactor it's code base? A pet project in company I work at is becoming more widely used and it would be good to improve its quality before further development. Are there any techniques or methodologies of analyzing django projects before we start putting more and m...
I'm developing a django-based MMO, and I'm wondering what would be the best way for server-client communication. The solutions I found are:
periodical AJAX calls
keeping a connection alive and sending data through it
Later edit:
This would consist in "you have a message", "user x attacked you", "your transport to x has arrived" and ...
I'm trying to use a custom authentication backend for a Django project I'm working on. My backend is based on the LDAPBackend found in the article LDAP Authentication in Django with Backends.
I'm getting the floowing error when I attempt to log in:
ImproperlyConfigured at /admin/
Module "challenge.backends" does not define a "LDAPBack...
Hi,
I am planning to have multiple site running from one Django Codebase using Apache + mod_wsgi.
Could anyone please help me in achieving this.
...
I've declared a formset like so:
class BaseFeatureFormSet(BaseFormSet):
def save(self, commit = True):
feature = Feature(name = self.cleaned_data['name'],
type = self.cleaned_data['type'],
premium = self.cleaned_data['premium'],)
feature.save()
return feature
Fea...
I am working on a webapp that interacts with data via XML-RPC rather than with a direct connection to a database. I can execute SQL queries via an XML-RPC methods.
I would like to interact with the data in an ORM framework fashion that has lazy/eager fetching, etc., although I can't seem to figure out how that would be possible with Py...
I've been looking at Rietveld as a solution for the lack of code reviews at my company. Can it be set up on a server in-house without using App Engine? It seems to have a bit of App Engine specific code, and I'm not sure it could be set up on a plain old Django/Apache install. I've looked around, but haven't found any information abou...
I'm trying to load a large dataset of about 76K entries from a JSON file generated by the dumpdata command and after a while the process exits with only "Killed" as error message ..
What do ?
No I can split the dataset by app .. all the heavy data is contained within a single table.
...
How i can get the current language of my web in a model or in the admin?
...
Hi everyone!
I'm using an API from a different site that returns a couple of 'pricepoint URL's that my users use to buy Virtual Goods.
I'm supposed to cache those results for at least an hour, since they don't change the price points on their system much. (And we want to save both our's and their bandwidth.)
After looking for singleto...
I want to have some place where I can watch all the pendings tasks.
I'm not talking about the registered functions/classes as tasks, but the actual scheduled jobs for which I could display: name, task_id, eta, worker, etc.
Using Celery 2.0.2 and djcelery, I found `inspect' in the documentation. I tried:
from celery.task.control import...
Not talking about the delay method.
I want to be able to get a task, given it's task_id and change it's ETA on the fly, before it is executed.
For now I have to cancel it, and re-schedule one. Troublesome if the scheduled process involve a lot of stuff.
...