Django admin - How to disable "Delete each record" option for all the models at once

2012-04-09 Thread girish shabadimath
Hi all,
Is there a way to remove "Delete each record" option for all the models in
admin?
We have option to disable delete_selected action using -
"admin.site.disable_action('delete_selected')". Looking for same feature to
do on each record (other then altering ModelAdmin's has_delete_permission
method)
-- 
Girish M S

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django-html5boilerplate error

2012-01-19 Thread girish shabadimath
Hi all,
I wanted to use html5 in my website so downloaded django-html5boilerplate (
https://github.com/HowlingEverett/django-html5boilerplate).Now, I am
getting following error when I run "python manage.py runserver". Page loads
without any error, but gives following 404 errors in terminal:

error:
[19/Jan/2012 08:55:27] "GET / HTTP/1.1" 200 3984
[19/Jan/2012 08:55:27] "GET
/static/style.css%7C0/0/css/style.css?version=3613de347c61c22d6570ac95170381b50c516229
HTTP/1.1" 404 1823
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C0/js/libs/modernizr-2.0.min.js?version=fbfbfed67834caccf0672ee74b171f70823c05a7
HTTP/1.1" 404 1856
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C1/js/libs/respond.js?version=33f8790234012648ce9fe3ccea30dfb0ebab3a6a
HTTP/1.1" 404 1826
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C2/.media_url.js?version=9af983aec3356053aa327ae5bb7f55452adfbe3b
HTTP/1.1" 404 1811
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C3/js/libs/jquery-1.6.1.js?version=27fec0157ad2cbaf511c55e7a08e3f7a9203f020
HTTP/1.1" 404 1841
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C4/js/plugins.js?version=b2a0e8020b055f45938756d7af9fb15e148da48f
HTTP/1.1" 404 1811
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C5/js/script.js?version=a28d568ec9a57b6100ad007af2cdf5abc652898c
HTTP/1.1" 404 1808
[19/Jan/2012 08:55:27] "GET
/static/images/favicon.ico?version=fbca3763388730d21663305cbe0ae0f6ac458a46
HTTP/1.1" 200 1150
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C1/js/libs/respond.js?version=33f8790234012648ce9fe3ccea30dfb0ebab3a6a
HTTP/1.1" 404 1826
[19/Jan/2012 08:55:27] "GET
/static/images/favicon.ico?version=fbca3763388730d21663305cbe0ae0f6ac458a46
HTTP/1.1" 200 1150
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C2/.media_url.js?version=9af983aec3356053aa327ae5bb7f55452adfbe3b
HTTP/1.1" 404 1811
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C3/js/libs/jquery-1.6.1.js?version=27fec0157ad2cbaf511c55e7a08e3f7a9203f020
HTTP/1.1" 404 1841
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C4/js/plugins.js?version=b2a0e8020b055f45938756d7af9fb15e148da48f
HTTP/1.1" 404 1811
[19/Jan/2012 08:55:27] "GET
/static/main.js%7C5/js/script.js?version=a28d568ec9a57b6100ad007af2cdf5abc652898c
HTTP/1.1" 404 1808

I have installed django-mediagenerator and followed all the steps given in
README doc.

Am I missing anything here or is there any other way to do this?

regards,
girish ms,
9742566330

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Support for multiple django annotations?

2012-01-11 Thread girish shabadimath
Try django-cubes

regards,
gms

On Thu, Jan 12, 2012 at 12:05 PM, pradyumna wrote:

> I am trying to use Django aggregation for an existing application that
> uses the following sql query:
>
> select sum(count) as sum_country_count, count(country_abbr) as
> country_cnt,country_abbr from
> (select log_datetime, count(country_abbr) as  count,country_abbr from
> firewall where log_datetime>=DATE('2011-11-09') and
> log_datetime<=DATE('2012-01-08') group by log_datetime,country_abbr)
> country_logs group by country_abbr order by country_abbr;
>
> As you can see, there are multiple aggregations required in this
> django query.
>
> I am able to able to do this:
>
>
> z=Firewall.objects.values('log_datetime','country_abbr').annotate(date_cnt=Count('log_datetime'),country_cnt=Count('country_abbr')).order_by('-
> country_cnt')
>
> and this takes care of inner loop.
>
> If I try to do multiple annotations, django raise error.:
>
>
> z=Firewall.objects.annotate(country_cnt=Count('country_abbr')).annotate(cnt=Count('country_cnt'))
>
> Is there a way in Django where in the above sql query can be handled
> in aggregation clause?
>
> Thanks.
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Happy new year

2011-12-31 Thread girish shabadimath
New year wishes to everyone,,

regards,
girish ms
On Sun, Jan 1, 2012 at 10:24 AM, Nikhil Verma wrote:

> Happy new year to all of you.
>
>
> On Sun, Jan 1, 2012 at 10:22 AM, yati sagade wrote:
>
>> Happy new year all :)
>>
>>
>> On Sun, Jan 1, 2012 at 7:54 AM, Adrien Lemaire <
>> adrien.lema...@aquasys.co.jp> wrote:
>>
>>> Happy new year dear folks !
>>>
>>> On Jan 1, 1:48 am, Sławomir Zborowski  wrote:
>>> > Happy new year, Django users :-) !
>>>
>>> --
>>> 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@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>>
>>  --
>> 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@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>
>  --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Girish M S

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Which IDE should I use for Django?

2011-12-19 Thread girish shabadimath
wingware IDE.

