Is there a good way to get the debug information that Django provides when using jQuery to make Ajax calls? Right now when I make a call, I just see a http/200 server error in the python runserver window, but because the call is made through javascript, I don't get a debug page with all the information.
...
Desperate, please help. Will work for food :)
I want to be able to have pages at the following URLs, and I want to be able to look them up by their URL (ie, If somebody goes to a certain URL, I want to be able to check for a page there).
mysite.com/somepage/somesubpage/somesubsubpage/
mysite.com/somepage/somesubpage/anothersubpage/
my...
Srry for my English.
I am creating some Django application, that does various long computations with uploaded files. I don't want make user wait for the file to be handled - i just want to show him some page like 'file is being parsed'.
So, how can i make an asynchronous function call from a view?
Something that may look like that:
d...
Can someone please explain how you can write a url pattern and view that allows optional parameters? I've done this successfully, but I always break the url template tag.
Here's what I have currently:
Pattern
(r'^so/(?P<required>\d+)/?(?P<optional>(.*))/?$', 'myapp.so')
View
def so(request, required, optional):
If I use the url t...
Hey,
I'm looking for some open source, free to change and use project written on Pyton+Django with following features:
Blog (for site, not for users)
Users Registration
User Profiles
Adding friends, watching what friends added
Award system for active users (carma, rating)
Content rating
Comments
Probably different users levels (for a...
A client wants to ensure that I cannot read sensitive data from their site, which will still be administered by me. In practice, this means that I'll have database access, but it can't be possible for me to read the contents of certain Model Fields. Is there any way to make the data inaccessible to me, but still decrypted by the server t...
I'm using Django 1.1 with Mysql 5.* and MyISAM tables.
Some of my queries can take a TON of time for outliers in my data set. These lock the tables and shut the site down. Other times it seems some users cancel the request before it is done and some queries will be stuck in the "Preparing" phase locking all other queries out.
I'm going...
Django as a framework is a neat little package. There are very few files (compared to Rails) and it's got a clean structure. The fact that you can plug and unplug apps between different projects is an extremely nifty feature. At the same time, Ruby's hacking ability is unparalleled. It's complete object-orientedness makes it more express...
After upgarding my MBP to 10.6, I get the following in my apache's error.log:
[error] [client ::1] Premature end of script headers: django.wsgi
WSGI FAQ suggests:
If using daemon mode, this is a symptom of the mod_wsgi daemon process crashing when handling a request. You would probably also see the message 'segmentation fault'. See...
Can the object value be looked up and passed to the generic view? Would the generic views need to be moved to views.py in order to support the object lookup?
urls.py
urlpatterns = patterns('myapp.views',
url(r'^mymodel/create/$', view='mymodel_create', name='mymodel_create'),
)
urlpatterns += patterns('django.views.generic',
...
In my model I have :
class Alias(MyBaseModel):
remote_image = models.URLField(max_length=500, null=True, help_text="A URL that is downloaded and cached for the image. Only
used when the alias is made")
image = models.ImageField(upload_to='alias', default='alias-default.png', help_text="An image representing the alias")
de...
Hi, I have a problem reading a txt file to insert in the mysql db table, te sniped of this code:
file contains the in first line: "aclaración"
archivo = open('file.txt',"r")
for line in archivo.readlines():
....body = body + line
model = MyModel(body=body)
model.save()
i get a DjangoUnicodeDecodeError:
'utf8' codec can't...
I'm having some trouble trying to organize a bunch of ajax calls I have on my index page of a record submission application. This is what I'm trying to do:
I have a list on my /index page that hold a list of items I have in a database. This list is generated by django when I send an ajax call to /show_list and then load it into the o...
What is the best procedure/plugging to use to integrate django and google app engine? I have read many articles in the internet and seen videos on how to go round this. Am still left wondering which is the best procedure to use.
Is there an official procedure documented in django or google app engine. Examples and site references will ...
When creating a form, I wish to use one field on the model as a label to go with another field that I'm updating.
I've overridden the BaseModelFormSet with a new _init__ method, like this:
class BaseMyFormSet(BaseModelFormSet):
def __init__(self, *args, **kwargs):
super(BaseMyFormSet, self).__init__(*args, **kwargs)
for ...
I've been pulling my hair out trying to solve this problem and I've tried everything and I have no ideas left.
I keep seeing this error:
Exception Value: 'thumbnail' is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module named sorl.thumbnail.main
$DJANGO_PACKAGES/sorl/thumbnail/main.p...
hi, Im following the django tutorial from http://docs.djangoproject.com/en/dev/intro/tutorial01/
but I have a problem at step:python manage.py sql polls
django.core.exceptions.ImproperlyConfiguraed:Error loading pysqlite2 module: No module named pysqlite2
My system is windows vista,and python version 2.5 django version 1.1
only thi...
Hi,
I gave details on my code : I don't know why my table is empty (it seems that it was empty out after calling save_model, but I'm not sure).
class PostAdmin(admin.ModelAdmin):
def save_model(self, request, post, form, change):
post.save()
# Authors must be saved after saving post
print form.cleaned_data[...
I am trying to create a simple board game (a kind of checkers), where users will be able to play online with each other using flex application as a client.
I am using django application to process the game on the server side. And I come across the problem, if one user made a move, I can send it to a server, but how do I let the opponent...
Let's say I have two models looking like this:
class ProductType(models.Model):
product_type = models.CharField(max_length=100)
class Product(models.Model):
name = models.CharField(max_length=200)
slug = models.SlugField()
product_type = models.ForeignKey(ProductType)
score = models.PositiveIntegerField(default=0...