Django development server keeps restarting itself, without any differences made to any files under the project directory.
Below is the output:
den@ev:~/calisma/ > python manage.py runserver 9000 -v 2 --traceback
Validating models...
0 errors found
Django version 1.1.1, using settings 'myproject.settings'
Development server is runnin...
Hi.
I have a following scenario:
A user fills in a URL to an image in a form (plain text field). In the form's model I also have ThumbnailField but it's hidden in the form.
image = ThumbnailField(editable=False, upload_to='media/images/products/', blank=True, null=True, size=(300, 300),
extra_thumbnails={
'icon': {'size': ...
I know that you can get the SQL of a given QuerySet using
print query.query
but as we know from a previous question ( http://stackoverflow.com/questions/2926483/potential-django-bug-in-queryset-query ) the returned SQL is not properly quoted. See http://code.djangoproject.com/browser/django/trunk/django/db/models/sql/query.py
Is ther...
Is it possible to perform a subquery on a QuerySet using another QuerySet?
For example:
q = Something.objects.filter(x=y).extra(where=query_set2)
...
Hi,
I have to make a decision for our (eXma german) community webpage. We will relauching it with a new system.
There are two sites:
The first is to develop a whole new system on e.g. Django and Python.
The second is to use the new Drupal 7.
Personally I have a lot more experiences with Drupal 6 and now since I'm testing Drupal 7 ...
Does anyone know if there's an out-of-the box way of storing images directly in the database vs. using ImageField model type that simply uploads it to the MEDIA_ROOT.
And if there is, how does one serve those images then?
Cheers
...
Other posters have previously said in this forum that when your Django app starts getting big and unmanageable, you should split it up into several apps. I'm at that point now. What are the best practices for allowing communication between these apps?
One of my apps (let's call it Processor) processes very large data sets. Once an hour ...
I am little new to django and trying to find best ways to do things instead of writing everything myself. I am working on a model where I need multiple types of tags to be associated with a model and then I want to retrieve the objects using multiple filtering criteria. I see that in django-tagging tags are stored per model so I think it...
I am working with Django and use Django shell all the time. The annoying part is that while the Django server reloads on code changes, the shell does not, so every time I make a change to a method I am testing, I need to quit the shell and restart it, re-import all the modules I need, reinitialize all the variables I need etc. While iPyt...
Hello,
I have one questions I have start project Sth. in sth project I have created app called misc. In view file in misc I have function index. When i try do render it i got NameError misc not found. Here is my urls.py
(r'^$'),misc.index,
and here is how I add line for installed apps.
'Sth.misc',
I know that this is easy to do bu...
Having these models on google app engine:
class Choice(db.Model):
poll = db.ReferenceProperty(Poll, collection_name = 'choices' )
text = db.StringProperty()
class Vote(db.Model):
choice = db.ReferenceProperty(Choice, collection_name = 'votes' )
ip = db.StringProperty()
date = db.DateTimeProperty(auto_now=1)
How do...
I always thought it was OK to just import all of your modules at the top of a view file. Then if you ever change a model name you can just edit the import at the top and not go digging through every view function that you need it imported in.
Well, I just ran into an instance where I had imported a model at the top of a view file, an...
Hello,
I'm trying to install a shopping cart plugin for django but having a problem when I run manage.py syncdb.
When run, it installs 4 tables, then I'm getting the following error message:
File
"(mypath)/django/db/backends/postgresql_psycopg2/base.py",
line 44, in execute
return self.cursor.execute(query, args) django....
I have seen many reportlab graphing examples. Generating the graph is not the problem, I can't seem to figure out how to display the graph on the pdf.
Here is the code:
buffer = StringIO()
p = canvas.Canvas(buffer, pagesize = letter)
##### Beginning of code in question
d = Drawing(200, 100)
pc = Pie()
pc.x = 65
pc.y = 15
pc.width = ...
I'm new to Google Apps Engine (working on an existing project for someone else) and it seems a bit different than Django as far as the login as the login is handled by Google, I'm trying to make it so the app creates a custom cookie for a user upon their logging in but can't seem to find the handler for the login action... I apologize fo...
I'm trying, in vain, to create a simple Django template tag to either show or hide a "delete" link next to a submitted comment on my site.
In a nutshell, I want to pass the comment object to the template tag, determine if the currently logged in user is authorized to delete the comment and then either show or not show the link.
The usa...
I was looking over the Django documentation on a way to do this but didn't see anything, though I may have missed it as I'm not sure exactly where to look... I want to be able to perform a specific action on every user request, such as instantiating a class and calling one of its functions, however the only way I know of to do this now i...
Hey I just got apache2 working with mod_wsgi on my django_project directory, which is pretty kool. However I can only make it work if I set the permissions on my django_project to
chmod -R 777 django_project not so nice I believe.
Can anyone tell me what chmod -R xxx django_project I should be running. Im not too tight on the whole ...
I've got a model that looks something like this:
class HeiselFoo(models.Model):
title = models.CharField(max_length=250)
class Meta:
""" Meta """
app_label = "Foos"
db_table = u"medley_heiselfoo_heiselfoo"
And whenever I run my test suite, I get an error because Django isn't creating the tables for tha...
Hi I have an application that works fine when I type the url from the browser. it works something like http://mysite/service?id=1234, if I type that on the browser it works fine, however we have another service that accepts parameters from a mobile phone, this service would then call the same url, and post the parameter onto it.
I know...