On Mon, Dec 19, 2011 at 6:59 PM, Ezequiel Bertti  wrote:

> pycharm +1
>
>
> 2011/12/19 Lexa Po 
>
>> SublimeText2
>> +1
>>
>> 19 декабря 2011 г. 15:47 пользователь nicolas HERSOG 
>> написал:
>>
>> I'm using Aptana
>>>
>>>
>>> On Mon, Dec 19, 2011 at 1:37 PM, Anoop Thomas Mathew 
>>> wrote:
>>>
 Hi,

 PyCharm is awesome!!! But is paid ($70) and  not OpenSource.
 Best among the free is Aptana Studio.

 Thanks,
 Anoop Thomas Mathew

 atm
 ___
 Life is short, Live it hard.





 On 19 December 2011 16:41, Thomas Weholt wrote:

> Pycharm +1
>
>
>
> On Mon, Dec 19, 2011 at 11:35 AM, Zhukov Pavel 
> wrote:
> > PyCharm?
> >
> > On Mon, Dec 19, 2011 at 2:34 PM, Alec Taylor 
> wrote:
> >> I'm looking for a Django IDE which incorporates the following
> features:
> >> - Syntax-highlighting
> >> - Projects (all code file of the project shown separated by
> directory
> >> in a sidebar)
> >> - Tabs (with close buttons on tab)
> >> - Code-completion (with good introspection)
> >> - Text-zoom support
> >> - Start/stop Django server
> >> - Run+restart Django server shell (manage.py shell) in project
> (i.e. below code)
> >>
> >> I program on Windows and Linux, so it would be great if the IDE is
> >> supported on both platforms.
> >>
> >> Previously I was using Editra, but I requested an automatic import
> >> into embedded interpreter feature in April, which they still haven't
> >> integrated. So I am looking at alternatives :)
> >>
> >> Thanks for all suggestions,
> >>
> >> Alec Taylor
> >>
> >> --
> >> 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@googlegroups.com.
> >> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> >>
> >
> > --
> > 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@googlegroups.com.
> > To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
> >
>
>
>
> --
> Mvh/Best regards,
> Thomas Weholt
> http://www.weholt.org
>
> --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
  --
 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@googlegroups.com.
 To unsubscribe from this group, send email to
 django-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/django-users?hl=en.

>>>
>>>  --
>>> 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@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>
>>  --
>> 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@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Ezequiel Bertti
> E-Mail: eber...@gmail.com
> MSN: eber...@hotmail.com
> Cel: (21) 9188-4860
>
> VÁ PARA BÚZIOS!!!
> http://www.agh.com.br/
> Ane Guest House
>
>  --
> 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@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Girish M S

-- 
You received this message because you are subscribed to the Google Groups 

Re: django and eclipse

2010-12-29 Thread girish shabadimath
to change port:
django-admin.py runsserver 

On Thu, Dec 30, 2010 at 6:24 AM, Emmanuel Mayssat wrote:

> For the sqlite.db file issue, I changed the settings.py with:
>
> import os
> PROJECT_DIR = os.path.dirname(__file__)
> ...
> DATABASE_ENGINE = 'sqlite3'
> DATABASE_NAME = os.path.join(PROJECT_DIR, 'sqlite.db')
>
> that now works as expected.
> --
> Emmanuel Mayssat
>
>
>
> On Wed, Dec 29, 2010 at 4:38 PM, Emmanuel Mayssat 
> wrote:
> > I installed the pydev plugin in eclipse.
> > I configured it.
> > Imported my django project and it almost works.
> >
> > Is any one of you using django/eclipse?
> >
> > Well, all goes well until I start the django development server.
> > 1/ how can I change the default port, it is running on ?
> > 2/ My sqlite db files is regenerated by the runserver (I had never
> > seen  that!) in a different directory (at the project level).
> > If I symlink the 2 db files, it works as expected.
> > Any clue?
> >
> > BTW, I noticed that when creating a django project in eclipse, it ask
> > for the path to the db files (when using sqlite3)
> > It is configured to point to the right location, but runserver doesn't
> get that.
> > So what is this db file path used for ? (settings.py is created but
> > not even configured...)
> >
> > --
> > Emmanuel Mayssat
> >
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



newbie question: Error while using tddspry module

2010-12-13 Thread girish shabadimath
Hi all,

Im working on djnago 1.2
i need to write tests for django models, what actually do i need to test in
models?


and also i found this link from google -
http://playpauseandstop.github.com/tddspry/writing_tests.html#database-tests-with-databasetestcase

and
installed all the necessary modules given in the above link
(mock,nose,twill)

and then used the example given in this link:
http://playpauseandstop.github.com/tddspry/writing_tests.html#usage

now  got the error:
ImportError: cannot import name TestSMTPConnection

am i missing anything,?
-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Newbie question: many-to-many model creation

2010-12-10 Thread girish shabadimath
Thanks for the reply,,
Here are my models

class Checkers(models.Model):
   name = models.CharField(max_length = 100)
   weight = models.FloatField(default = 0)
   desc = models.CharField(max_length = 1000)

class PrepCheckers(models.Model):
   name = models.CharField(max_length = 150)
   ABCcheckers = models.ManyToManyField(Checkers,
  related_name = 'prevent45checkers')

now how to create PrepCheckers obj  ?



On Fri, Dec 10, 2010 at 5:15 PM, Kenneth Gonsalves <law...@au-kbc.org>wrote:

