Re: Is there a plan for Django to handle NoSQL databases natively?

2013-03-27 Thread Trevor Joynson
I've had good experiences using mongoengine with django. It's not django's ORM but it's very similar to it. On Mar 26, 2013 12:36 PM, "Donnie Darko" wrote: > I really like Django. I've fiddled around a bit with Rails, but I > personally prefer Django's logic. I also prefer Python over Ruby. Agai

Re: Auction app

2013-03-27 Thread Evgeny Demchenko
There's this one: https://github.com/kaijutech/Django-Auction i'm about to try it out. If it's not good I'll create one from scratch. Will keep you posted :) On Monday, February 2, 2009 2:10:01 AM UTC+8, Erik Allik wrote: > > Does anyone know of an app written for Django that implements a kind

Re: Using values_list and extra on same queryset

2013-03-27 Thread Larry Martell
On Tue, Mar 26, 2013 at 8:14 PM, Larry Martell wrote: > On Tue, Mar 26, 2013 at 4:51 PM, Larry Martell > wrote: >> I have some existing code that calls values_list on a queryset. I need >> to add something using extra to this queryset. If I call extra before >> values_list the extra stuff is gon

Re: Using values_list and extra on same queryset

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 12:38 PM, Larry Martell wrote: > Ignore my last message - I was seriously sleep deprive3d when I made > it. But my original question remains - how can I use values_list and > extra on same queryset? It just seems to WFM: Foo.objects.all().extra(select={'wibble': '1'}).val

Navigation Bar

2013-03-27 Thread Simon Shaw
I am Django/Web newbie developer and I am looking for the correct way to add a navigation bar (hopefully the correct term) to my ticketing app such that the options "Admin", "Open New Ticket", "View New Ticket", "Dashboard", "Logout" will always appear at the top of the page and that the page w

Re: Using values_list and extra on same queryset

2013-03-27 Thread Larry Martell
On Wed, Mar 27, 2013 at 6:52 AM, Tom Evans wrote: > On Wed, Mar 27, 2013 at 12:38 PM, Larry Martell > wrote: >> Ignore my last message - I was seriously sleep deprive3d when I made >> it. But my original question remains - how can I use values_list and >> extra on same queryset? > > It just seem

Avoiding Sessions

2013-03-27 Thread Venkatraman S
So, if i am right, usage of sessions makes an extra call to the DB for every view with login_required. SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."emai

Re: Using values_list and extra on same queryset

