Django is an open source web application framework. Written in Python, it follows the MVC (model-view-controller) architectural pattern. Django's primary goal is to ease the creation of complex, database-driven websites. It emphasizes reusability and "pluggability" of components, rapid development, ...
0
votes
0answers
7 views
saving custom modelformset kills Python with BusError after going from 1.2.6 to 1.4
I have this form:
# A form to change existing items
class ChangeItemForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(ChangeItemForm, self).__init__(*args, **kwargs)
...
0
votes
1answer
9 views
Django serialize datetime to json in QuerySet/Dict
I've tried to serialize QuerySet or Dict object with datetime.date object in the following ways:
Way #1:
json.dumps(MyModel.objects.values())
Raises error:
Exception Value: [{'date': ...
0
votes
0answers
16 views
Django Error; how to empty tmp directory, cache
A template error has occurred in my project and after trying for hours with another member to resolve it Django Error After Changing/Reverting Views, it was determined it might be a cache error and to ...
0
votes
0answers
10 views
Flot not rendering in Django
I am attempting to learn Django and Javascript/jQuery for a personal project. I want to plot some data using Flot and I am attempting to get a test plot to render but I seem to be doing it wrong.
In ...
0
votes
1answer
12 views
Django Error After Changing/Reverting Views
I was changing some views earlier related to some geolocation (that failed) and upon restoring the previous views, I'm receiving this error:
TemplateSyntaxError at /report/all/
Caught NoReverseMatch ...
2
votes
0answers
23 views
Is this Django Middleware Thread-safe?
I am writing forum app on Django using custom session/auth/users/acl system. One of goals is allowing users to browse and use my app even if they have cookies off. Coming from PHP world, best solution ...
1
vote
0answers
26 views
Resolving GeoIP coordinates in development mode
I'm trying to insert the lat, lon directly into a form using GeoIP. There have been issues, more than likely because I'm in development mode with local host and the IP address can't be properly ...
4
votes
1answer
68 views
Why accept kwargs but not use them?
I was looking at the Django source code today and I noticed this:
class DjangoTestSuiteRunner(object):
def __init__(self, verbosity=1, interactive=True, failfast=True, **kwargs):
...
0
votes
2answers
23 views
Placing GeoIP IP/lat_lon Information in Django Forms
I'm currently working on an application where I want to automatically insert the latitude and longitude coordinates into a user form. I found a previous post here which aims to do almost exactly what ...
0
votes
2answers
30 views
django retrieveing user objects
I have a simple model like this:
class Auction(models.Model):
name = models.CharField()
class Item(models.Model):
auction = models.ForeignKey(Auction)
name = models.CharField()
price ...
0
votes
0answers
32 views
Not using form cleaned_data for autocompletes in django
I'm using an autocomplete within a form. The forms save doesn't seem to want to properly take in my hidden field.
The autocomplete shows a name: for instance 'Steve Butabi'. Its supposed to be ...
0
votes
1answer
29 views
Use method of model class within save method
I'm trying to override the save method of one of my models. Within that save method I would like to use another method of the model, like this:
class MyModel(models.Model):
name = ...
2
votes
2answers
25 views
How can I exclude files in my .gitignore when packaging a Python egg?
I'm packaging my first Django app and I want to leave out my settings_local.py file from the egg. Ideally I'm looking for a way to just have everything in my .gitignore file also excluded from the ...
0
votes
0answers
33 views
What is the “nice” way to debug django when requests originate remotely?
When someone is remotely hitting a Django server (say, not with a browser, but with a robot or other automated tool), what is the "nice" way for me to trace what the server is doing, and attempt to ...
0
votes
0answers
21 views
How to generate images with text on the fly with django
In the django application I am developing, the user picks a string from a set of strings, and an image from a set of images. How can I merge the text onto the image on the fly and generate a new ...