Re: update() on queryset django 1.7.1 not functional

2014-11-10 Thread Ricardo L. Dani
Hello Biola, When you do a update in a queryset, the objects of the Session that already instantiated need to be updated. If you do in your test: self.assertEqual(Session.objects.get(id=result.id).price, Decimal('700')) The assertion will be ok 2014-11-10 8:21 GMT-02:00 Biola Oyeniyi

Django i18n in JS templates

2014-11-10 Thread Alex Isayko
We actively use django-pipeline package and its builtin solution for javascript templates The problems begins when we needed to use i18n in this templates, for ex.: <%= gettext('To translate') %> Standart django

Re: Where does django store auth migrations?

2014-11-10 Thread Carl Meyer
Hi Ed, On 11/10/2014 03:43 AM, Dr Ed wrote: > I don't really think it's the Custom model that's at fault here - this > migration was created months ago. The point is that auth migrations are > stored in, to my mind, the wrong place > (in >

Re: how to test an application that's using a legacy database

2014-11-10 Thread Carl Meyer
Hi David, On 11/10/2014 08:14 AM, dpalao.pyt...@gmail.com wrote: > Probably I was not clear in my original post. My problem is precisely > how to switch managed to True just before the tests and put it back to > False afterwards to avoid creating of tables by hand during the tests. > That is

Chrome Desktop Notification

2014-11-10 Thread Max Nathaniel Ho
Hi all, I've been tasked to create a simple Chrome Desktop notification module. >From what I have read up so far, I think it means having a desktop notification with a message whenever a certain action is done through the use of Chrome Extension. Has anyone done a similar task, or know of

Re: update() on queryset not functional.

2014-11-10 Thread Biola Oyeniyi
On Monday, 10 November 2014 13:52:46 UTC+1, Tom Evans wrote: > > On Mon, Nov 10, 2014 at 10:15 AM, Biola Oyeniyi > wrote: > > based on the docs, update() Performs an SQL update query for the > specified > > fields, and returns the number of rows matched. > > I have tried

Django + Database Connections

2014-11-10 Thread Edward Armes
Hi there, I am currently looking at Django for a personal project. While I understand how a lot of it works I can't wrap my head around how the actual DB querying is done specifically what part of Django actually looks at the database (I'm not talking about Manager, Models or Querysets, but

Django database layer + twisted deferred

2014-11-10 Thread Edward Armes
Hi there, I am currently looking at Django for a personal project. While I understand how a lot of it works I can't wrap my head around how the actual DB querying is done specifically what part of Django actually looks at the database (I'm not talking about Manager, Models or Querysets, but

Re: Decoding JSON

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 10:50 AM, Tom Evans wrote: > On Mon, Nov 10, 2014 at 1:44 PM, Larry Martell > wrote: >> I have a web page POST-ing a JSON object like this: >> >> var content = '{ "EnergylinxTariffMenu" : [' + >>

Re: Decoding JSON

2014-11-10 Thread Tom Evans
On Mon, Nov 10, 2014 at 1:44 PM, Larry Martell wrote: > I have a web page POST-ing a JSON object like this: > > var content = '{ "EnergylinxTariffMenu" : [' + >'{ "FuelPage":"dual" , "DualMenu":"electric",' + >'

Re: how to test an application that's using a legacy database

2014-11-10 Thread Fred Stluka
David, No. You can use it unchanged. With Django 1.4 at least, and I assume also with 1.7. I have a legacy MS SQL Server DB where I have rights to modify data but not tables. I also cannot create new DBs in MS SQL Server. I used *inspectdb* to create models from the existing DB. I

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
On Monday, November 10, 2014 4:08:15 PM UTC+1, donarb wrote: > > > > On Monday, November 10, 2014 7:00:12 AM UTC-8, dpalao...@gmail.com wrote: >> >> Here comes the context. Sorry. >> >> On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >>> >>> >>> No, when you run syncdb it

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
On Monday, November 10, 2014 4:03:57 PM UTC+1, larry@gmail.com wrote: > > On Mon, Nov 10, 2014 at 10:00 AM, > wrote: > > Here comes the context. Sorry. > > > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com > wrote: > >> > >> > >> No, when

Re: how to test an application that's using a legacy database

2014-11-10 Thread donarb
On Monday, November 10, 2014 7:00:12 AM UTC-8, dpalao...@gmail.com wrote: > > Here comes the context. Sorry. > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >> >> >> No, when you run syncdb it will not create or modify any existing >> tables, only create new ones.

Re: how to test an application that's using a legacy database

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 10:00 AM, wrote: > Here comes the context. Sorry. > > On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: >> >> >> No, when you run syncdb it will not create or modify any existing >> tables, only create new ones. > > >

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
Here comes the context. Sorry. On Monday, November 10, 2014 3:49:40 PM UTC+1, larry@gmail.com wrote: > > > No, when you run syncdb it will not create or modify any existing > tables, only create new ones. > Again, are the docs