> On Fri, 2010-12-10 at 16:55 +0530, girish shabadimath wrote:
> > im new to django
> >
> > im using django 1.2
> > i have a model that has one many-to-many relationship field
> >
> > How to create a object of this model ?
> >
> > what to pass for the field that has many-to-many relationship?
>
> please give some details of your models
> --
> regards
> Kenneth Gonsalves
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Newbie question: many-to-many model creation

2010-12-10 Thread girish shabadimath
Hi all,
im new to django

im using django 1.2
i have a model that has one many-to-many relationship field

How to create a object of this model ?

what to pass for the field that has many-to-many relationship?

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Accessing multiple databases from a single django app?

2010-11-28 Thread girish shabadimath
database router is the solution, check this out
http://docs.djangoproject.com/en/1.2/topics/db/multi-db/#database-routers


On Sat, Nov 27, 2010 at 12:34 AM, Tom Evans wrote:

> On Fri, Nov 26, 2010 at 5:28 PM, Roy Smith  wrote:
> > I want my application to be able to access two different mysql
> > databases (with different credentials, running on two different
> > servers).  One is a large data collection which I'll be accessing read-
> > only.  The other is read-write, and will be the one which manages the
> > site (account creation, user preferences, etc).  Is there a way to do
> > this?
> >
>
> http://docs.djangoproject.com/en/1.2/topics/db/multi-db/ ?
>
> HTH
>
> Tom
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: testing django applications

2010-11-18 Thread girish shabadimath
I will try out that ,,

On Thu, Nov 18, 2010 at 6:47 PM, xvga <vgri...@gmail.com> wrote:

> I guess one way would  be to put xyz.py in own app. Remember though to
> have models.py(empty is fine too) in the app dir
>
> On Nov 18, 2:27 pm, girish shabadimath <girishmss.1...@gmail.com>
> wrote:
> > Thanks for the reply,
> > but according to the django documentationhttp://
> docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >  <
> http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >test
> > runner looks for tests only in models.py or tests.py of a specific
> > application,,but my xyz.py is not present in any of the application.
> >
> >
> >
> > On Thu, Nov 18, 2010 at 4:42 PM, xvga <vgri...@gmail.com> wrote:
> > > Hi Girish,
> >
> > > why don't you put tests.py in the same dir where xyz.py is?
> >
> > > On Nov 18, 11:52 am, girish shabadimath <girishmss.1...@gmail.com>
> > > wrote:
> > > > Hi all,
> >
> > > > im working on a django project XXX,
> >
> > > > the directory structure is as follows:
> >
> > > > - project XXX
> > > >   -abc
> > > >  models.py
> > > >  views.py
> > > >  tests.py
> > > >  urls.py
> > > >  +docs
> > > >  +libs
> > > >  +logs
> > > >  +thirdparty
> > > >  +corns
> > > >   - AAA
> > > >  xyz.py
> > > >  aaa.py
> > > >  settings.py
> > > >  urls.py
> >
> > > > i need to write tests for xyz.py,  as i understood by readinghttp://
> > > docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> > > >  <
> > >http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >
> > > > ,tests
> > > > need to be present in any one application directory (here its abc ),
> but
> > > > xyz.py is not related to abc application so i cant
> > > > write tests for xyz.py in abc application. Where actually i should be
> > > > writing tests in this case?,,is there any other way?
> >
> > > > --
> > > > Girish M S
> >
> > > --
> > > 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 email to
> > > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> <django-users%2bunsubscr...@googlegroups.com<django-users%252bunsubscr...@googlegroups.com>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
> >
> > --
> > Girish M S
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: testing django applications

2010-11-18 Thread girish shabadimath
Thanks for the reply,
but according to the django documentation
http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
 <http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests>test
runner looks for tests only in models.py or tests.py of a specific
application,,but my xyz.py is not present in any of the application.

On Thu, Nov 18, 2010 at 4:42 PM, xvga <vgri...@gmail.com> wrote:

> Hi Girish,
>
> why don't you put tests.py in the same dir where xyz.py is?
>
>
> On Nov 18, 11:52 am, girish shabadimath <girishmss.1...@gmail.com>
> wrote:
> > Hi all,
> >
> > im working on a django project XXX,
> >
> > the directory structure is as follows:
> >
> > - project XXX
> >   -abc
> >  models.py
> >  views.py
> >  tests.py
> >  urls.py
> >  +docs
> >  +libs
> >  +logs
> >  +thirdparty
> >  +corns
> >   - AAA
> >  xyz.py
> >  aaa.py
> >  settings.py
> >  urls.py
> >
> > i need to write tests for xyz.py,  as i understood by readinghttp://
> docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
> >  <
> http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests>
> > ,tests
> > need to be present in any one application directory (here its abc ), but
> > xyz.py is not related to abc application so i cant
> > write tests for xyz.py in abc application. Where actually i should be
> > writing tests in this case?,,is there any other way?
> >
> > --
> > Girish M S
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



testing django applications

2010-11-18 Thread girish shabadimath
Hi all,

im working on a django project XXX,

the directory structure is as follows:

- project XXX
  -abc
 models.py
 views.py
 tests.py
 urls.py
 +docs
 +libs
 +logs
 +thirdparty
 +corns
  - AAA
 xyz.py
 aaa.py
 settings.py
 urls.py

i need to write tests for xyz.py,  as i understood by reading
http://docs.djangoproject.com/en/1.2/topics/testing/#writing-unit-tests
 
,tests
need to be present in any one application directory (here its abc ), but
xyz.py is not related to abc application so i cant
write tests for xyz.py in abc application. Where actually i should be
writing tests in this case?,,is there any other way?



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



