Re: After Django

2017-06-06 Thread ludovic coues
post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/D94B8C12-97D3-4316-AFBA-C01320B25740%40gmail.com. > > For mor

Re: passing data to template

2017-06-12 Thread ludovic coues
Try `{{ results | pprint }}` in your template. That will not solve your problems but that will give you a lot more information about what data have been passed to your template. On 13 Jun 2017 6:53 am, "sum abiut" wrote: > Hi, > I need some help, i am using Django as my web framework and sqlalc

Re: passing data to template

2017-06-14 Thread ludovic coues
50, >>> 135.0), (735780, 770.0), (735813, 265.0), (735842, -1165.0), (735872, >>> 30.0), (735904, -55.0), (735933, 4.29), (735967, 1105.0), (735968, 0.0), >>> (735990, 4.32), (735995, 0.0), (736024, 0.0), (736055, 0.0), (736087, >>> -1000.0), (736116, 0.0), (73

Re: Entering initial data into django database

2016-03-20 Thread ludovic coues
There is a page in the documentation dealing with initial data [1]. The good news is that you don't have to write more code. You insert your data in a file and load it with the manage.py command. Out of the box, JSON, XML and SQL are supported. [1] https://docs.djangoproject.com/en/1.9/howto/init

Re: Entering initial data into django database

2016-03-20 Thread ludovic coues
First, you should create a fixture file with some sample data. Two entry, just like in the documentation is good. This way, you know you have a working fixture file. Then, you write a python function which take a list of bet and output a fixture file just like the exemple you have done. Finally,

Re: Pass these specific model objects to one template

2016-03-22 Thread ludovic coues
Have your tried to replace the view return with something similar to this line ? return render( request, '/signup.html/', {'data': sorted( currPersonData.items( ) ), 'eb': Elective.objects.all() }, ) 2016-03-22 7:57 GMT+01:00 Pemby : > > > > All of the above seems to be working the way I ex

Re: Getting NoReverseMatch at /logout/

2016-03-28 Thread ludovic coues
Your problem might be mixing include and name in the urls.py file. reverse("home") should give you better result. 2016-03-28 13:31 GMT+02:00 Deepanshu Sagar : > Oh okay, > > So, If I want to navigate to home page, which is at '/', how do it give > the parameter for this along with next_page key-v

Re: Problems with dumpdata/loaddata

2016-04-06 Thread ludovic coues
Both error look like encoding error. In the JS file, it look like there is a byte order mark at the start of the file. The first line of both file might help to understand the error. 2016-04-06 1:45 GMT+02:00 : > I want to dump and load data for two apps that I have. Using dumpdata works > fine:

Re: Problems with dumpdata/loaddata

2016-04-07 Thread ludovic coues
I believe the json file start with 0xff 0xfe, which mark the file as UTF-16. The problem is that these two character are invalid at the beginning of a json file. The problem have the same root for the xml. UTF-16 file but it pretend it is utf-8 encoded. These problems might go away on another OS o

Re: Django capser headless test and jenkins

2016-04-14 Thread ludovic coues
Django provide lot of builtin support for python unittest. You might save yourself a lot of trouble by reusing it. The documentation is available at https://docs.djangoproject.com/en/1.9/topics/testing/. For your specific problem, hanging is the expected behavior. manage.py runserver launch a djan

Re: remove ./ from commands

2016-04-21 Thread ludovic coues
Do you have the current dir in your path ? 2016-04-21 6:46 GMT+02:00 : > I just installed django 1.9.5. Now I have to type ./manage.py when I used > to just type manage.py. How do I get rid of the need to type ./ > osx el capitan > > -- > You received this message because you are subscribed to

Re: column "" must appear in the GROUP BY clause or be used in an aggregate function

2018-10-15 Thread ludovic coues
I cannot find in the code you shared "prome_product" so I assume there is missing code or a typo. The ProgrammingError should come with a line number or a stack trace where the line causing issue is roughly in the middle. If it's the serializer line, I suggest you split it, doing the annotate befo

Re: generate username and password

2018-10-20 Thread ludovic coues
Si le but est simplement de faire plaisir a la base de données, il est possible d'utiliser l'email comme nom d'utilisateur. Pour le mot de passe, c'est une mauvaise idée. Mais c'est possible, par exemple avec le module secrets en python 3.6 https://docs.python.org/3.6/library/secrets.html#recipes

<    1   2   3   4