Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Jan Ostrochovsky
I won't compare PostgreSQL and MySQL as whole, because: - I do not know MySQL so well, as PostgreSQL - another flamewar could arise ;) I am only saying: my experience with Django+PostgreSQL is far better, than Django+MySQL, see http://groups.google.com/group/django-users/browse_thread/thread/3abf

Sitemap index examples needed

2009-09-07 Thread Oleg Oltar
Hi! I have following models relation: class Section(models.Model): section = models.CharField(max_length=200, unique=True) name = models.CharField(max_length=200, blank = True) class Article (models.Model): url = models.CharField(max_length = 30, unique=True)

Re: Django, MySQL, unicode

2009-09-07 Thread Jan Ostrochovsky
Hi Tracy, less than two months ago, we were trying to use MySQL in our Django project (because we were not successful with installation of PostgreSQL adapter for Python psycopg2 on Mac OS X). We had similar problems as you have, and ugly, but only found, solution was to add encode (or decode? I

multi-table inheritance - how to access child object methods/attributes

2009-09-07 Thread Jan Ostrochovsky
Hello, class Document(models.Model): ... class AccountingDocument(Document): ... How am I able to access methods an attributes of some AccountingDocument instance (e.g. its __unicode__()) from Document instance? How am I able to retrieve child object from its parent? I tried to search on t

Re: Editors of choice

2009-09-07 Thread Torsten Bronger
Hallöchen! Angel Cruz writes: > I would go with an IDE. > > I don't thnk anyone can progress quickly without being able to > step through the code and look at the variables and objects. Objection! I used to use IDEs with step-through debugging functionality, now I use "print" and log files. I

Django + Dojo errors

2009-09-07 Thread Jim Myers
Hi, I'm using this code to create a response to an Ajax GET from a Dojo html page: @json_response def index_json(request): ret = {'data': [dict(name='Gary', age='24'), dict(name='Shane', age='29')]} return ret The actual text sent to the client is this: {}&&{"data": [{"ag

Re: Django, MySQL, unicode

2009-09-07 Thread Tracy Reed
On Mon, Sep 07, 2009 at 02:33:44AM -0700, ray spake thusly: > We were constantly getting decoding errors so we now use BeautifulSoup > to tidy the xml up before any processing. Wish I could implement a solution like that but I am just pulling times out of emails, not processing (X)HTML. I am amaze

Re: how to deploy an app that gets used by people in multiple time zones

2009-09-07 Thread Tracy Reed
On Thu, Sep 03, 2009 at 03:48:14PM -0700, Margie spake thusly: > What is the default when using a django DateTimeField? Does it not > save it in UTC? If it is not saving it in UTC, what is it saving it > in? Python has two kinds of DateTime objects: naive and non-naive. Non-naive has timezone info

Re: Users Full Name in model form?

2009-09-07 Thread Mike Dewhirst
Streamweaver wrote: > This was through a custom form in a public view. I haven't done much > with admin forms but maybe someone else knows? > > > > On Sep 4, 4:50 pm, Anthony Simonelli wrote: >> Is this within the Admin interface? If so, I'm having a similar >> problem. I have a model calle

Using PIL in Django

2009-09-07 Thread Rodney Topor
I would like to resize uploaded images to fit in a (MAX_WIDTH, MAX_HEIGHT) rectangle when creating model instances. I can use method Image.resize() from PIL OK in Python, but I don't understand how to use it in Django. I'm trying to write code like this: class Item(models.Model): ... im

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Jason Beaudoin
On Fri, Sep 4, 2009 at 4:29 PM, Joshua Russo wrote: > I personally don't have any experience with PostgreSQL and I'm generally > working in a mixed MS and Linux environment. I'm interested to hear peoples > views on the pluses and minuses of the two different systems. I'm a bit of a > query geek

Re: Users Full Name in model form?

2009-09-07 Thread Streamweaver
This was through a custom form in a public view. I haven't done much with admin forms but maybe someone else knows? On Sep 4, 4:50 pm, Anthony Simonelli wrote: > Is this within the Admin interface?  If so, I'm having a similar > problem.  I have a model called Request with a FK relationship t

Re: Editors of choice

2009-09-07 Thread Jim
On Sep 7, 7:30 pm, Joshua Russo wrote: > I then switched to just using Textpad with Python highlighting and pdb, (http://docs.python.org/library/pdb.html) for debugging. Once you get the > hang of pdb it's extremely powerful. It basically drops you right into the > code with a Python command lin

Re: Restricting database permissions

2009-09-07 Thread Jason Beaudoin
On Mon, Sep 7, 2009 at 10:09 AM, Thomas Guettler wrote: > > I can speak only for postgres. > > We create the database with a special admin-account and > the owner if the db is the admin-account. Then we grant > insert, update, delete permissions to the django-db-user. > > We have a modified manag

Re: date range issue

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 12:33 PM, GuyBowden wrote: > > Hi, > > I'm trying to use __range=(then, now) to filter my queryset > > However the SQL that is being generated is missing the quotes around > the dates - it looks like this: > > .. x BETWEEN 2009-09-01 and 2009-09-07 > > but it sh

Re: Editors of choice

2009-09-07 Thread Wayne Koorts
> Anyhow, the purpose of this email was just to ask the community what > editor(s) they preferred to use with Django. Assuming you mean text editor: jEdit (www.jedit.org). Regards, Wayne --~--~-~--~~~---~--~~ You received this message because you are subscribed t

RE: Editors of choice

2009-09-07 Thread Angel Cruz
I would go with an IDE. I don't thnk anyone can progress quickly without being able to step through the code and look at the variables and objects. My productivity skyrocketed when I discovered WingIDE under Windows. It almost feels like I am in Visual Studio. It is not free, but it will not

Re: Editors of choice

2009-09-07 Thread Jonas Obrist
I use eclipse with PyDev + Web Developement tools (and a bunch of other addons :D) and I really like it. Only thing that bugs me is the lack of a django syntax highlighter but that might be hard to find. --~--~-~--~~~---~--~~ You received this message because you

Re: Editors of choice

2009-09-07 Thread Joshua Russo
On Mon, Sep 7, 2009 at 2:55 PM, Samuel Hopkins wrote: > Hello Django peeps, > > I am a Django newbee. I have had my eye on Djanjo for a year or so now but > held off because I had limited python experience. However, after a summer of > python and watching Django's popularity snowball, I think I am

RE: psycopg2.OperationalError: FATAL: role "root" does not exist

2009-09-07 Thread Angel Cruz
Restart postgres, python manage.py syncdb, restart apachectl If you still get the message below, it looks like you have a malformed query (it this a raw sql query of via the django ORM?). _ From: Zico [mailto:mailz...@gmail.com] Sent: Monday, September 07, 2009 2:15 PM To: django-

Re: psycopg2.OperationalError: FATAL: role "root" does not exist

2009-09-07 Thread Zico
On Tue, Sep 8, 2009 at 3:06 AM, Angel Cruz wrote: > > You don't have a user account named 'root' in your database. You should > probably use another user besides root. Change your settings.py file to > the > correct database user? > Ok, if i put my database user "fixmystreet" .. which is the e

RE: psycopg2.OperationalError: FATAL: role "root" does not exist

2009-09-07 Thread Angel Cruz
You don't have a user account named 'root' in your database. You should probably use another user besides root. Change your settings.py file to the correct database user? -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of Zico Sent

psycopg2.OperationalError: FATAL: role "root" does not exist

2009-09-07 Thread Zico
Hi, i have been trying to put the command: python manage.py syncdb in my fixmystreet directory. But, these error shows: do you have any idea.. how to solve this?? [r...@fedora fixmystreet]# python manage.py syncdb local_settings.py not set; using default settings local_settings.py not set; using

Re: apache2+mod_wsgi: 403 Forbidden

2009-09-07 Thread Léon Dignòn
No, I have it here, but forgot to post it: Order Allow,Deny Deny from all Order Allow,Deny Allow from all On Sep 7, 10:11 pm, Matias wrote: > I think you missed the allow directive in your apache conf. > > Example from [1] > > Alias /media/ /usr/local/django/

Re: apache2+mod_wsgi: 403 Forbidden

2009-09-07 Thread Matias
I think you missed the allow directive in your apache conf. Example from [1] Alias /media/ /usr/local/django/mysite/media/ Order deny,allow Allow from all WSGIScriptAlias / /usr/local/django/mysite/apache/django.wsgi Order deny,allow Allow from all [1] http://code.google.com/p/modwsgi/wik

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Joshua Russo
On Mon, Sep 7, 2009 at 2:30 PM, Zberteoc wrote: > > Some consider good practice to actually never expose directly the > tables to the users but do this through stored procedures and views > only. In this way you achieves 2 major things, complete control and > security. Users have no permission to

Re: Embedd VIM in Django Application

2009-09-07 Thread Chris Babcock
On Mon, 7 Sep 2009 13:08:47 -0600 Dj Gilcrease wrote: > >> How can i embedd vim in my django application? > > http://gpl.internetconnection.net/vi/ maybe? Where's the syntax highlighting? :-) signature.asc Description: PGP signature

Re: Embedd VIM in Django Application

2009-09-07 Thread Dj Gilcrease
On Mon, Sep 7, 2009 at 9:09 AM, Chris Babcock wrote: > >> How can i embedd vim in my django application? http://gpl.internetconnection.net/vi/ maybe? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Django windows service

2009-09-07 Thread cootetom
Thanks, that looks pretty neat so hopefully I'll have no problems with that route. On Sep 7, 7:45 am, Daniel Roseman wrote: > On Sep 6, 9:16 pm, cootetom wrote: > > > > > Hi, > > > I'm looking to try and run some python code that has complete access > > to the django framework and some existi

Django 1.2 creating problem with google-analytics in fixmystreet

2009-09-07 Thread Zico
I have been trying to syn my database with the command : python manage.py syncdb As you know that, i have been working in fixmystreet project. Anyway, i have downloaded and put my "google_analytics" in /opt/fixmystreet/contrib folder. Though, it is there in contrib folder... but... *python mana

Django 1.2 creating problem with google-analytics in fixmystreet

2009-09-07 Thread Zico
I have been trying to syn my database with the command : python manage.py syncdb As you know that, i have been working in fixmystreet project. Anyway, i have downloaded and put my "google_analytics" in /opt/fixmystreet/contrib folder. Though, it is there in contrib folder... but... *python mana

apache2+mod_wsgi: 403 Forbidden

2009-09-07 Thread Léon Dignòn
I get a 403 forbidden. I serve Django with apache2+mod_wsgi. I disabled some plugins I think I don't need. Set the listen port to 8000 on localhost only. Later I will serve django through reverse proxy on cherokee webserver. But for now, localhost:8000 is returning a 403 forbidden error. Any ide

Re: digg style pagination

2009-09-07 Thread Michael Ralan
It's possible to get digg-style pagination yes. What you need to do is this. Get the django-pagination add-on from the following url http://code.google.com/p/django-pagination/ The documentation says unzip the pagination folder to a path accessible to python. This is usually taken to mean your

Re: create non-form widgets like a ajax driven table

2009-09-07 Thread Hinnack
that sems to be build on templates... but if I do not want to uses templates? is there already something like forms? -- hinnack 2009/9/7 Ben Davis > In django terms, a table is not a widget. Widgets are basically different > input methods for form fields. Django's admin app has a built-in l

Re: Security: Django vs popular PHP apps?

2009-09-07 Thread Javier Guerra
On Mon, Sep 7, 2009 at 11:05 AM, walterbyrd wrote: > Then again, I have heard some fairly knowledgeable people claim that > django is designed with security in mind. Although I am not a PHP > hater, I have found that python developers tend to be less hackish, > and more design oriented. the main

Re: Editors of choice

2009-09-07 Thread Mike Ramirez
On Monday 07 September 2009 08:55:47 Samuel Hopkins wrote: > Hello Django peeps, > > I am a Django newbee. I have had my eye on Djanjo for a year or so now but > held off because I had limited python experience. However, after a summer > of python and watching Django's popularity snowball, I think

Re: unicode error when adding a related object in admin inline

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 12:53 PM, Miklos wrote: > > Hi, > > I have models with verbose names translated into Hungarian. The > verbose names contain non-ascii characters. I have trouble adding, > editing, or deleting related objects through an admin inline. The > error I get is below. I can add, ed

Re: Need to replace Django User class

2009-09-07 Thread Jim Myers
OK, I think I got it to work now. I had to copy most of the stuff in contrib.auth.models.py also (which isn't really mentioned in the doc you mentioned about backends (which I had already read). --~--~-~--~~~---~--~~ You received this message because you are subscr

unicode error when adding a related object in admin inline

2009-09-07 Thread Miklos
Hi, I have models with verbose names translated into Hungarian. The verbose names contain non-ascii characters. I have trouble adding, editing, or deleting related objects through an admin inline. The error I get is below. I can add, edit, delete them perfectly fine directly through their own adm

Re: create non-form widgets like a ajax driven table

2009-09-07 Thread Ben Davis
In django terms, a table is not a widget. Widgets are basically different input methods for form fields. Django's admin app has a built-in list view (I think it's called changelist) which you can customize or override. It basically just takes some effort to dig into the admin contrib app to se

date range issue

2009-09-07 Thread GuyBowden
Hi, I'm trying to use __range=(then, now) to filter my queryset However the SQL that is being generated is missing the quotes around the dates - it looks like this: .. x BETWEEN 2009-09-01 and 2009-09-07 but it should look like this: .. x BETWEEN '2009-09-01' and '2009-09-

Re: Editors of choice

2009-09-07 Thread Javier Guerra
On Mon, Sep 7, 2009 at 10:55 AM, Samuel Hopkins wrote: > Anyhow, the purpose of this email was just to ask the community what > editor(s) they preferred to use with Django. Kate and Quanta+ -- Javier --~--~-~--~~~---~--~~ You received this message because you ar

create non-form widgets like a ajax driven table

2009-09-07 Thread hinnack
Hi, is there a standard way, how to create non form widgets - e.g. a table - just showing data, no edit possible - therefore no form? I know I can create an object, put in a method toHTML or render that returns the safe HTML/JS code... But how should it be done? -- Hinanck --~--~-~--~--

Editors of choice

2009-09-07 Thread Samuel Hopkins
Hello Django peeps, I am a Django newbee. I have had my eye on Djanjo for a year or so now but held off because I had limited python experience. However, after a summer of python and watching Django's popularity snowball, I think I am ready to go :) Anyhow, the purpose of this email was just to a

reloading .mo files for all threads

2009-09-07 Thread Patrick Lauber
Hi all, I am working on django-rosetta at the moment and we need the functionality to reload all .mo files after they are saved by the application. Is there a way to accomplish this without restarting the server or hitting the DB for every request? This code works for one thread but not fo

Re: Save model as new record in db

2009-09-07 Thread lzantal
Hi, On Sep 7, 3:14 am, Jarek Zgoda wrote: > Wiadomość napisana w dniu 2009-09-07, o godz. 11:11, przez lzantal: > > > I need to save_as in the model of my app So I can save existing > > records as new ones. > > I know there is an option in modeladmin but I don't have an admin > > interface for t

Security: Django vs popular PHP apps?

2009-09-07 Thread walterbyrd
I am hoping to get some reasonably knowledgeable, and unbiased, responses. I was thinking about putting together a wordpress blog. Then I came across a recent slashdot article about recent wordpress security issues. I did a little research, and found that wordpress has quite a history of security

Re: Restricting database permissions

2009-09-07 Thread sean
Hi Thomas, Thank you for your suggestion. The modified manage.py sounds like a very good place for me to start. Best regards, Sean On Mon, 2009-09-07 at 16:09 +0200, Thomas Guettler wrote: > I can speak only for postgres. > > We create the database with a special admin-account and > the owner

saving a file with a generic object relation

2009-09-07 Thread Nagy Viktor - Akasha
Hi, I have the following two models: class File(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey() file = models.FileField(upload_to=get_file_upload_to) comment = models.TextFiel

Re: date range headache

2009-09-07 Thread Masklinn
On 7 Sep 2009, at 16:35 , Rob B (uk) wrote: > Oh that just makes my brain hurt lol It's not very hard to represent if you just use a few schemas: This is the range of the promotion: A B |--| And these are the possible research range

Re: PostgreSQL or MySQL, What are the +'s and -'s?

2009-09-07 Thread Zberteoc
Some consider good practice to actually never expose directly the tables to the users but do this through stored procedures and views only. In this way you achieves 2 major things, complete control and security. Users have no permission to select/update/insert/delete on the tables but they are giv

Re: QuerySet method question

2009-09-07 Thread Javier Guerra
On Sun, Sep 6, 2009 at 1:08 PM, Larry wrote: > The question is: WHAT is the easiest way to get a list of Item objects > from the list > of User_Item objects, i.e., instead of returning the user-item > relation, we only return > the items. instead of defining the User_Item model yourself, you can

Re: Embedd VIM in Django Application

2009-09-07 Thread Chris Babcock
> How can i embedd vim in my django application? It might be possible to create a vim-like Java applet to provide syntax coloring and edit commands for a web application, but there is no way to embed vim in a web page or to imbue equivalent functionality to the contents of a textarea tag. This i

Re: Basic 404.html template issue

2009-09-07 Thread Peter Coles
In your example, when testing the 404 page, you wrote that you're no longer visiting a url under http://localhost:8000, but now you're visiting a url under http://fairware:8000 – was this an error in your post or were you actually checking the wrong server? The testserver will handle 404 pages pr

Re: date range headache

2009-09-07 Thread Rob B (uk)
Oh that just makes my brain hurt lol Works though! thanks On Sep 7, 3:13 pm, Masklinn wrote: > On 7 Sep 2009, at 15:50 , Rob B (uk) wrote:http://dpaste.com/90621/ > > > (The code in above obviously isn't going to work I'm just using it to > > help illustrate my problem.) > > > I want to show a

Re: Restricting database permissions

2009-09-07 Thread Thomas Guettler
I can speak only for postgres. We create the database with a special admin-account and the owner if the db is the admin-account. Then we grant insert, update, delete permissions to the django-db-user. We have a modified manage.py which let syncdb run with the admin-account (interactive password

Re: date range headache

2009-09-07 Thread Masklinn
On 7 Sep 2009, at 15:50 , Rob B (uk) wrote: http://dpaste.com/90621/ > (The code in above obviously isn't going to work I'm just using it to > help illustrate my problem.) > > I want to show all active promotions between the start date and end > date. > So if a promotion starts on 01/01/09 and end

date range headache

2009-09-07 Thread Rob B (uk)
http://dpaste.com/90621/ (The code in above obviously isn't going to work I'm just using it to help illustrate my problem.) I want to show all active promotions between the start date and end date. So if a promotion starts on 01/01/09 and ends 30/01/09 and a person searches from 01/12/08 to 01/02

url's in form labels

2009-09-07 Thread Niels
I make use of the uni_form templatetags. I would like to have a link/URL in a label text of a form field, f.i.: terms_conditions = forms.BooleanField(label=_("Terms and conditions"), help_text=_("You have to agree with the terms and conditions"), required=True) I would like to have something l

Re: Mysql commands and Django

2009-09-07 Thread Tom Evans
On Mon, 2009-09-07 at 05:25 -0700, Pythoni wrote: > I would like to use the output of mysql command in my templates, > e.g. Mysql command > show databases > will show all databases > e.g. > DB1, and DB2 > and I would like to add these > to > > > - > DB1 > DB2 > > > Is th

Embedd VIM in Django Application

2009-09-07 Thread Amit M Joshi
How can i embedd vim in my django application? Is there any template available for this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googleg

Re: method import error

2009-09-07 Thread Sven Richter
Indeed, that was the problem. Thank you very much. Greetings Sven On Mon, Sep 7, 2009 at 1:53 PM, Karen Tracey wrote: > On Mon, Sep 7, 2009 at 6:21 AM, Sven Richter wrote: > >> Hi all, >> >> i must have a simple error somewhere in my code, everytime i try to import >> a certain method i get the

Re: practical django and snippet rating problems

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 8:11 AM, andreas schmid wrote: > the model class described in the book looks like this for the Rating model: > >class Rating(models.Model): >RATING_UP = 1 >RATING_DOWN = -1 >RATING_CHOICES = ((RATING_UP, 'useful'), > (RAT

Mysql commands and Django

2009-09-07 Thread Pythoni
I would like to use the output of mysql command in my templates, e.g. Mysql command show databases will show all databases e.g. DB1, and DB2 and I would like to add these to - DB1 DB2 Is that possible? Thanks for help L. --~--~-~--~~~---~--~--

Re: Django unittests, django.contrib.admin.sites.AlreadyRegistered error

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 6:24 AM, Oleg Oltar wrote: > Hi! > > I am trying to run unitests for one of my application. > > Here is the code of the test (it doesn't do anything yet) > > [snip] > When I run those tests I get an error: > > Installing index for goserver.Game model > . > -

Re: practical django and snippet rating problems

2009-09-07 Thread andreas schmid
hi karen, thank you for the answer! Karen Tracey wrote: > On Mon, Sep 7, 2009 at 5:45 AM, andreas schmid > wrote: > > > hi list, > > im experiencing problems with the rating functionality described > in the > code sharing site in the practical django

Re: models with filestore backend (no database)

2009-09-07 Thread Jani Tiainen
Howard kirjoitti: > > Wondering whether there is example code/docs relating to models > without databases, but where individual model instances are mapped to > (say) a file. Alternatively put, where the back-end data store for the > app are files, not DB tables. Despite much searching I can't fin

Restricting database permissions

2009-09-07 Thread sean
Hi All, I am currently working on a front end to pam-mysql and nss-mysql to allow the creation of linux user accounts through the web. I need to separate out permissions so that Django can read some columns and not others, for instance it should have no access to the password column. I need

Re: method import error

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 6:21 AM, Sven Richter wrote: > Hi all, > > i must have a simple error somewhere in my code, everytime i try to import > a certain method i get the following error: > cannot import name send_entry_created > > This is my code: > entry.models: > from entry.signals import send_

Re: practical django and snippet rating problems

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 5:45 AM, andreas schmid wrote: > > hi list, > > im experiencing problems with the rating functionality described in the > code sharing site in the practical django projects book: > > if i try to get the score of a snippet with {{ object.get_score }} in > the template i get

Re: Need to replace Django User class

2009-09-07 Thread Karen Tracey
On Mon, Sep 7, 2009 at 1:51 AM, Jim Myers wrote: > > I've look all over docs and Google to find a way to do this with no > real luck. > > I'm using a legacy PostGreSQL database which already has user and > permissions tables defined, and I don't want to have to create > parallel Django User table

models with filestore backend (no database)

2009-09-07 Thread Howard
Wondering whether there is example code/docs relating to models without databases, but where individual model instances are mapped to (say) a file. Alternatively put, where the back-end data store for the app are files, not DB tables. Despite much searching I can't find anything definitive (maybe

Re: Django testing applications: using fixtures

2009-09-07 Thread Oleg Oltar
silver:jin oleg$ python manage.py test --verbosity=2 goserver Creating test database... Processing admin.LogEntry model Creating table django_admin_log Processing auth.Permission model Creating table auth_permission Processing auth.Group model Creating table auth_group Processing auth.User model Cr

Re: Django testing applications: using fixtures

2009-09-07 Thread V
do you load several fixtures in your unittest class? from the error message, my guess would be that you have two fixtures that contain the same model's data, and the model has a unique column you can dump data for a specific app only, thus you might avoid such problems bye, V On Sep 6, 7:21 pm,

Re: ReST and path issues

2009-09-07 Thread TiNo
On Sun, Sep 6, 2009 at 16:09, wrong wrote: > Can you show the output of these commands below? > (from django shell and from running under fastfcgi deamons) > > import sys > print sys.executable > for p in sys.path: print p Django Shell: >>> import sys >

Django unittests, django.contrib.admin.sites.AlreadyRegistered error

2009-09-07 Thread Oleg Oltar
Hi! I am trying to run unitests for one of my application. Here is the code of the test (it doesn't do anything yet) import os import re #import unittest from django.core import management from django.test import TestCase from django.test.client import Client from django.core import mail from d

method import error

2009-09-07 Thread Sven Richter
Hi all, i must have a simple error somewhere in my code, everytime i try to import a certain method i get the following error: cannot import name send_entry_created This is my code: entry.models: from entry.signals import send_entry_created ... dispatcher.connect(send_entry_created, signal=signa

Re: Save model as new record in db

2009-09-07 Thread Jarek Zgoda
Wiadomość napisana w dniu 2009-09-07, o godz. 11:11, przez lzantal: > I need to save_as in the model of my app So I can save existing > records as new ones. > I know there is an option in modeladmin but I don't have an admin > interface for this app. > Tryed calling force_insert on the save metho

Re: Save model as new record in db

2009-09-07 Thread Maksymus007
save(force_insert=True) ? On Mon, Sep 7, 2009 at 11:11 AM, lzantal wrote: > > Hi, > > I need to save_as in the model of my app So I can save existing > records as new ones. > I know there is an option in modeladmin but I don't have an admin > interface for this app. > Tryed calling force_insert o

Re: Is it possible to integrate php with django?

2009-09-07 Thread Maksymus007
On Mon, Sep 7, 2009 at 11:08 AM, kk wrote: > > I want to implement a php e-shop module called "Ecshop" which is > written in PHP with my django website. > Is it possible? sure it is. You can configure apache to handle some files like PHP scripts, and there you can do whatever you want - connect t

Re: Accessor for field clashes with related field

2009-09-07 Thread Youngrok Pak
What if that was what he wanted? Think about this case: class Player: name = CharField() class Game: player1 = ForeignKey(Player) player2 = ForeignKey(Player) Now who want player.game_player1_set and player.game_player2_set? Definetly player.game_set is the answer. But it's not poss

Re: Django, MySQL, unicode

2009-09-07 Thread ray
Hi there We have a app that processes xml from a third party web service. We were constantly getting decoding errors so we now use BeautifulSoup to tidy the xml up before any processing. best wishes Ray On 7 Sep, 10:03, Tracy Reed wrote: > I have a Django app which processes emails. It is of

practical django and snippet rating problems

2009-09-07 Thread andreas schmid
hi list, im experiencing problems with the rating functionality described in the code sharing site in the practical django projects book: if i try to get the score of a snippet with {{ object.get_score }} in the template i get a result like: {'rating__sum': -2} why is that? def g

Save model as new record in db

2009-09-07 Thread lzantal
Hi, I need to save_as in the model of my app So I can save existing records as new ones. I know there is an option in modeladmin but I don't have an admin interface for this app. Tryed calling force_insert on the save method with no success. Any help would be greatly appreciated thank you lzan

Is it possible to integrate php with django?

2009-09-07 Thread kk
I want to implement a php e-shop module called "Ecshop" which is written in PHP with my django website. Is it possible? If not, is there any django eshop app that supports all the popular third party pay like "paypal, mastercard" etc. I found one app named "satchmo", but I am not sure whether it

Django, MySQL, unicode

2009-09-07 Thread Tracy Reed
I have a Django app which processes emails. It is often handed emails with unicode characters in them. My understanding is that Python and Django handle unicode just fine and somewhat transparently. I was, however, told that I need to set my database tables to UTF-8 encoding. I have done this. Yet

Re: automatic initialization of sample data

2009-09-07 Thread Jan Ostrochovsky
Thanks Bill, yes, that is one possible solution, when implementing such feature from the scratch. I am only asking, if there is some existing framework for such need, which I see as common. For example some add-on to Django, which will do this for me. Let's imagine additional option for any fiel

Re: Django for windows XP

2009-09-07 Thread anode
Or, if you want to get up and running quickly to try it out, you can try instant django http://www.instantdjango.com/ Haven't used it since last year, but it seems to be kept up to date, and it worked well last time I used it On Sep 7, 4:42 pm, Daniel Roseman wrote: > On Sep 7, 5:30 am, vaidya