DatabaseError: (1146, "Table 'test_XXX.django_content_type' doesn't exist")

2010-10-28 Thread girish shabadimath
Hi all,

im re-sending this mail, am i missing any thing here?


im using django 1.2
there are two databases involved in my project (default and XYZ (used only
for migration))

i use a consistant MySQL storage type for all apps, all models (including
m2m).
This is done by registering a post-syncdb  signal in management.py
file which converts all tables to innodb.
(code partially taken from:
http://code.djangoproject.com/wiki/AlterModelOnSyncDB )

(Description of management.py magic is at
http://code.djangoproject.com/wiki/Signals)


i wrote few tests for one of my application,

when i run ./manage.py test following error occurs:

DatabaseError: (1146, "Table 'test_XXX.django_content_type' doesn't exist")

any clues?
-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Database error: Table 'test_XXX.django_content_type' doesn't exist

2010-10-28 Thread girish shabadimath
Hi all,

im using django 1.2
there are two databases involved in my project (default and XYZ (used only
for migration))

i use a consistant MySQL storage type for all apps, all models (including
m2m).
This is done by registering a post-syncdb  signal in management.py
file which converts all tables to innodb.
(code partially taken from:
http://code.djangoproject.com/wiki/AlterModelOnSyncDB )

(Description of management.py magic is at
http://code.djangoproject.com/wiki/Signals)


i wrote few tests for one of my application,

when i run ./manage.py test following error occurs:

DatabaseError: (1146, "Table 'test_XXX.django_content_type' doesn't exist")

any clues?

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to display image in django template

2010-10-27 Thread girish shabadimath
Another way for static images:
Its good to have all html related stuffs (html files, images, ..etc) in one
directory (ex: html directory)

In settings.py there is a field called TEMPLATE_DIR, add the absolute-path
to the html directory to this filed
ex: TEMPLATE_DIR = 'path-to-html-directory',

in template, access the image as 


On Mon, Oct 25, 2010 at 4:12 PM, Kenneth Gonsalves wrote:

> On Mon, 2010-10-25 at 03:34 -0700, d wrote:
> > I have been searching for solutions whole day.
> > How would I display image file in django template. I have already set
> > MEDIA_ROOT and MEDIA_URL.
>
> assume a model:
>
> Mymodel(models.Model):
> photo = models.ImageField("somename",upload_to="images/")
>
> get an instance:
>
> myob = Mymodel.objects.get(pk=1)
>
> in your template:
>
> 
> --
> regards
> Kenneth Gonsalves
> Senior Associate
> NRC-FOSS at AU-KBC
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How WEB SERVICE works?

2010-10-26 Thread girish shabadimath
sorry friends, ignore this

On Tue, Oct 26, 2010 at 4:31 PM, Tom Evans <tevans...@googlemail.com> wrote:

> Bad netiquette.
>
> Please don't send unsolicited attachments to mailing lists. If it is
> really that riveting, provide a link.
>
> On Tue, Oct 26, 2010 at 11:55 AM, girish shabadimath
> <girishmss.1...@gmail.com> wrote:
> >
> > Hi friends,
> > i found this ppt interesting, specially the diagram which made me to
> > understand WS better,,
> > hope it may help u too.
> > --
> > Girish M S
> >
> > --
> > 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 email to
> > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django and Flux

2010-10-18 Thread girish shabadimath
Thanks Tim, got some idea

On Mon, Oct 18, 2010 at 6:01 PM, girish shabadimath <
girishmss.1...@gmail.com> wrote:

> Hi Venkatraman,
> *Thanks for the correction -- 'Flex' and by "combine" in mean using django
> and flex to create application.*
>
> i googled regarding this issue and found that pyAMF is used in this case,
>
>
>
>
> O n Mon, Oct 18, 2010 at 5:44 PM, Venkatraman S <venka...@gmail.com>wrote:
>
>>
>> On Mon, Oct 18, 2010 at 5:37 PM, girish shabadimath <
>> girishmss.1...@gmail.com> wrote:
>>
>>>
>>> i am newbie to django and wanted to start with one django application.
>>>
>>> Is it possible to combine django and adobe flux builder?
>>>
>>> i thought of using flux as front-end and django as back-end.
>>>
>>> what are the pros and cons of this approach?
>>>
>>>
>> It is called "Flex".
>>
>> You cant combine Django and Flex Builder - but you can write apps using
>> Django and Flex.
>>
>> Yes, you can have a django backend and a flex front end. But you cant code
>> django in your flex builder - i mean dont expect django/python syntax
>> highlighting in FB.
>>
>> -V-
>> http://twitter.com/venkasub
>>
>>  --
>> 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 email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Girish M S
>



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django and Flux

2010-10-18 Thread girish shabadimath
Hi Venkatraman,
*Thanks for the correction -- 'Flex' and by "combine" in mean using django
and flex to create application.*

i googled regarding this issue and found that pyAMF is used in this case,




O n Mon, Oct 18, 2010 at 5:44 PM, Venkatraman S <venka...@gmail.com> wrote:

>
> On Mon, Oct 18, 2010 at 5:37 PM, girish shabadimath <
> girishmss.1...@gmail.com> wrote:
>
>>
>> i am newbie to django and wanted to start with one django application.
>>
>> Is it possible to combine django and adobe flux builder?
>>
>> i thought of using flux as front-end and django as back-end.
>>
>> what are the pros and cons of this approach?
>>
>>
> It is called "Flex".
>
> You cant combine Django and Flex Builder - but you can write apps using
> Django and Flex.
>
> Yes, you can have a django backend and a flex front end. But you cant code
> django in your flex builder - i mean dont expect django/python syntax
> highlighting in FB.
>
> -V-
> http://twitter.com/venkasub
>
>  --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django and Flux

2010-10-18 Thread girish shabadimath
Hi Django folks,

i am newbie to django and wanted to start with one django application.

Is it possible to combine django and adobe flux builder?

i thought of using flux as front-end and django as back-end.

what are the pros and cons of this approach?

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: SUPPORTS_TRANSACTIONS Error while running tests

2010-10-08 Thread girish shabadimath
Hi Russ,

thanks for the reply,,i resolved this error,,
added
DATABASES['xxx']['SUPPORTS_TRANSACTIONS'] = 'False'
DATABASES['default']['SUPPORTS_TRANSACTIONS'] = 'False'
in settings.py

On Fri, Oct 8, 2010 at 11:49 AM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

> On Fri, Oct 8, 2010 at 1:34 PM, girish shabadimath
> <girishmss.1...@gmail.com> wrote:
> > Hi all,
> > i looked into the setup_databases()  code, here it basically checks for
> > MIRROR,,if db is a mirror ,then it simply points to it or else creates
> test
> > db,,,where dis SUPPORTS_TRANSACTIONS check is happening..?
> >
> > trace-out shows its present in testcases.py,,but how setup_database gets
> > there..?,,
> >
> > im a newbie to django,,so don't mind if it sounds simple ...
>
> In django/db/backends/creation.py. It's part of the database backend
> logic that defines how to create the test database.
>
> Yours,
> Russ Magee %-)
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: SUPPORTS_TRANSACTIONS Error while running tests

2010-10-07 Thread girish shabadimath
Hi all,
i looked into the *setup_databases()*  code, here it basically checks for
MIRROR,,if db is a mirror ,then it simply points to it or else creates test
db,,,where dis *SUPPORTS_TRANSACTIONS *check is happening..?

trace-out shows its present in testcases.py,,but how *setup_database* gets
there..?,,

im a newbie to django,,so don't mind if it sounds simple ...

On Thu, Oct 7, 2010 at 12:41 PM, girish shabadimath <
girishmss.1...@gmail.com> wrote:

> Hi Russ,
>
> Thanks for the reply
>
>
> On Thu, Oct 7, 2010 at 11:09 AM, Russell Keith-Magee <
> russ...@keith-magee.com> wrote:
>
>> On Thu, Oct 7, 2010 at 1:32 PM, girish shabadimath
>> <girishmss.1...@gmail.com> wrote:
>> > Hi all,
>> >
>> > im using django 1.2
>> >
>> > i dont want django to create test_db for testing, instead should use the
>> > main database
>> >
>> > i have override  run_tests method to do unit tests,,,
>> > here is the run_tests code:
>> >
>> > class Custom_TestSuiteRunner(DjangoTestSuiteRunner):
>> >
>> >def run_tests(self, test_labels, extra_tests=None, **kwargs):
>> >
>> >   self.setup_test_environment()
>> >   suite = self.build_suite(test_labels, extra_tests)
>> >   #old_config = self.setup_databases() commented to use main
>> > database
>>
>> Before you start randomly commenting out code, you might want to check
>> out what the code actually does.
>>
>> Part of the process of creating a test database is to verifies the
>> capabilities of the database -- most notably, whether the database
>> supports transactions, which has a profound effect on the operation of
>> subsequent test cases.
>>
>> If you don't want to use a separate test database, then you'll need to
>> replicate the feature validation logic. If you don't, you'll get
>> exactly the error you describe.
>>
>> Yours,
>> Russ Magee %-)
>>
>> --
>> 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 email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Girish M S
>



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



SUPPORTS_TRANSACTIONS Error while running tests

2010-10-06 Thread girish shabadimath
Hi all,

im using django 1.2

i dont want django to create test_db for testing, instead should use the
main database

i have override  run_tests method to do unit tests,,,
here is the run_tests code:

class Custom_TestSuiteRunner(DjangoTestSuiteRunner):

   def run_tests(self, test_labels, extra_tests=None, **kwargs):

  self.setup_test_environment()
  suite = self.build_suite(test_labels, extra_tests)
  #old_config = self.setup_databases() commented to use main
database

  for label in suite:
 test_desc = label.__doc__
 test_name = label
 print "Running test \"%s\"" %test_name
 result = unittest.TextTestRunner(verbosity=0).run(label)

  #self.teardown_databases(old_config)commented to use main database
  self.teardown_test_environment()
  return self.suite_result(suite, result)

when i give command "./manage.py test" following error occurs,,,

ERROR: test_basic_multiplication (xxx..xxx.SimpleTest)
--
Traceback (most recent call last):
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 256, in __call__
self._pre_setup()
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 223, in _pre_setup
self._fixture_setup()
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 486, in _fixture_setup
if not connections_support_transactions():
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 475, in connections_support_transactions
for conn in connections.all())
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 475, in 
for conn in connections.all())
KeyError: '*SUPPORTS_TRANSACTIONS*'

