Can I give the same name for different Models in different apps? and What conflicts can happen?
After I have a try.. I got this Error:
Error: One or more models did not validate:
playlist.playlist: Accessor for field 'user' clashes with related field 'User.playlist_set'. Add a related_name argument to the definition for 'user'.
audio_p...
I'm trying to make buildout config that installs psycopg2 egg and postgres from source if needed:
parts =
...
postgre
psycopg2
...
[postgre]
recipe = hexagonit.recipe.cmmi
url = ftp://ftp3.ua.postgresql.org/pub/mirrors/postgresql/source/v9.0.0/postgresql-9.0.0.tar.gz
configure-options =
--without-readline
[psycopg2...
Which framework has the most mature, flexible, intergrated, centralized and easy-to-use plugins/extension system.
My main requirements are:
a centralized system/repository where i could find a extension i need
no need to make changes in the source code, the plugin should be easily enabled and disabled
large plugin/extension database
...
I want to get the absolute url of a given action in Django 0.96 (using Google App Engine).
I have this url configuration:
from django.conf.urls.defaults import patterns
urlpatterns = patterns('framework.facebook',(r'^canvas/invite_friends$','views.inviteFriends'),
)
In my template:
window._url = '{% url views.inviteFriends %}';
I...
I'm using Django to display a form which allows users to submit a book title which will make a request to Amazon to find the information about a book and return the results. However, i keep getting a 403 Forbidden error. I have no idea why.
But the code is working, because whenever i use the script without Django, i receive the book inf...
I have one problem
Looking below:
i have this model
class Shoes(models.Model):
shop = models.ForeignKey(Store, related_name="%(class)s")
name = models.ForeignKey(ShoesItem)
size = models.ManyToManyField(ShoesSize, help_text=_("Get useful sizes"))
price = models.IntegerField() ...
If I have a MultiValueField on one of my search indexes and I want to display each value in the search results, how would I do that? It seems like something is not being formatted appropriately or I am somehow misunderstanding the MultiValueField.
class PageAttachmentIndex(indexes.SearchIndex):
# This should reference search/indexes/pa...
I'm building an application in django and I'd like to have a reports section. The charts will be used to disply numerical values between different dates.
I tried GoogleChartWrapper but I'm looking something more flexible and nicer.
Thanks.
...
Hello. I am trying to synchronize flickr with django. I am using django-syncr app. But i stacked in somewhere.
Database syncdb is ok. But how do we sync the images? Where do we write below code.
from syncr.app.flickr import FlickrSyncr
f = FlickrSyncr(API_KEY, API_SECRET)
f.syncRecentPhotos('username', days=7)
f.syncPublicFavorites('...
Hello-
I'm new to Django and I'm creating an app to create and display employee data for my company.
Currently the model, new employee form, employee table display, login/logout, all works. I am working on editing the current listings.
I have hover on row links to pass the pk (employeeid) over the url and the form is populating correctl...
I tried to install the django-messages 3rd party application to my Django-nonrel / App Engine project. However it threw the error:
'ModelOptions' object has no attribute 'db_table'
Request Method: GET
Request URL: http://localhost:8090/
Django Version: 1.3 pre-alpha
Exception Type: AttributeError
Exception Value:
'ModelOptions'...
Hi,
I'm writing a web app using the django framework and I was just wondering what are the pros/cons of using the built-in django.contrib.auth.models.User model over my own user model?
Please explain in terms of performance, scalability and security.
Many thanks
...
Hi all
I'm trying to get json data from a django view (login required)
into a new android app I'm working on.
I would like to authenticate the user against the django login
and keep the cookie/session for all the django view calls to
get data from the server.
I did some googling but nothing helped me,
even if I guess it should be a q...
I'm trying to pass an image's src to a django view when a button is clicked. In my template, I have:
$("#url_submit").click(function() {
var film = "{{ filmname }}"
var id = {{ id }}
$.ajax({
url: "/db/gallery2/" + film + "/" + id + "/",
data: {url: $('#large_thumbnail').attr('src')},
type: "POST"
});
});
...
I'm developing a project on Google AppEngine, using Django templates, so I have to use tags like {{ aitem.Author }} to print content within my HTML template.
Author, however, can either be a string or a list object, and I have no way to tell it in advance. When the Author is a list and I try to print it on my template, I get the ugly re...
When using the Django ORM from an external shell, using a model with a ForeignKey field an ImportError is thrown when assigning to it.
And here is a paste of my shell sessions both from ./manage.py shell and from normal python shell.
bradyrj@machine:~/workspaces/django/shellgame$ python manage.py shell
Python 2.6.6 (r266:84292, Sep 15 ...
I have django 1.2.3.0 Final and I am using Python 2.7
In my setting, I have 'sqlite3' filled for the DATABASE_ENGINE.
I am able to work with the sqlite3 (at the level of djano manage.py shell) until I am told that I need to access
python manage.py dbshell
At first I got the error "sqlite3 is not recognized...."
Then I read thread...
I have a Django application. I have .json fixture files containing test data, with unit tests that use the data to confirm the application is working properly. I also use South to migrate my database.
After doing a few database migrations, my fixtures are out of date, because the database has migrated, adding a new database column, ...
Hello, i'd like to pass an argument {{x}} to my custom file change_form.html, which is located in /home/django/project/app/template/admin/change_form.html. i found this code but it doesnt work. thx for any help
class MyModelAdmin(admin.ModelAdmin):
# A template for a very customized change view:
change_form_template = 'admin/cha...
Here's the code:
import urllib2
import base64,hashlib,hmac,time
from urllib import urlencode
from xml.dom import minidom
AWS_ACCESS_KEY_ID = "secret"
AWS_SECRET_ACCESS_KEY = "secret"
base_url = "http://ecs.amazonaws.com/onca/xml"
url_params = {"Version": "2010-09-01",
"Operation": "ItemSearch",
"ResponseGro...