Quantcast
Channel: CCNA final exam 2013, Java, PHP, Cshap, html, flash, javascript, Facebook » django
Browsing all 23 articles
Browse latest View live

How to measure Django cache performance?

I have a rather small (ca. 4.5k pageviews a day) website running on Django, with PostgreSQL 8.3 as the db. I am using the database as both the cache and the sesssion backend. I’ve heard a lot of good...

View Article



Avoiding dog-piling or thundering herd in a memcached expiration scenario

I have the result of a query that is very expensive. It is the join of several tables and a map reduce job. This is cached in memcached for 15 minutes. Once the cache expires the queries are obviously...

View Article

Editing the raw HTML inside a TinyMCE control

I have a Django website in which I use django-tinymce to edit HTML fields with a TinyMCE control. TinyMCE practically gives me a WYSIWYG way to edit HTML. My question is, can I get access to edit the...

View Article

Migrating away from App Engine but still keeping tight Google Account...

I’ve got an app currently running on Google App Engine that takes advantage of the close integration with Google Accounts to the extent that it was the only way users would sign in. The sign-in process...

View Article

Query for a ManytoMany Field with Through in Django

I have a models in Django that are something like this: class Classification(models.Model): name = models.CharField(choices=class_choices) ... class Activity(models.Model): name =...

View Article


Specifying ManyToMany fields in Django fixtures

The documentation on fixtures says you can specify a natural key using the int value of the primary key. For example: { "pk": 1, "model": "store.book", "fields": { "name": "Mostly Harmless", "author":...

View Article

Having Django serve downloadable files

I want users on the site to be able to download files whose paths are obscured so they cannot be directly downloaded. For instance, I’d like the URL to be something like this,...

View Article

Django Passing Custom Form Parameters to Formset

I have a Django Form that looks like this: class ServiceForm(forms.Form): option = forms.ModelChoiceField(queryset=ServiceOption.objects.none()) rate =...

View Article


django syncdb and an updated model

I have recently updated my model, added a BooleanField to it however when I do python manage.py syncdb, it doesn't add the new field to the database for the model. How can I fix this ?

View Article


Access django models inside of Scrapy

Is it possible to access my django models inside of a Scrapy pipeline, so that I can save my scraped data straight to my model? I've seen this, but I don't really get how to set it up?

View Article

ValueError: Too many values to unpack Django

So I just got my first django app deployed. I did a syncdb and created my superuser account for the site. Now when I access the page and press the login button I get this error. I think it has...

View Article

set language within a django view

background: The view is called when a payment service pings back a payment outcome behind the scenes – afterwhich I need to send an email in the right language to confirm payment and so on. I can get...

View Article

How do I deal with this race condition in django?

This code is supposed to get or create an object and update it if necessary. The code is in production use on a website. In some cases – when the database is busy – it will throw the exception...

View Article


Django admin, hide a model

Hello At the root page of the admin site where registered models appear, I want to hide several models that are registered to the Django admin. If I directly unregister those, I am not able to add new...

View Article

Django admin, hide a model

Hello At the root page of the admin site where registered models appear, I want to hide several models that are registered to the Django admin. If I directly unregister those, I am not able to add new...

View Article


How do I output HTML in a message in the new Django messages framework?

I'm trying to display a bit of html in a message that's being displayed via the new Django messages framework. Specifically, I'm doing this via the ModelAdmin.message_user method, which is just a thin...

View Article

django templates: include and extends

I would like to provide the same content inside 2 different base files. So I’m trying to do this: page1.html: {% extends "base1.html" %} {% include "commondata.html" %} page2.html: {% extends...

View Article


Image may be NSFW.
Clik here to view.

Many to many relationships with additional data on the relationship

I’m trying to create a django database that records all my comic purchases, and I’ve hit a few problems. I’m trying to model the relationship between a comic issue and the artists that work on it. A...

View Article

Python/Django: Which authorize.net library should I use?

I need authorize.net integration for subscription payments, likely using CIM. The requirements are simple – recurring monthly payments, with a few different price points. Customer credit card info will...

View Article

Choosing and deploying a comet server

I want to push data to the browser over HTTP without killing my django/python application. I decided to use a comet server, to proxy requests between my application and the client (though I still...

View Article
Browsing all 23 articles
Browse latest View live




Latest Images