--
Ran 0 tests in 0.000s

FAILED (errors=1)

what would be the reason,,?

i also mentioned *SUPPORTS_TRANSACTIONS = False *in settings.py file,,but
also the error is appearing,,


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django in Depth

2010-10-06 Thread girish shabadimath
Hi Paul,

http://djangocon.blip.tv/file/3322277/


On Thu, Oct 7, 2010 at 9:55 AM, Gath  wrote:

> Guys,
>
> Please someone out there help me with a download link of James Bennett
> video on "Django in Depth" that was presented during pycon2010.
>
> All the links am getting don't have a download link.
>
> Thanks
> Paul
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



SUPPORTS_TRANSACTIONS Error while running tests

2010-10-06 Thread girish shabadimath
Hi all,

im using django 1.2

i have override  run_tests method to do unit tests,,,

i dont want django to create test_db for testing, instead should use the
main database

here is the run_tests code:

class Custom_TestSuiteRunner(DjangoTestSuiteRunner):

   def run_tests(self, test_labels, extra_tests=None, **kwargs):

  self.setup_test_environment()
  suite = self.build_suite(test_labels, extra_tests)
  #old_config = self.setup_databases() #commented to use main
database

  for label in suite:
 test_desc = label.__doc__
 test_name = label
 print "Running test \"%s\"" %test_name
 result = unittest.TextTestRunner(verbosity=0).run(label)

  #self.teardown_databases(old_config)#commented to use main
