I seem to have run into a bit of an issue.
I am busy creating an app, and over the last few weeks setup my server to use Git, mod_wsgi to host this app.
Since deploying it, everything seems to be running smoothly however, I had to go through all my files and insert the absolute url of the project to make sure it works fine.
on my loca...
Is there a way to save a cookie that is available on other site ?
For instance I have my django project on http://www.example.com and I want that django saves a cookies for a site written in PHP on http://site.Idontknow.com .
Is this possible ?
...
Hi there,
I'm using django-haystack for a search page on my site. I'm basically done, but not quite happy with the ordering and not quite sure how haystack decides how to order everything.
I know I can over-ride the SearchQuerySet by using order_by but that over-rides it entirely. Let's say I want to force the search to order by in sto...
So I am trying to emulate google app's status page: http://www.google.com/appsstatus#hl=en but for backups for our own servers. Instead of service names on the left it'll be server names but the dates and hopefully the pagination will be there too. My models look incredibly similar to this:
from django.db import models
STATUS_CHOICES...
I want to know the correct way to structure ajax views in django.
say i do something like :
def foo_json(request):
if is.ajax():
# return JSON here
and make it available as a resource at something like '/foo/data/'..
all is fine..
but if I point the browser at '/foo/data/' .. obviously I get an error (debug) like:
a...
I am trying to get going with Djangoappengine. I followed the instructions, but when I get to this step:
manage.py createsuperuser
I get the following:
Unknown command: 'createsuperuser'
So I ran
manage.py help
And saw that 'createsuperuser' is not even in the list.
The list of subcommands listed by help:
cleanup
compilemessa...
I have models like this:
class User(models.Model):
Switch = models.ForeignKey(Switch, related_name='SwitchUsers')
Port = models.ForeignKey(Port)
class Switch(models.Model):
Name = models.CharField(max_length=50)
class Port(models.Model):
PortNum = models.PositiveIntegerField()
Switch = models.ForeignKey(Switch...
I followed the Djangoappengine instructions.
I used their django-testapp and copied the following folders in the django-testapp folder according to what I understood the instructions to say:
django
djangoappengine
djangotoolbox
I then started the dev server by running:
manage.py runserver
Then navigated to
http://localhost:...
This code in PHP sends a HTTP POST to a Django app using CURL lib.
I need that this code sends POST but redirect to the page in the same submit. Like a simple form does.
The PHP Code:
$c = curl_init();
curl_setopt($c, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($c, CURLOPT_URL, "http://www.xxx.com");
curl_setopt($c, CURLOPT_POST, true)...
After a migration with south, I ended up deleting a column. Now the current data in one of my tables is screwed up and I want to delete it, but attempts to delete just result in an error:
>>> d = Degree.objects.all()
>>> d.delete()
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "C:\Python26\lib\site-p...
I know this has probably been asked before, but I can't find it with SO's search.
Lets say i've TABLE1 and TABLE2, how should I expect the performance of a query such as this:
SELECT * FROM TABLE1 WHERE id IN SUBQUERY_ON_TABLE2;
to go down as the number of rows in TABLE1 and TABLE2 grow and id is a primary key on TABLE1.
Yes, I know...
Hi, Im writing an app that will display the register view depending if is first time visitor.
What and How is the better way to do this with Django?
thxs.
...
Hi folks...I have a dictionary with embedded objects, which looks something like this:
notes = {
2009: [<Note: Test note>, <Note: Another test note>],
2010: [<Note: Third test note>, <Note: Fourth test note>],
}
I'm trying to access each of the note objects inside a django template, and having a helluva time navigating to them...
I am using django-mssql and SQL Server 2008, but I found that it always errors when I do some
commands,for example:
python manage.py syncdb
the error is below:
raise OperationalError(e, "Error opening connection: " + connection_string) sqlserver_ado.dbapi.OperationalError: (com_error(-2147352567, '\xb7\xa2\xc9\xfa\ xd2\xe2\xcd\xe2\xa...
My models:
class Order(models.Model):
ordered_by = models.ForeignKey(User)
reasons = models.ManyToManyField(Reason)
class Reason(models.Model):
description = models.CharField()
Basically a user creates an order and gives reasons for that order. ie, john has two orders (one for pencils because he is out AND because he doesn...
Anyone know of any pre-existing tools out there what will highlight differences in output when running Django tests?
I'm comparing some JSON output and it's tough to find things like extra spaces. I was about to just copy and paste this into an existing diff tool but I figured this might be on someone's radar.
Currently I see somethin...
I need to securely crypt and decrypt information about users ( name, surname and user_id ) in cookies.
What is the best way to do this ? What encryption and decryption function do I need ?
Thanks ^_^
...
Hi folks,
my admin urls are sat behind a prefix by doing the following.
1#
(r'^admin/', include(admin.site.urls)),
is placed within urls_core.py
2#
(r'^api/', include('project.urls_core')),
is palced within urls.py
All admin URLs work fine except app indexes.
If I go to any URL such as:
/api/admin/core/
/api/admin/registr...
I'm trying to integrate facebook into my application so that users can use their FB login to login to my site. I've got everything up and running and there are no issues when I run my site using the command line
python manage.py runserver
But this same code refuses to run when I try and run it through Apache.
I get the following erro...
I want to generate a dynamically created png image with Pycairo and serve it usign Django. I read this: http://stackoverflow.com/questions/1074200/serve-a-dynamically-generated-image-with-django.
Is there a way to transport data from Pycairo surface directly into HTTP response? I'm doing this for now:
data = surface.to_rgba()
im = Imag...