how can i wsdl file in my django

2010-10-23 Thread sami nathan
After completing my project i need to use wsdl file for web service how could i use it any sugesstions -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this g

Re: RelatedManager bug?

2010-10-23 Thread Lucasm
Thanks for the reply, I wasn't aware of that. However, it seems that I should do the following, but I still can't get it to print the message :s. from django.db import models class MyManager(models.Manager): use_for_related_fields = True def create(self, *args, **kwargs): print

Re: moving from Postgres to MySQL

2010-10-23 Thread Kevin Monceaux
On Fri, Oct 22, 2010 at 07:58:20AM +0100, Chris Withers wrote: > On 21/10/2010 15:40, ringemup wrote: > >MySQL has a tool (mysqldump) that will output the contents of an > >entire database to a SQL file that can then be loaded directly into > >another database. Does Postgres not have anything ana

Re: login_required and new class based views

2010-10-23 Thread Joachim Pileborg
On 19 Okt, 21:18, Łukasz Rekucki wrote: > On 19 October 2010 19:06, Valentin Golev wrote:> Hello, > > I was going to write something like LoginRequiredMixin, but I have no > > idea how to do this. I need to run my code before .dispatch(), but I > > also have to call the old dispatch, but since M

Re: login_required and new class based views

2010-10-23 Thread Łukasz Rekucki
On 23 October 2010 08:08, Joachim Pileborg wrote: > > On 19 Okt, 21:18, Łukasz Rekucki wrote: >> On 19 October 2010 19:06, Valentin Golev wrote:> Hello, >> > I was going to write something like LoginRequiredMixin, but I have no >> > idea how to do this. I need to run my code before .dispatch(),

Two ForeignKeys to show a combo in admin

2010-10-23 Thread Alexandre González
Hi! I have a model as this: class User: id class Type: user = ForeignKey(User) class B: user = ForeignKey(User) type = ForeignKey(Type) When I'm creating a B object in the admin I like to show a combo with all the users, and after select the user in the first combo, fill the second

The same table in 2 apps

2010-10-23 Thread robos85
Hi. I'm new in Django so I have a very simple problem. I have 1 table that will be used in 2 models (maybe more). Should I declare that table in each application's model? Or how to do that in proper way? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: What does an ideal django workflow setup look like?

2010-10-23 Thread shacker
On Oct 22, 10:09 pm, Kenneth Gonsalves wrote: > 5. Note: settings.py is not put under version control as this holds > sensitive information and paths differ according to the server it is on. > I create a default.settings.py which has the sensitive information > removed. That is kept under version

Django 1.2.3 test fixtures are slower than creating every model object each time setUp() calls.

2010-10-23 Thread Phlip
Djangoists: My last project got into trouble because the .json test fixtures took so bloody long to run. (I fussed about that here at the time...) So I started my current, blue-sky project with an absolutely clean new codebase, and Django 1.2.3. I switched the test database to SQLite, and wrote u

Re: What does an ideal django workflow setup look like?