database
  self.teardown_test_environment()
  return self.suite_result(suite, result)

when i give command "./manage.py test" following error occurs,,,

ERROR: test_basic_multiplication (xxx..xxx.SimpleTest)
--
Traceback (most recent call last):
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 256, in __call__
self._pre_setup()
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 223, in _pre_setup
self._fixture_setup()
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 486, in _fixture_setup
if not connections_support_transactions():
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 475, in connections_support_transactions
for conn in connections.all())
  File
"/build/toolchain/noarch/django-1.2/lib/python2.6/site-packages/django/test/testcases.py",
line 475, in 
for conn in connections.all())
KeyError: '*SUPPORTS_TRANSACTIONS*'

--
Ran 0 tests in 0.000s

FAILED (errors=1)

what would be the reason,,?

i also mentioned *SUPPORTS_TRANSACTIONS = False *in settings.py file,,but
also the error is appearing,,


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: IDE for Python/django

2010-09-27 Thread girish shabadimath
Hi all,

Thanks for the replies,,i got bunch of IDEs.. will figure out which is best
for my work environment


On Tue, Sep 28, 2010 at 7:51 AM, Brandon Taylor wrote:

> Aptana Studio 2 & 3 Beta + PyDev on Linux makes a great dev
> environment for Django. You can create runtimes for debugging, add
> modules to the Python path for your project, like the site-packages
> folder from a virtualenv.
>
> You'll get code assist for Python, HTML, CSS and JavaScript. A number
> of JavaScript libraries like jQuery are also supported. This IDE has
> served me very well for the past 4 years. It might not have every bell
> or whistle that PyCharm has, but I feel it has a very well balanced
> set of features that are easy to customize.
>
> My $0.02,
> Brandon
>
> On Sep 27, 7:01 pm, tayfur yilmaz  wrote:
> > pycharm is very slow ı think for pycharm is wrote java programming
> > language..wing ide is best..
> >
> > 2010/9/28 Jason 
> >
> >
> >
> > > PyCharm is pretty amazing but it costs $ after its out of beta. Best
> > > code completion I've seen for Django.
> >
> > > My ONLY complaint is you can't open up a python console during debug.
> > > It has a pretty good debugger but seeing as other IDEs have no problem
> > > here I don't know why they left it out.
> >
> > > Still, I think it's head and shoulders above the rest.
> >
> > > --
> > > 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 email to
> > > django-users+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
> >
> > --www.tayfuryilmaz.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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: IDE for Python/django

2010-09-27 Thread girish shabadimath
actually i use vim for writing python scripts , i wanted IDE to easy my
tasks of writing script (like auto-completion) ,,,i dont want GUI based,,i
prefer  editor like vim which supports python scripts

On Mon, Sep 27, 2010 at 6:26 PM, Sithembewena Lloyd Dube
<zebr...@gmail.com>wrote:

> Hi Girish,
>
> I do not know what platform you work on, but on Windows try Jetbrains
> PyCharm. On Linux, try SPE, or Eclipse with Pydev extensions (the latter is
> also available on Windows).
>
> What are you looking for in an IDE? Give more info to get a better answer.
>
>
> On Mon, Sep 27, 2010 at 2:52 PM, Masklinn <maskl...@masklinn.net> wrote:
>
>> On 2010-09-27, at 14:51 , girish shabadimath wrote:
>> > hi all,
>> >
>> > is there any IDE for Python/Django ?
>> Yes.
>>
>> --
>> 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 email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Regards,
> Sithembewena Lloyd Dube
> http://www.lloyddube.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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: IDE for Python/django

2010-09-27 Thread girish shabadimath
thanks a lot...

On Mon, Sep 27, 2010 at 6:28 PM, bagheera <neost...@go2.pl> wrote:

> Dnia 27-09-2010 o 14:51:15 girish shabadimath <girishmss.1...@gmail.com>
> napisał(a):
>
>
>  hi all,
>>
>> is there any IDE for Python/Django ?
>>
>>
> Most will probably recommend Eclipse + pydev plugin or Aptana + pydev.
> I fell quite comfortable with NetBeans. Unfortunately it doesn't support
> django template language.
>
> --
> Linux user
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: IDE for Python/django

2010-09-27 Thread girish shabadimath
im using ubuntu machine so which IDE is best suited for this machine.