Re: how to test an application that's using a legacy database

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 9:53 AM, wrote: > So what is written in the docs is wrong? Please provide some context. Quote the relevant portions of the post you're replying to. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
So what is written in the docs is wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: how to test an application that's using a legacy database

2014-11-10 Thread Larry Martell
On Mon, Nov 10, 2014 at 9:43 AM, wrote: > Hi, > I'm writing a Django application that uses an existing database. If I > understood it well, in such a case one must create non-managed models for > the legacy tables to avoid Django creating already existing tables, right?

how to test an application that's using a legacy database

2014-11-10 Thread dpalao . python
Hi, I'm writing a Django application that uses an existing database. If I understood it well, in such a case one must create non-managed models for the legacy tables to avoid Django creating already existing tables, right? For instance, this is how one of my models looks like: class

Decoding JSON

2014-11-10 Thread Larry Martell
I have a web page POST-ing a JSON object like this: var content = '{ "EnergylinxTariffMenu" : [' + '{ "FuelPage":"dual" , "DualMenu":"electric",' + ' "SupplierName":"npower", "MeterType": "",' + ' "TestLive":"test"} ]}';

Re: Django CMS

2014-11-10 Thread Sergiy Khohlov
no problem. You are welcome Many thanks, Serge +380 636150445 skype: skhohlov On Mon, Nov 10, 2014 at 3:14 PM, Niall wrote: > Sergiy, just got it all sorted, one of my extra installed apps was > commented out in settings.py. > Thanks for response in any case > Niall

Re: Django CMS

2014-11-10 Thread Niall
Sergiy, just got it all sorted, one of my extra installed apps was commented out in settings.py. Thanks for response in any case Niall On Monday, 10 November 2014 17:35:39 UTC+10, Sergiy Khohlov wrote: > > send also log from console > > Many thanks, > > Serge > > > +380 636150445 > skype:

Re: update() on queryset not functional.

2014-11-10 Thread Tom Evans
On Mon, Nov 10, 2014 at 10:15 AM, Biola Oyeniyi wrote: > based on the docs, update() Performs an SQL update query for the specified > fields, and returns the number of rows matched. > I have tried updating a model using it on django 1.7.1 with both sqlite and > postgres but my

Re: Using django to translate html

2014-11-10 Thread Andreas Kuhne
2014-11-10 12:31 GMT+01:00 Andrei Balasanov : > What is the best route to localize HTML using django? There is a clear > documentation what to do with the views/templates and javascript, however > we have a set of the html files that are requiring localization. If we

Using django to translate html

2014-11-10 Thread Andrei Balasanov
What is the best route to localize HTML using django? There is a clear documentation what to do with the views/templates and javascript, however we have a set of the html files that are requiring localization. If we move them to the template folder to use template localizatioin there will

update() on queryset django 1.7.1 not functional

2014-11-10 Thread Biola Oyeniyi
I have atttempted updating a model based on using the update() method as described in the docs https://docs.djangoproject.com/en/dev/ref/models/querysets/ , I have used both sqlite and postgres but still end up with the model not being updated. My code is shown below. def

update() on queryset not functional.

2014-11-10 Thread Biola Oyeniyi
based on the docs, update() Performs an SQL update query for the specified fields, and returns the number of rows matched. I have tried updating a model using it on *django 1.7.1* with both sqlite and postgres but my test suite keeps failing and indicating no update. Here is what i have tried.

Re: Where does django store auth migrations?

2014-11-10 Thread Dr Ed
Hi Markus, I don't really think it's the Custom model that's at fault here - this migration was created months ago. The point is that auth migrations are stored in, to my mind, the wrong place (in /Users//.virtualenvs/ /lib/python2.7/site-packages/django/contrib/auth/) and a separate

Re: Where does django store auth migrations?

2014-11-10 Thread Markus Holtermann
Hey Ed, you certainly don't have to copy the virtualenv over to production! Can you share some insights on your custom user model and your settings. A complete traceback, if you have any, helps too. /Markus On Monday, November 10, 2014 9:00:04 AM UTC+1, Dr Ed wrote: > > > > On Sunday, 9

Re: Where does django store auth migrations?

2014-11-10 Thread Dr Ed
Yep, agreed. This is what I've done. Thanks for the reply! Cheers, Ed On Sunday, 9 November 2014 15:16:51 UTC+1, Cal Leeming [iops.io] wrote: > > Sounds like a bit of a weird edge case, I've had all sorts of problems > previously when moving to custom user models from an app with existing >

Re: Where does django store auth migrations?

2014-11-10 Thread Dr Ed
On Sunday, 9 November 2014 14:50:54 UTC+1, Daniel Roseman wrote: > > On Sunday, 9 November 2014 13:40:12 UTC, Dr Ed wrote: >> >> Okay, I'm confused. I found it, in here: >> /Users//.virtualenvs//lib/python2.7/site- >> packages/django/contrib/auth/migrations >> >> Why are app related