django

Why does django-sphinx only output 20 results? How can I get the rest?

Doing a search using django-sphinx gives me results._sphinx that says there were 68 results, but when I iterate over them, I can only get at the first 20 of them. I'm SURE there's a way around this, and that this is by design, but it's officially stumping the heck out of me. Does anybody know how to get the complete queryset? ...

Django send_mail results in error 61 refused on Mac OSX

Running into a very stange error. I'm running Django on my Mac OSX and when I tried to send an email from my application it hangs and gives me this error: "Error 61 Connection Refused" Any ideas? I don't have my firewall turned on. I can upload an image of the error if needed. ...

Django admin interface upload failing on request data read error

Hi All, This is an updated version of an old question I asked. I've now done a lot more testing, plus the old question got hijacked. I'm getting a request data read error when trying to upload files to the Django admin interface. Files under about 150k work, but bigger files always fail and almost always at around 192k (that's 3 chunks...

Django BigInteger auto-increment field as primary key?

Hi all, I'm currently building a project which involves a lot of collective intelligence. Every user visiting the web site gets created a unique profile and their data is later used to calculate best matches for themselves and other users. By default, Django creates an INT(11) id field to handle models primary keys. I'm concerned with ...

how to get the 'uri' from request object in django..

is there request.uri ??? thanks ...

Enforce unique upload file names using django?

What's the best way to rename photos with a unique filename on the server as they are uploaded, using django? I want to make sure each name is used only once. Are there any pinax apps that can do this, perhaps with GUID? ...

Help with Django Model relationship & admin screen

My first time with Django and StackOverflow so could do with a little help. A Platform has many Categories and a Category can belong to many Platforms. A product belongs to one Platform and one or more of that Platforms Categories. So this is what I have so far for my Models: class Category(models.Model): name = models.CharField(...

Sending messages between two Python servers

I have two servers - one Django, the other likely to be written in Python - and one is putting 'tasks' into a database and another is processing these tasks. They share a database, but I want the processor to react quickly to new tasks rather than polling periodically. Are there any straightforward ways for two Python servers to talk t...

Django view security and best-practices

Hi everybody, I've recently begun working on Django and now my app is nearing completion and i've begun to wonder about security and best-practices. I have view that generates a page and different functions in the page post AJAX requests to individual views. For example, I have a view called show_employees and I can delete and update e...

Django | Save model's choice list values

I have a form that has a choice list: <select name="cellSerpro" id="idcellserpro" class="field text" > <option value="">---</option> <option value="option1">Verizon</option> <option value="option2">AT&T</option> <option value="option3">T-Mobile</option> <option value="option4">Sprint</option> </select> So how do I ...

Django CMS malfunction: Site matching query does not exist

I've installed all apps in a project, then added a site in the sites section, and deleted example.com. Now Pages section in Django CMS 2.0 isn't working: it raises a DoesNotExist exception: Site matching query does not exist. at http://127.0.0.1:8000/admin/cms/page/ The section worked normally before I deleted the example.com site. In ...

How to describe m2m triple-join table in model (Django)

My question is pretty much the same as this question, except that ALL relationships should be many-to-many. I have the following classes in my models.py (somewhat simplified): class Profile(models.Model): # Extending the built in User model user = models.ForeignKey(User, unique=True) birthday = models.DateField() class...

Problem bounding name to a class in Django

Hello! I've got a view function that has to decide which form to use depending on some conditions. The two forms look like that: class OpenExtraForm(forms.ModelForm): class Meta: model = Extra def __init__(self, *args, **kwargs): super(OpenExtraForm, self).__init__(*args, **kwargs) self.fields['opening...

Django: Breaking up views

This is really just a "best practices" question... I find that When developing an app, I often end up with a lot of views. Is it common practice to break these views up into several view files? In other words... instead of just having views.py, is it common to have views_1.py, views_2.py, views_3.py (but named more appropriately, perha...

Looking for a java web framework that support django styled url handling

I'm looking for a java web framework that will allow you to configure dynamic urls where information is being passed to the controller. For example /{clientName}/login would call the same controller regardless of the clientName and pass that clientName as an accessible value or an object in it's own right. ...

input_formats in django admin has no effect

I'm trying to use input_foramts in the admin but it has no effect. What am I doing wrong? # model class Feedback(models.Model): created_at = models.DateTimeField(auto_now_add=True) # admin form class FeedbackAdminForm(forms.ModelForm): created_at = forms.DateTimeField(input_formats=('%d/%m/%Y',)) class Meta: model = Feedback...

google-app-engine: json module

Hey i'm using JSON with appengine. I'm using json for comunication, so in the python side i have import json the error i'm getting is this: <class 'django.core.exceptions.ViewDoesNotExist'>: Could not import views.ganttapp. Error was: No module named json In my stand alone this works great, is there any problem with json on the ap...

jQuery as a replacement for Django or Web2Py

Hi all, I was planning to write a new webapp, I figured out two options for my backend - web2py or django. I recently came across jQuery and found it to be very cool. Could I just use jQuery as a replacement for django and web2py and finish this webapp. Some features that I'm going to implement - user profiles, users can add content...

how to customizing fields in django's comment app?

How can I customize the django builtin comment app so that the fields url, email will be ignored and automatically populate the name with the user's username since I'm only allowing comments from authenticated users? ...

Django - how to make ImageField/FileField optional?

class Product(models.Model): ... image = models.ImageField(upload_to = generate_filename, blank = True) When I use ImageField (blank=True) and do not select image into admin form, exception occures. In django code you can see this: class FieldFile(File): .... def _require_file(self): if not self: ...