Paginate persist object in search data ListView

2016-08-10 Thread flaudizio
Hi, I've a problem with paginate in CBV using a form search to filter results. When I get "page 2" (in paginator) the object_list (filtered by name example) load all data again. I've a object with 20 records, so I get a search and returned 12 records (paginate_by=2) generate 2 pages. But when

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-10 Thread Mike Dewhirst
On 11/08/2016 5:11 AM, Evan Roberts wrote: I'm struggling to get a project going. I'm new to python and django. Is django_pyodbc supported on Python 3.5.1 and django 1.9? If not could you suggest a combination of python & django that is known to work with MS SQL Server 2012? Not an answer to

Re: (Is it a bug?) TruncMonth does not work when there is "ordering" in the model Meta (Django 1.10)

2016-08-10 Thread Tim Graham
Unfortunately, I don't think mentioning the issue every place where someone might be doing an aggregation query is practical. I did recently add a link about it to the Meta.ordering docs recently [0], so hopefully that helps raise awareness. [0]

Re: (Is it a bug?) TruncMonth does not work when there is "ordering" in the model Meta (Django 1.10)

2016-08-10 Thread Neto
Thanks! Should have a note about it on the page "database-funcions": https://docs.djangoproject.com/en/1.10/ref/models/database-functions/#trunc Em quarta-feira, 10 de agosto de 2016 17:17:31 UTC-3, Tim Graham escreveu: > > Default ordering affects aggregation queries like that: >

Re: (Is it a bug?) TruncMonth does not work when there is "ordering" in the model Meta (Django 1.10)

2016-08-10 Thread Tim Graham
Default ordering affects aggregation queries like that: https://docs.djangoproject.com/en/stable/topics/db/aggregation/#interaction-with-default-ordering-or-order-by On Wednesday, August 10, 2016 at 3:44:33 PM UTC-4, Neto wrote: > > I'm trying to get number of records per month, but Django does

(Is it a bug?) TruncMonth does not work when there is "ordering" in the model Meta (Django 1.10)

2016-08-10 Thread Neto
I'm trying to get number of records per month, but Django does not return correctly when there is "ordering" in class Meta Model. I have the Abc model, with 4 records made this month, look what happens (Django 1.10, PostgreSQL): class Abc(Base): class Meta: ordering =

Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-10 Thread Evan Roberts
I'm struggling to get a project going. I'm new to python and django. Is django_pyodbc supported on Python 3.5.1 and django 1.9? If not could you suggest a combination of python & django that is known to work with MS SQL Server 2012? Here are the details of my virtual environment windows 7

Re: AttributeError overriding save_existing_objects in Formset class

2016-08-10 Thread Constantine Covtushenko
I believe that you should also override `save` method with your commit=False. That `save` method and `save_existing_objects` method works in sync. It is supposed that they should have the same `commit` value. Hope that helps, On Wed, Aug 10, 2016 at 10:14 AM, Vincenzo

Re: Creating a new Project in Django

2016-08-10 Thread ludovic coues
these files should be in the directory learning_log (inner) inside another learning_log (outer) directory. manager.py should be in the outer directory. 2016-08-10 17:40 GMT+02:00 Lov Verma : > In order to create a new project, I'm using this command: > > django-admin.py

Creating a new Project in Django

2016-08-10 Thread Lov Verma
In order to create a new project, I'm using this command: django-admin.py startproject learning_log . but i am not able to create a new directory containing the required files. But if i use the command: django-admin startproject learning_log . i'm able to get these 4 files: __init__.py

Updating Satchmo/Django store to SHA-256 and G5 Root Certificate

2016-08-10 Thread jc
I have a Satchmo/Django e-commerce store that I've sort of inherited. :/ The client got an email from PayPal recently stating that they will be updating fromm SHA-1 to SHA-256 and changing to a G5 Root Certificate as well. I will need to update the store (probably specifically the PayPal

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
Fabio Caritas Barrionuevo da Luz Thanks dear i will follow your link to improve my questioning ! Thanks again. -- 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 create Xlm file in specific folder ?