On Mon, Sep 27, 2010 at 6:23 PM, girish shabadimath <
girishmss.1...@gmail.com> wrote:

> can u please tell me which is it..
>
>
> On Mon, Sep 27, 2010 at 6:22 PM, Masklinn <maskl...@masklinn.net> wrote:
>
>> On 2010-09-27, at 14:51 , girish shabadimath wrote:
>> > hi all,
>> >
>> > is there any IDE for Python/Django ?
>> Yes.
>>
>> --
>> 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 email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Girish M S
>



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: IDE for Python/django

2010-09-27 Thread girish shabadimath
can u please tell me which is it..

On Mon, Sep 27, 2010 at 6:22 PM, Masklinn <maskl...@masklinn.net> wrote:

> On 2010-09-27, at 14:51 , girish shabadimath wrote:
> > hi all,
> >
> > is there any IDE for Python/Django ?
> Yes.
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



IDE for Python/django

2010-09-27 Thread girish shabadimath
hi all,

is there any IDE for Python/Django ?

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Request object problem

2010-09-22 Thread girish shabadimath
ya correct, now i got complete picture of client.get() and RequestFactory,


On Wed, Sep 22, 2010 at 5:28 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

> On 22 sep, 13:17, girish shabadimath <girishmss.1...@gmail.com> wrote:
> > Thanks for the reply, actually the response object got using
> RequestFactory
> > is different from the one returned by client.get() function,,
>
> The reponse object you get using RequestFactory is the one returned by
> your view.
>
> > i think response object returned by client.get() supports
> response.template
> > and response.context['data'],,,
>
> The test.Client uses quite a few Django hooks (middlewares, signals
> etc) to takes care of all this:
>
> http://code.djangoproject.com/browser/django/trunk/django/test/client.py
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Request object problem

2010-09-22 Thread girish shabadimath
Thanks for the reply, actually the response object got using RequestFactory
is different from the one returned by client.get() function,,

i think response object returned by client.get() supports response.template
and response.context['data'],,,

ref:( http://djangosnippets.org/snippets/963/ )






On Wed, Sep 22, 2010 at 4:24 PM, bruno desthuilliers <
bruno.desthuilli...@gmail.com> wrote:

> On 22 sep, 11:31, girish shabadimath <girishmss.1...@gmail.com> wrote:
> > hi all,
> >
> > i used django snippethttp://djangosnippets.org/snippets/963/
> >
> > and successfully created request object
> >
> > i checked the response.status_code its giving 200
> >
> > i checked response.content it matches with the browser source code
> >
> > when i issue *response.template* it gives error
> >  and* response.context* also not giving output,,
> >
> > i used template and context data in view function,,
> >
> > why its showing nothing..?
>
> because, while the template and context are used to build the response
> object, they are not part of it.  render_to_response(templatename,
> context, ...) is just a convenient shortcut that loads the template,
> render it with the context, and build an HttpResponse using the
> generated content.
>
> FWIW, Django is not only mostly well documented but also OSS, so you
> can read the code to see what's going on:
>
>
> http://code.djangoproject.com/browser/django/trunk/django/shortcuts/__init__.py
>
> http://code.djangoproject.com/browser/django/trunk/django/http/__init__.py#L302
>
> As you can see, the HttpResponse object is built from some content -
> how this content is generated is totally orthogonal.
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Request object problem

2010-09-22 Thread girish shabadimath
hi all,

i used django snippet http://djangosnippets.org/snippets/963/

and successfully created request object

i checked the response.status_code its giving 200

i checked response.content it matches with the browser source code

when i issue *response.template* it gives error
 and* response.context* also not giving output,,

i used template and context data in view function,,

why its showing nothing..?


shell cmds:

>>>rf = RequestFactory()
>>>get_req = rf.request('/details')

>>> response = detail(get_req, 27000)

>>> response.status_code

200
>>> response.content

'\n\ndetails\n

.\n\n\n'

>>> response.template

Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'HttpResponse' object has no attribute 'template'

>>> response.context['data']
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: 'HttpResponse' object has no attribute 'context'

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to use the given snippet..?

2010-09-21 Thread girish shabadimath
hi all,
how to make use of this snippets

http://djangosnippets.org/snippets/963/


i have a view function

 def demand(request, id, template = 'hello.html'):
 
 

i want to test dis using the above snippets,,

i copied  the snippet in my localmachine

when i use django shell to check wat the request method (defined in snippet)
returns, it gives the following message...:

>>> from xxx.xxx import RequestFactory
>>> req = RequestFactory.request
>>> req


plz help me to knw how to use the snippet given in the above link...
-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
hi Paul,

thanks for d reply,,,but im new to python n django,,,dint do ne python unit
testing before,,can u plz give me some links or hints to start with...

On Thu, Sep 16, 2010 at 8:09 PM, Paul Winkler <sli...@gmail.com> wrote:

> On Sep 16, 10:11 am, girish shabadimath <girishmss.1...@gmail.com>
> wrote:
> > thanks for reply,
> > actually i used unit test to test urls and other view functions,,,there
> is a
> > module called Client() in django which acts as a browser to test urls,,,
> >
> > my problem is ,i want to test other methods in my project,,, how to do
> > so, without making use of django's test client..?..
>
> Exactly the same way you test any other python code. What's the
> problem?
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
thanks for reply,
actually i used unit test to test urls and other view functions,,,there is a
module called Client() in django which acts as a browser to test urls,,,

my problem is ,i want to test other methods in my project,,, how to do
so, without making use of django's test client..?..


On Thu, Sep 16, 2010 at 7:27 PM, Shawn Milochik  wrote:

> You can use Python's unittest module to test any Python code (including
> Django code).
>
> What is it about Django's test client or TestCase class that is a problem
> for you?
>
> Shawn
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Unit testing in django without using test client

