Re: Django i18n questions

2014-04-10 Thread Andrew Pashkin
I ended up using this snippet for switching languages. It simply reverses url with given language code. On 11.04.2014 09:55, Andrew Pashkin wrote: Documentation says

Django i18n questions

2014-04-10 Thread Andrew Pashkin
Documentation says , that: ...it looks for a django_language key in the current user's session This is the latest commit

Re: QuerySet doubt

2014-04-10 Thread Rafael E. Ferrero
Found a bug in that view (see revision 3 of linkode) but my ignorance about iterate or perform the object for template still remains. Saludos Cordiales, -- Rafael E. Ferrero 2014-04-11 1:00 GMT-03:00 Rafael E. Ferrero : > An SQL who can solve my trouble its here > http://linkode.org/DqwJ0ljeE4w

Re: QuerySet doubt

2014-04-10 Thread Rafael E. Ferrero
An SQL who can solve my trouble its here http://linkode.org/DqwJ0ljeE4wdsqw1G9Q8g7 but, with that i obtain something like this: *ArticleTitle GallerieTitle PicTitle* Fusce luctus scelerisque doloruna galeria una foto Fusce luctus scel

QuerySet doubt

2014-04-10 Thread Rafael E. Ferrero
In my project i have news, every one can have n pic galleries and every gallery can have n pics (every model are in differents apps but that its not the problem) (in the view you can see that i regroup all the pics of galleries related to an article in a single object but this is only for that temp

Re: How to override admin field widget?

2014-04-10 Thread Lucas Klassmann
Hi! I never used this, but i found here and can be useful: https://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.MultiWidget Cheers. On Thu, Apr 10, 2014 at 10:56 PM, Mark Phillips wrote: > I hope I am using the right terminology > > I have a Decimal field in a model calle

Re: How to filter queryset object list with matching parameter?

2014-04-10 Thread Lucas Klassmann
Hi, You can use *ID* of object for compare with a list and *IN* : for user in user_object_list: if user.is_locked(): user_exclude_list.append(user.*id*) user_list = user_list.exclude(*user__in*=*user_exclude_list*) # [1, 3, 4, 5,] IDs, is more fast Cheers. On Thu, Apr 10, 2014 a

How to override admin field widget?

2014-04-10 Thread Mark Phillips
I hope I am using the right terminology I have a Decimal field in a model called 'width'. In the admin screen, I would like to display this field as three text boxes like this: width: [] []/[] so I can enter 2 1/8 for the width, and then have the code convert that to 2.125 as a Decimal fiel

Re: recommended fcgi way for django 1.6 on windows? Problems with https

2014-04-10 Thread Russell Keith-Magee
On Fri, Apr 11, 2014 at 3:31 AM, anton wrote: > Russell Keith-Magee wrote: > >> On Wed, Apr 9, 2014 at 1:09 AM, anton wrote: >> >>> Hi , >>> >>> I use: >>> - windows 7 64 bit >>> - python 2.7.6 (32bit) >>> - apache 2.4.9 (32bit vc9 build from apachelounge) >>> - django 1.6.2 >>> - flup for f

Re: How to filter queryset object list with matching parameter?

2014-04-10 Thread nobody
Thanks sacrac and Lucas. On Friday, April 11, 2014 4:26:23 AM UTC+10, Lucas Klassmann wrote: > > Hi, > > If you want exact match: > > user_list.filter(user__name__iexact=user.name) > > > Or containment test: > user_list.filter(user__name__icontains=user.name) > > > Note that "i" on start is for ca

Re: How to filter queryset object list with matching parameter?

2014-04-10 Thread nobody
Thanks Lucas, sorry for not being clear, I like not to include the object when the name is matching, I figured out that can be done to use user_list.exclude, not user_list.filter. It is working currently in an inefficient way: for user in user_object_list: if user.is_locked(): user

Re: Signal : send a parameter to a receiver function

2014-04-10 Thread mo.mughrabi
can someone advise why the below example doesn't work on django 1.6? On Wednesday, April 14, 2010 12:12:49 PM UTC+3, bruno desthuilliers wrote: > > On 14 avr, 09:32, alecs wrote: > > How can I send a parameter to a receiver function ? This is wrong : > > > signals.post_save.connect(receiver=ref

Re: django and thrift

2014-04-10 Thread Ryan R
This is an old thread, but responding in case anyone interested in django+thrift comes across this. Implementing Django/thrift server is not difficult to do and it has advantags over JSON/webservice, namely less overhead and simplified serialization/deserialization of strongly typed complex obj

Creating a modular form where widgets depend on the select of another widget

2014-04-10 Thread Zebulon
I have looked into the solution and found several ways to do this, however considering this may be tedious, would like some pointers to do this in the most clever way. I am creating a form composed of several sections, where one of the section depends on the selection of one of the widget. M

Re: recommended fcgi way for django 1.6 on windows? Problems with https

2014-04-10 Thread anton
Russell Keith-Magee wrote: > On Wed, Apr 9, 2014 at 1:09 AM, anton wrote: > >> Hi , >> >> I use: >> - windows 7 64 bit >> - python 2.7.6 (32bit) >> - apache 2.4.9 (32bit vc9 build from apachelounge) >> - django 1.6.2 >> - flup for fcgi ( noted as prerequisite in django docs) >> >> I use flu

Re: Analysis of csv data

2014-04-10 Thread Petite Abeille
On Apr 10, 2014, at 8:20 PM, Saransh Mehta wrote: > What should i use to interpret the data from the csv and do the best analysis > possible from such a data(marks of the students in this example). Sometime/most of the time/all the time... what's most important is the data itself. Try naked

Re: Analysis of csv data

2014-04-10 Thread Petite Abeille
On Apr 10, 2014, at 12:54 PM, Jay Parikh wrote: > you could use d3.js for drawing data driven graphs Totally. JSON'ize your CSV appropriately and create, say, a cool Radial Reingold-Tilford Tree: http://bl.ocks.org/mbostock/4063550 Don't forget to add some uber-cool animations: http://mbo

Re: How to filter queryset object list with matching parameter?

2014-04-10 Thread Lucas Klassmann
Hi, If you want exact match: user_list.filter(user__name__iexact=user.name) Or containment test: user_list.filter(user__name__icontains=user.name) Note that "i" on start is for case-insensitive filtering. Look here for more information: https://docs.djangoproject.com/en/dev/topics/db/queries

Re: Analysis of csv data

2014-04-10 Thread Saransh Mehta
There are two entities, one that enters the data, say for example marks of some students. Now i'm able to generate the csv of the entered data and i want to present the data in graphical form or anything appealing to the other entity. What should i use to interpret the data from the csv and do

Re: How to filter queryset object list with matching parameter?

2014-04-10 Thread carlos
hi, maybe you filter you queryset user_list = Model.objects.filter(user__name=user.name ).filter(other__field=user.email) Cheers On Thu, Apr 10, 2014 at 9:44 AM, nobody wrote: > Hi, > > How can I filter an item from the queryset object list if the name is > matching? The following won't work.

Re: (1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-10 Thread C. Kirby
When you started using mysql did you do a fresh manage.py syndb or sqlite dump > mysql import? If the latter than you almost certainly have incorrect create statements. Drop the mysql db and create it using manage.py syncdb. If you need to import the data from the existing sqlite db I suggest

RE: py2exe + Django 1.6

2014-04-10 Thread Johan De Taeye
Here’s a revised patch. The previous patch addresses the issue with commands, but I needed some additional things to get things up and running with py2exe. If it helps, you can download the installer of my application at http://sourceforge.net/projects/frepple/files/ and browse all source co

Re: py2exe + Django 1.6

2014-04-10 Thread Antonio Francisco Martín Romero
Thank you very much. I can see the commands but I get an error when I try to run one. I have attached my manage.py file. See below the errors >manage.exe shell Traceback (most recent call last): File "manage.py", line 28, in File "django\core\management\__init__.pyc", line 365, in execute

How to filter queryset object list with matching parameter?

2014-04-10 Thread nobody
Hi, How can I filter an item from the queryset object list if the name is matching? The following won't work. user_list.filter(user__name=user.name) Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group a

Re: Python-Social-Auth + Django

2014-04-10 Thread Juan Pablo Martínez
Hi Chad, the mailing list for that package is here https://groups.google.com/forum/#!forum/python-social-auth Bye On Thu, Apr 10, 2014 at 5:54 AM, Chad Hollman wrote: > Hi all, my name is Chad, I'm working a project for a club at my university > and my team and I are trying to provide a means

Re: (1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-10 Thread Adam Teale
hmmm it seems that anything in the database is not set to auto increment On Thu, Apr 10, 2014 at 11:04 AM, Adam Teale wrote: > ok, i just enabled auto increment to the comment id field > > Seems to work fine! > > Now is there any way that this could have been set automatically from > django? S

Re: (1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-10 Thread Adam Teale
ok, i just enabled auto increment to the comment id field Seems to work fine! Now is there any way that this could have been set automatically from django? So i don't have this issue in the future) Thanks! On Thu, Apr 10, 2014 at 9:47 AM, Adam Teale wrote: > sorry I meant django.contrib.comme

Re: Relationships exposed over RESTful interface

2014-04-10 Thread Javier Guerra Giraldez
On Thu, Apr 10, 2014 at 8:29 AM, Conrad Rowlands wrote: > Why is this and how can I stop this behaviour but still bring back the > Manufacturer Details. I expected instead the first query to load all of the > data. override the get_collection() method in your View (or ViewSet) to add a select_re

Re: py2exe + Django 1.6

2014-04-10 Thread johan de taeye
This is very old issue in Django: see ticket https://code.djangoproject.com/ticket/8280 I've attached the patch I'm already using for years to package my django application with py2exe. I don't understand why the core team continues to use the current un-pythonic code to discover commands and

Relationships exposed over RESTful interface

2014-04-10 Thread Conrad Rowlands
Hi, I have an issue with regard to exposing a RESTful interface using filtersets and HyperLinkedModelserialisers. I have two model classes defined thus: class Manufacturer(CommonExtendedIcon): WebSite=models.CharField(max_length=1024) StandardList=models.BooleanField(default=False)

Re: (1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-10 Thread Adam Teale
sorry I meant django.contrib.comments - not messages -- 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 django-users+unsubscr...@googlegroups.com. To post to this g

Re: (1364, "Field 'id' doesn't have a default value") - mysql issue?

2014-04-10 Thread Adam Teale
Hello Mark, thanks for responding to my question I'm using the built-in django commenting system - django.contrib.messages It was fine with the sqlite db I had done a syncdb and the app was working, but it just seems that now when I add a comment to something there is this issue. Do I need to m

py2exe + Django 1.6

2014-04-10 Thread Antonio Francisco Martín Romero
Hi everyone, I was using py2exe + Django 1.3 without problems. From Django 1.4 the way to find the commands changed and it tries to find .py files as you can see in the find_commands() function in the file core/management/__init__.py . When you compile Django using py2exe, your don't have .py

Re: Analysis of csv data

2014-04-10 Thread Pedro
Can you define what kind of analysis you want to do? May we supose you know how to load csv data into memory? Pedro Alves Em 10/04/2014 07:43, "Saransh Mehta" escreveu: > I need to analyze the incoming data from the csv file and present it to > the user in the best possible way? > What tools do

Re: Analysis of csv data

2014-04-10 Thread Julien GODIN
I would say a good ol' mycsvdata.split(",") on each line of your CSV and then put all this in a table. J On 04/10/2014 12:43 PM, Saransh Mehta wrote: > I need to analyze the incoming data from the csv file and present it > to the user in the best possible way? > What tools do i need to use for

Re: Analysis of csv data

2014-04-10 Thread Timothy W. Cook
Uh, R ??? http://cran.r-project.org/doc/manuals/R-intro.html On Thu, Apr 10, 2014 at 7:43 AM, Saransh Mehta wrote: > I need to analyze the incoming data from the csv file and present it to > the user in the best possible way? > What tools do i need to use for analyzing the csv and drawin

Re: Analysis of csv data

2014-04-10 Thread Jay Parikh
Hi Saransh, Well for just analyzing csv files you can use simple python file io but in order to do more from those extracted data then you could use d3.js for drawing data driven graphs. Could you please provide what kind of csv data you have then probably it would be easy to sort it out. Best, J

Analysis of csv data

2014-04-10 Thread Saransh Mehta
I need to analyze the incoming data from the csv file and present it to the user in the best possible way? What tools do i need to use for analyzing the csv and drawing graphs etc out of the csv? -- You received this message because you are subscribed to the Google Groups "Django users" group.

Regarding the Django-celery

2014-04-10 Thread Sagar Ghuge
Hi, I want to replicate the features which we are able to see when we log in as admin. I have Djcelery App installed. It shows different option's like Task, Worker. etc What I want to do is I want to replicate those all option under one normal App which doesn't need Admin credentials . Please H

Python-Social-Auth + Django

2014-04-10 Thread Chad Hollman
Hi all, my name is Chad, I'm working a project for a club at my university and my team and I are trying to provide a means for the club and it's members to track events, manage content, post media, etc. Our group wants to use LinkedIn as a legitimate means for the club members at our university

AssertionError: False is not true when moving to Function Based Views

2014-04-10 Thread David Ingledow
I am using Test Driven Development methods to create a basic blog in Django 1.6. I followed [this tutorial](http://matthewdaly.co.uk/blog/2013/12/28/django-blog-tutorial-the-next-generation-part-1/) but wanted to change to using Function Based Views since I'm just starting with Django. I get