django

Django upload failing on request data read error

Hi All, I've got a Django app that accepts uploads from jQuery uploadify, a jQ plugin that uses flash to upload files and give a progress bar. Files under about 150k work, but bigger files always fail and almost always at around 192k (that's 3 chunks) completed, sometimes at around 160k. The Exception I get is below. exceptions.IOError...

get_or_create generic relations in Django & python debugging in general

I ran the code to create the generically related objects from this demo: http://www.djangoproject.com/documentation/models/generic_relations/ Everything is good intially: >>> bacon.tags.create(tag="fatty") <TaggedItem: fatty> >>> tag, newtag = bacon.tags.get_or_create(tag="fatty") >>> tag <TaggedItem: fatty> >>> newtag False But then...

how to create a page only can be visited by admin using django..

how to do this and has pinax any app do this ? thanks ...

is there any app used for upload in pinax ?

i want to upload something thanks ...

Django 404 page not showing up

Hey all, I'm in the middle of putting up my first django application on shared hosting. This should be an easy thing, but I am just not seeing it. I tried to follow the directions of the django documentation, and created a 404.html page within my template folder. I just wrote "This is a 404 page." in the .html file. I also did th...

what is the 'related_name' mean in django ..

what is the useful for? thanks members = models.ManyToManyField(User, related_name='maps', verbose_name=_('members')) ...

Activate a python virtual environment using activate_this.py in a fabfile on Windows

I have a Fabric task that needs to access the settings of my Django project. On Windows, I'm unable to install Fabric into the project's virtualenv (issues with Paramiko + pycrypto deps). However, I am able to install Fabric in my system-wide site-packages, no problem. I have installed Django into the project's virtualenv and I am able...

Asynchronous database update in Django?

I have a big form on my site. When the users fill it out and submit it, most of the data just gets dumped to the database, and then they get redirected to a new page. However, I'd also like to use the data to query another site, and then parse the results. That might take a bit longer. It's not essential that the user sees these results ...

I can't login to my Django app when debug is set to False

I have a very strange problem, and I don't know how to fix or debug it. Short Story: I get locked out of my Django app when Debug is set to False. Long story: Case 1 (the first time it happened): 1. I enter my login info, but It just redirects to the login page. 2. I restart the server, try to login, and it works fine, I get in. 3. a...

how to add django site to google-app-engine,any simple way ?

how to do this thanks ...

how do i install mod_wsgi in ubuntu

hi i developing website with but unable install mod_wsgi in my ubuntu9.10 in which python2.6 is default. ...

ProgrammingError: (1146, "Table 'test_<DB>.<TABLE>' doesn't exist") when running unit test for Django

I'm running a unit test using the Django framework and get this error. Running the actual code does not have this problem, running the unit tests creates a test database on the fly so I suspect the issue lies there. The code that throws the error looks like this member = Member.objects.get(email=email_address) and the model looks li...

sending the data from form to db in django

I have a form in which I can input text through text boxes. How do I make these data go into the db on clicking submit. this is the code of the form in the template. <form method="post" action="app/save_page"> <p> Title:<input type="text" name="title"/> </p> <p> Name:<input type="text" name="name"/> </p> <p> Phone:<input type="text" n...

Is django orm & templates thread safe?

I'm using django orm and templates to create a background service that is ran as management command. Do you know if django is thread safe? I'd like to use threads to speed up processing. The processing is blocked by I/O not CPU so I don't care about performance hit caused by GIL. ...

Django manytomany, imageField and upload_to

Hello, I have the two models shown below: class EntryImage(models.Model): image = models.ImageField(upload_to="entries") class Entry(models.Model): code = models.CharField(max_length=70, unique=True) images = models.ManyToManyField(EntryImage, null=True, blank=True) As you can see, Entry can have 0 or more images. M...

customizing Django look and feel in Python

I am learning Django and got it to work with wsgi. I'm following the tutorial here: http://docs.djangoproject.com/en/1.1/intro/tutorial01/ My question is: how can I customize the look and feel of Django? Is there a repository of templates that "look good", kind of like there are for Wordpress, that I can start from? I find the tuto...

Can a WordPress blog pull content from Django pages?

Say you have a WordPress theme you like, but want to make use of a bunch of Django code that's already written. Is there a good and easy, and performant way, of sucking in HTML that is output from Django and displaying it inline in a WordPress posting, or page without using browser frames? Any good examples of this? ...

How to allow sorting in the Django admin by a custom list_display field, which doesn't have a DB field nor annotatable

I have a custom list_display field which is responsible for a column of integers in one of my admin pages. I need to allow staff members to sort according to it. There's a solution for how to acheive that if the integer represents a count/average/etc of some DB field, which is not the case for me. [ the solution for that case is here:...

python interactive web data/forms/interface communicating with remote server

What's an efficient method (preferably simple as well) for communicating with a remote server and allowing the user to 'interact' with it (IE submit commands, user interface) via the web browser (IE a text box to input commands, and an text area for output, or various command-less abstracted interfaces)? I have the 'standalone' python c...

Django | django-socialregistration error

I'm trying to add the facebook connect feature to my site, I decided to use django socialregistration.All are setup including pyfacebook, here is my source code. settings.py MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.midd...