2010-10-23 Thread Phlip
> I know how to get python/django working on my computer (PC or Mac) and > have developed simple test apps using django's built-in dev server and > a mysql back-end. So I can get things to work and don't need help on > installing stuff. I take all the other advice in these threads (beginning with

Is there some way to log every SQL command sent to the DB?

2010-10-23 Thread Phlip
Google leads me to this: from django.db import connection print connection.queries It can't see the queries the test runner used to set up the database. So, how to log every SQL command to a log file? (Like RoR can?) -- Phlip -- You received this message because you are subs

Re: Django 1.2.3 test fixtures are slower than creating every model object each time setUp() calls.

2010-10-23 Thread Phlip
When I switch to TransactionTestCase - meaning a test case that does not use the transaction-rollback trick - the test time goes to 2.5s. This sucks. The test cases WITH transaction-rollback around each test case are SLOWER than test cases that just rebuild the DB by hand each time. -- You recei

possible bug in joining on a geo field

2010-10-23 Thread Miguel Araujo
Hi everyone, I'm trying to do a join on geo field. I have two models like these ones (simplified): from django.contrib.gis.db import models class Spot(models.Model): point = models.PointField(spatial_index = True, srid = 4326, geography = True) objects = models.GeoManager() from django.d

Re: possible bug in joining on a geo field

2010-10-23 Thread Karen Tracey
On Sat, Oct 23, 2010 at 1:07 PM, Miguel Araujo wrote: > Item.objects.filter(location__point__distance_lte = (point, D(km=10))) > Looks like you are missing an underscore in distance__lte Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Gro

Re: possible bug in joining on a geo field

2010-10-23 Thread Miguel Araujo
Thanks Karen, you are right. But I missed the underscore for sending this, although I was trying here with double underscore: So If I do it right: Item.objects.filter(location__point__distance__lte = (point, D(km=10))) I get: FieldError: Join on field 'point' not permitted. Did you misspell 'di

Re: The same table in 2 apps

2010-10-23 Thread werefr0g
Hello, You have defined "MyClass" for "foo" application in its models.py, and you want to use that class in your application "bar"? You'll find how to use models from another app in Django documentation [1]. A widly spread example is the import of User in your app from django.contrib.auth [2

Re: how can i wsdl file in my django

2010-10-23 Thread Scott Hebert (slaptijack)
You need to provide a SOAP service or consume one? -- Scott Hebert http://slaptijack.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send em

Django tutorial

2010-10-23 Thread dynamo44
Hello, I am working through the Django tutorial at http://docs.djangoproject.com/en/dev/intro/tutorial01/, and I seem to have hit a wall at the database setup section. I am modifying settings.py as described. Specifically, in the DATABASES 'default' item. I am a college student who is using Djang

Forms: set required value at runtime

2010-10-23 Thread bobo
Hi All, I have a form, width two different address field (invoice and post) and a booleanfield: class AddressForm(forms.Form): invoice_address = forms.CharField(max_length=255) same = forms.BooleanField(initial=True) post_address = forms.CharField(max_length=255,required=False) I'd l

Re: Django tutorial

2010-10-23 Thread Karen Tracey
On Sat, Oct 23, 2010 at 3:51 PM, dynamo44 wrote: > I get the following error: > "django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb > module: No module named MySQLdb." Any advice as to what may be going > wrong? > You need to install the MySQLdb, the Python interface to MySQL (se

RE: Django tutorial

2010-10-23 Thread Rizwan Mansuri
You need mysqldb library for your installed python version. Cheers, -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com] On Behalf Of dynamo44 Sent: 23 October 2010 20:52 To: Django users Subject: Django tutorial Hello, I am working through the D

Re: serving SOAP service with soaplib, consuming with suds

2010-10-23 Thread Scott Hebert (slaptijack)
Ricko - You may have already gotten your answer. I believe your problem is related to Django's CSRF protection. If that's the case, you'll want to import csrf_exempt from django.views.decorators.csrf into your views and then wrap the call to MySOAPService in it. For example: # views.py from djan

Would django affect where or how I set ServerAdmin (apache) environment variable?

2010-10-23 Thread robinne
Hi, I am posting an apache question to the django users groups since I have django installed using wsgi and wondering if it might be affecting how or where I should set this environment variable. I am trying to update the email address in the 500 Internal Server Error message: "Please contact the

Re: Forms: set required value at runtime

2010-10-23 Thread widoyo
On Oct 24, 3:28 am, bobo wrote: > I'd like to do, if I uncheck the 'same' field, then the required for > the post_address change to True. > I tried width the overall clean method, but when I raise > forms.ValidationError, I can't raise the error for the post_address > field. > > Can I change the r

Re: Would django affect where or how I set ServerAdmin (apache) environment variable?

2010-10-23 Thread robinne
Contacted my VPS host. They must change this environment variable. Sorry. Thanks. On Oct 23, 7:37 pm, robinne wrote: > Hi, > > I am posting an apache question to the django users groups since I > have django installed using wsgi and wondering if it might be > affecting how or where I should set t

Re: too many options error when launching sqlite3 dbshell

2010-10-23 Thread John Yeukhon Wong
Problem solved. SQLite will chop the path of the sqlite.db... so instead moved to "C:\\sqlite.db" will solve the problem. On Oct 22, 9:47 pm, John Yeukhon Wong wrote: > I have django 1.2.3.0 Final > > In my setting, I have 'sqlite3' filled for the DATABASE_ENGINE. > I am able to work with the sql

Re: Forms: set required value at runtime

2010-10-23 Thread werefr0g
Bence, I think your problem is related to the second case described in documentation about validation fields that depend on each other [1]. Just an observation about your design, if I may: I believe you should explicitly set and store both addresses. You will ease user task by providing a wi

Re: Django 1.2.3 test fixtures are slower than creating every model object each time setUp() calls.

2010-10-23 Thread Russell Keith-Magee
On Saturday, October 23, 2010, Phlip wrote: > Djangoists: > > My last project got into trouble because the .json test fixtures took > so bloody long to run. (I fussed about that here at the time...) > > So I started my current, blue-sky project with an absolutely clean new > codebase, and Django 1