2013-03-27 Thread Karen Tracey
On Wed, Mar 27, 2013 at 9:19 AM, Larry Martell wrote: > Here's a very simple example showing it's not working for me > > (Pdb) CST.objects.all().extra(select={'ep': > 1}).values_list('image_measurer_id') > [(86456L,), (86454L,), (86452L,), (86450L,), (86448L,), (86446L,), > (86444L,), (86442L,), (

Re: Avoiding Sessions

2013-03-27 Thread Shawn Milochik
Use django-redis-sessions as a back end instead of the database. On Mar 27, 2013 9:35 AM, "Venkatraman S" wrote: > So, if i am right, usage of sessions makes an extra call to the DB for > every view with login_required. > > SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login"

Re: Navigation Bar

2013-03-27 Thread Shawn Milochik
If you put these links in your base template it will appear on every page. If you wrap some of those links with template if/endif syntax and check request.user to see if they have permission, you can hide individual links, change their CSS classes, or replace them with a something else. -- You r

Re: Lost CSS & Javascript in Django Admin

2013-03-27 Thread Tim Cook
Thank you James and Branko. Yes, it was the relevant part of the docs that, actually I had read, but didn't understand at the time. I appreciate your patience in pointing it out to me. Cheers, Tim On Mon, Mar 25, 2013 at 6:57 PM, Branko Majic wrote: > On Mon, 25 Mar 2013 18:12:44 -0300 > Tim Co

Re: Navigation Bar

2013-03-27 Thread Venkatraman S
On Wed, Mar 27, 2013 at 5:55 PM, Simon Shaw wrote: > I am Django/Web newbie developer and I am looking for the correct way to > add a navigation bar (hopefully the correct term) to my ticketing app such > that the options "Admin", "Open New Ticket", "View New Ticket", > "Dashboard", "Logout" will

Re: Is there a plan for Django to handle NoSQL databases natively?

2013-03-27 Thread Tim Cook
I am not using it right now, but plan to when I have more Django experience. So I have been watching the non-rel group: django-non-relatio...@googlegroups.com and it does seem to be active now. Maybe you want to recheck and if they are having project management issues you can help? HTH, Tim On

Re: Avoiding Sessions

2013-03-27 Thread Venkatraman S
Well, the intention of asking that Q was not to check any possible data-store alternatives but to understand the nuances of the cookie based approach. Am not a great security expert when it comes to cookies and the limitations that it 'can' cause down the lane - and hence. On Wed, Mar 27, 2013 at

Re: Django payment gateway with subscription management

2013-03-27 Thread Venkatraman S
And any other options other than that .. to be used Internationally? I know of ... chargify, ccavenue, spreedly, fusebill, merchee, cheddargetter, chargify, zuora etc. Am trying to do a comparison between all these possible services in terms of their fees and also features. On Wed, Mar 6, 2013 at

Re: Avoiding Sessions

2013-03-27 Thread Shawn Milochik
Some clients may not allow cookies, which would be a problem if that's your full session strategy. If you're storing nothing but the default information in the cookie then there shouldn't be any risk, and in any case the cookie is encrypted with the SECRET_KEY from your settings. If you store addit

Re: Is there a plan for Django to handle NoSQL databases natively?

2013-03-27 Thread Shawn Milochik
Another point is one made by Alex Gaynor at PyCon 2012. Too often, people ask "How do I do X in Django," when they should be asking "How do I do X in Python," or "Does Django have something for X." The first question is too limiting. Remember that Django is just some Python code. The second quest

Re: Is there a plan for Django to handle NoSQL databases natively?

2013-03-27 Thread Javier Guerra Giraldez
On Tue, Mar 26, 2013 at 6:49 PM, Russell Keith-Magee wrote: > On Wed, Mar 27, 2013 at 12:46 AM, Javier Guerra Giraldez > wrote: >> >> since there's no such thing as "common NoSQL features", each datastore >> would need its own modifications, so i think the common attitude is >> that most of these

Re: Avoiding Sessions

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 1:35 PM, Venkatraman S wrote: > So, if i am right, usage of sessions makes an extra call to the DB for every > view with login_required. > > SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", > "auth_user"."is_superuser", "auth_user"."username", > "a

Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-03-27 Thread +Emmanuel
Hello there, I am working through the django tutorial at djangoproject.com. So far everything works out fine until Section 2.4.6 (customizing the admin form). Django throws an error: *'module' has no attribute 'StackedInLine'. *I checked around and this seems to work: *if you use import to inc

Re: Navigation Bar

2013-03-27 Thread Andre Terra
In my last project I created a template tag that would take an app name as an argument and build the links according to that user's permissions for the links in that app. This made the template easier to read at the cost of having to write the function and learning how it worked. Since I was the on

Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 3:32 PM, +Emmanuel wrote: > Hello there, > > I am working through the django tutorial at djangoproject.com. So far > everything works out fine until Section 2.4.6 (customizing the admin form). > Django throws an error: 'module' has no attribute 'StackedInLine'. I > checked

Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-03-27 Thread Karen Tracey
On Wed, Mar 27, 2013 at 11:32 AM, +Emmanuel wrote: > Hello there, > > I am working through the django tutorial at djangoproject.com. So far > everything works out fine until Section 2.4.6 (customizing the admin form). > Django throws an error: *'module' has no attribute 'StackedInLine'. * > Rig

Getting an AttributeError while creating a Django project

2013-03-27 Thread Olga Zasenko
Hi, everybody! I'm following the instructions on website docs.djangoproject.com and trying to create my very first Django project. The only result I get is a confusing error: AttributeError: 'module' object has no attribute '_handlerList'. My Django version is 1.5, Python - 2.7.3. I completely d

Re: Getting an AttributeError while creating a Django project

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 4:39 PM, Olga Zasenko wrote: > Hi, everybody! > I'm following the instructions on website docs.djangoproject.com and trying > to create my very first Django project. > The only result I get is a confusing error: > > AttributeError: 'module' object has no attribute '_handler

manytomany field and intermediary table from a legacy database

2013-03-27 Thread Vittorio
I know that when I define a manytomany field automagically "behind the scene Django creates an intermediary join table to represent the many-to-many relationship". Now I have a legacy MySQL db, feeded by an existing procedure built in Filemaker via ODBC, which I would like to use with django to

Re: Using values_list and extra on same queryset

2013-03-27 Thread Larry Martell
On Wed, Mar 27, 2013 at 7:38 AM, Karen Tracey wrote: > > On Wed, Mar 27, 2013 at 9:19 AM, Larry Martell > wrote: >> >> Here's a very simple example showing it's not working for me >> >> (Pdb) CST.objects.all().extra(select={'ep': >> 1}).values_list('image_measurer_id') >> [(86456L,), (86454L,), (

Re: Is file based cache is safe for concurrent process?

2013-03-27 Thread Russell Keith-Magee
On Wed, Mar 27, 2013 at 8:57 AM, Ivan Smirnoff wrote: > Hi all. > Can anyone tell, does django.cache locks file for writing by concurrent > process? Django's file-based cache doesn't do any locking. It wasn't really designed as a production system -- it's more of a test that the cache API works

South Error in migration:

2013-03-27 Thread Tim Cook
I can't find a similar scenario in the list archives, so . I had run the initial migration, etc and all seemed fine. I modified one model from this: class CCD(models.Model): rm_version = models.ForeignKey(RMversion, related_name='%(class)s_related+') ... to this: class CCD(models.Mod

No multiple calls while iterating the queryset in template

2013-03-27 Thread Venkatraman S
Interesting Observation: So, am passing a queryset to my template and based on the way a field in the record 'starts-with', i am rendering the record into different 'tables' in the view. Something like: {% for record in settings %} {%if record.type|starts_with:"EMAIL_" %} ...show record det

Re: South Error in migration:

2013-03-27 Thread Juan Pablo Martínez
do 0001 --fake, your table south_migrations dont have the row indicating that initial On Wed, Mar 27, 2013 at 8:49 PM, Tim Cook wrote: > I modified one model from this: -- juanpex -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

RE: No multiple calls while iterating the queryset in template

2013-03-27 Thread Babatunde Akinyanmi
Yeah, that's expected behavior. settings = SomeModel.objects.all() for e in settings: print e.pk for e in settings: print e.pk for e in settings: print e.pk In the above, the database will be hit only once but.. for e in SomeModel.objects.all(): print e.pk for e in SomeModel.

Re: Testing with a custom user model as a ForeignKey in Django 1.5

2013-03-27 Thread Felipe Coelho
2013/3/18 Felipe Coelho > 1) Using tests that need the models, but don't actually touch the >> database. This means you can put the model definition inline in the test >> code, so AUTH_USER_MODEL has the right value when the code is run. This >> lets us test validation conditions, etc, but not h