2016-08-10 Thread Fabio C. Barrionuevo da Luz
Dear Asad, Ludovic Coues has already answered your question. simply create a new file and save the content in it: from django.template.loader import render_to_string xml_content = render_to_string('my_xml_template_with_django_template_variables.xml', {'foo': 'bar'}) file_path =

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
*M Hashmi* its Ok Next i will try to Post question that you can easily understand. -- 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 create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
ludovic coues Output of Gateway.objects.all()[:3].values_list('name') is (u 'TestGateway',) Assume this file i just want to change the -- You received this

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread M Hashmi
I apologize for my message but it reminded me the last question from asad and frustration due to absence of code. Hope Asad will make it a practice and what Ludovic suggested makes sense. Hope it works. On Wednesday, August 10, 2016 at 3:46:32 AM UTC-7, Asad ur Rehman wrote: > > I want to

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread ludovic coues
I'm pretty sure talking about telepathy was rude, outside the django's code of conduct and some excuses would be nice. The question make a lot more sense with an exemple :) I assume Gateway is a django model (I missed that first time, sorry) and you want to fill an xml file. Do you mind to share

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread M Hashmi
Don't take it personal but if someone is offering you time to help...you also need to be precise with questions. I did solved your problem by suggesting you the correct way to do it. Do you want me to write code for you as well?? Try the solution and then let the group know about error. On Wed,

Re: Help with django form an ajax, error 500

2016-08-10 Thread Andrew Beales
Guessing this is old news, but there are 2 problems with views: ProductoConcepto.objects.create(producto=producto, orden=orden, cantidad=cantidad) - producto and orden need to be Python objects and cantidad is a float, but the request.POST values will be string representations. Also the ajax

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
M hashmi if someone is not doing question up to the mark you have to guide him/her. We are here for learning not for criticize each other. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
M Hashmi Now tell me can you solve my problem or you are only here to criticize others ? -- 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 create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
*M Hashmi* Here is my file format. i want to create it as it is instead of *name*. i want to get name Gateway.objects.values_list('name') by this query ... and then file make in etc/freeswitch/sip_profiles/external directory ..

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread M Hashmi
Dear Asad, Google is trying to build such a technology that can help transmit brain waves connected via neurons to some media such as wifi or wire. Till the time its not a reality...you have to paste your complete code to get help because no one can read your mind without you telling or

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
Sir whats its solution ? -- 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 group, send email to

Re: Launching websites

2016-08-10 Thread M Hashmi
It completely depends on nature of your site or business you intend to manifest virtually. So I would keep it generic and to the point that is required for most of business models. General Checklist: Terms of use Contact page About page Transactional emails setup SMTP setup Google analytics

Re: How to create Xlm file in specific folder ?

2016-08-10 Thread ludovic coues
That sound like a python problem. How to open a file and write in it. 2016-08-10 12:46 GMT+02:00 Asad ur Rehman : > I want to create xlm file in django in this path > "etc/freeswitch/sip_profiles/external" . > > Gateway.objects.values_list('name') > > this should be

How to create Xlm file in specific folder ?

2016-08-10 Thread Asad ur Rehman
I want to create xlm file in django in this path "etc/freeswitch/sip_profiles/external" . Gateway.objects.values_list('name') this should be included in file. How can i create function for it. Can anyone help me ? If you don't understand tell i will explain you more but please help me.

Re: AttributeError overriding save_existing_objects in Formset class

2016-08-10 Thread Vincenzo
The Django version I'm using is the 1.9.4 Il giorno martedì 9 agosto 2016 22:04:57 UTC+2, Constantine Covtushenko ha scritto: > > Hi Vincenzo, > > Can you please specify Django version that you are using. > > Regards, > > On Tue, Aug 9, 2016 at 6:06 PM, Vincenzo > wrote: >