2010-09-16 Thread girish shabadimath
hi,,,

i need to do unit testing in one of d django project, is there any other way
to test functions ( or methods ) without using test client..?

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Response object problem

2010-09-13 Thread girish shabadimath
hi all,
im in the task of testing django app..

when i do the simple url tests and check for status_code it gives me 200
which is correct,,

but when i use response.template it gives nothing though i use template in
the view function...?,,,reason..?

this may sound simple for many,,,but plz help

>>> response = c.get(urlstring, {'XX_id':id})

>>> response.status_code
200
>>> response.template
>>>

-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Response object problem

2010-09-13 Thread girish shabadimath
hi all,
im in the task of testing django app..

when i do the simple url tests and check for status_code it gives me 200
which is correct,,

but when i use response.template it gives nothing though i use template in
the view function...?,,,reason..?

this may sound simple for many,,,but plz help

>>> response = c.get(urlstring, {'XX_id':id})

>>> response.status_code
200
>>> response.template
>>>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django --Unit testing view functions

2010-09-06 Thread girish shabadimath
hi,,,
anybody help me with testing django views,,,

* wat all things need to be tested for view functions..?

* little bit confused about d usage of these two--
self.failUnlessEquals(XXX, XXX)  and
self.assertEquals(XXX, XXX) both seems to be same for me,,

* any related books or links is appreciated

Thanks in advance..!!


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django,how to read data from database when db has large volume of data

2010-09-02 Thread girish shabadimath
oh,,,thanks a lot for d reply,,,

On Thu, Sep 2, 2010 at 4:33 PM, Daniel Roseman <dan...@roseman.org.uk>wrote:

> On Sep 2, 9:49 am, girish shabadimath <girishmss.1...@gmail.com>
> wrote:
> > actually i wanted to access values from database and use those values in
> url
> > unittesting,,,
> >
> > like:
> > response = self.client.get('def/defect/', {'*ID*':*id*})
> > self.failUnlessEqual(response.status_code, 200)
> >
> > how to get id from database..?,,,and also i want this test to be done for
> > each id in database,,hw to proceed..?
> >
> > ,,,this may sound silly but plz help..
>
> Have you read the extensive documentation on how to make a query
> against the database?
> http://docs.djangoproject.com/en/1.2/topics/db/queries/
>
> However, I must say that it seems very odd to want to test requesting
> a URL against every ID in the database. That's not how unit testing
> works. Test with a representative sample of data, that's what fixtures
> are for.
> --
> DR.
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django,how to read data from database when db has large volume of data

2010-09-02 Thread girish shabadimath
buddy did i convince u..?,,,reply soon...solution to my problem,,

On Thu, Sep 2, 2010 at 2:19 PM, girish shabadimath <girishmss.1...@gmail.com
> wrote:

> actually i wanted to access values from database and use those values in
> url unittesting,,,
>
> like:
> response = self.client.get('def/defect/', {'*ID*':*id*})
> self.failUnlessEqual(response.status_code, 200)
>
> how to get id from database..?,,,and also i want this test to be done for
> each id in database,,hw to proceed..?
>
>
> ,,,this may sound silly but plz help..
>
>
>
>
>
> On Thu, Sep 2, 2010 at 1:39 PM, Daniel Roseman <dan...@roseman.org.uk>wrote:
>
>> On Sep 2, 8:17 am, girishmss <girishmss.1...@gmail.com> wrote:
>> >  Hi folks,im working on django project,,is there a way to access
>> db
>> > without using fixtures,, as fixtures is not working in my project,,i
>> > want to test urls of type:
>> >
>> >/abc/xyz/123 where '123' comes from database.,
>> >
>> > and that database contains lots of ids( ex:123 ) i
>> > dont want to loop through each ids and want to get dis unittest
>> > working..
>> >
>> > any help or related links is appreciated
>>
>> Sorry, this message makes no sense at all. What do fixtures have to do
>> with reading from the database? Why can't you do a normal ORM call?
>> --
>> DR.
>>
>> --
>> 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 email to
>> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Girish M S
>



-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django,how to read data from database when db has large volume of data

2010-09-02 Thread girish shabadimath
actually i wanted to access values from database and use those values in url
unittesting,,,

like:
response = self.client.get('def/defect/', {'*ID*':*id*})
self.failUnlessEqual(response.status_code, 200)

how to get id from database..?,,,and also i want this test to be done for
each id in database,,hw to proceed..?


,,,this may sound silly but plz help..




On Thu, Sep 2, 2010 at 1:39 PM, Daniel Roseman wrote:

> On Sep 2, 8:17 am, girishmss  wrote:
> >  Hi folks,im working on django project,,is there a way to access
> db
> > without using fixtures,, as fixtures is not working in my project,,i
> > want to test urls of type:
> >
> >/abc/xyz/123 where '123' comes from database.,
> >
> > and that database contains lots of ids( ex:123 ) i
> > dont want to loop through each ids and want to get dis unittest
> > working..
> >
> > any help or related links is appreciated
>
> Sorry, this message makes no sense at all. What do fixtures have to do
> with reading from the database? Why can't you do a normal ORM call?
> --
> DR.
>
> --
> 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 email to
> django-users+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Girish M S

-- 
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 email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.