Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Web Architect
Hi Erik, I tried your solution but there are some issues: .filter(date_created=Max('a__b__date_created')) - this is throwing error saying not proper use of group function. If I remove the above, the result isn't correct where when I go through each 'a' in the result, associated latest B.text

Re: 1.7.9 deployment stubbornly won't create a test database

2016-08-30 Thread Adam Hirsch
And the answer turned out to be... we were/are using a multidb setup, which silently prevents the test suite from creating a test db. Setting DATABASE_ROUTERS = [] re-enabled the test db creation. Sigh. It's always the little things. -- You received this message because you are subscribed to t

Re: Django template iterating through two dictionaries/variables

2016-08-30 Thread Aaron Weisberg
This is why i ask this group. Everyone helped out, but Nate's link pushed me in the right direction. Sometimes I don't even know what to ask stack overflow, but the google group always helps out. Thanks On Tuesday, August 30, 2016 at 11:28:37 AM UTC-5, Nate Granatir wrote: > > You could also

Re: Django documentation release 1.10.1a1

2016-08-30 Thread Rich Shepard
On Tue, 30 Aug 2016, Tim Graham wrote: I don't think there have been any recent changes to the styling, but if you'd like to contribute, the place to look is probably https://github.com/django/django/tree/master/docs/_theme. Tim, I don't know what to do once I'm on that page but when time p

Re: Django documentation release 1.10.1a1

2016-08-30 Thread Tim Graham
I don't think there have been any recent changes to the styling, but if you'd like to contribute, the place to look is probably https://github.com/django/django/tree/master/docs/_theme. On Tuesday, August 30, 2016 at 6:15:45 PM UTC-4, Rich Shepard wrote: > > I don't know how this PDF displays

Re: 1.7.9 deployment stubbornly won't create a test database

2016-08-30 Thread M Hashmi
My bad...missed the version in original question. You are right. On Tue, Aug 30, 2016 at 4:59 PM, Andromeda Yelton < andromeda.yel...@gmail.com> wrote: > What are do the relevant parts of your settings file say? In particular, > https://docs.djangoproject.com/en/1.7/topics/testing/overview/#the-

Re: 1.7.9 deployment stubbornly won't create a test database

2016-08-30 Thread Andromeda Yelton
What are do the relevant parts of your settings file say? In particular, https://docs.djangoproject.com/en/1.7/topics/testing/overview/#the-test-database says "If you want to use a different database name, specify NAME in the TEST dictionary for any given database in DATABASES." - I would check the

Re: 1.7.9 deployment stubbornly won't create a test database

2016-08-30 Thread M Hashmi
Try this: python manage.py test --keepdb On Mon, Aug 29, 2016 at 3:26 PM, Adam Hirsch wrote: > I've been handed a fairly large and built-up django 1.7.9 installation > with several dozen pre-existing in-house modules and a lot of history. > > For some reason, any attempt to * manage.py test *

Re: help designing a fallback django paralel server

2016-08-30 Thread M Hashmi
Not sure what exactly you want because why would you want your workers to access server on speed of internet when you have them locally connected. However, as far as I understood is that you can have one machine setup as remote with some firewall that will open up ports based on local IP addresses

Re: How to create a database for my website in Django

2016-08-30 Thread M Hashmi
Hi, First of all as far as creation of database is concerned there is comprehensive documentation at djagnoproject.com in tutorial section. Once you've created database then you can use "forms" to get data from the front end to save it in db. Before you go through all this exercise I would suggest

How to create a database for my website in Django

2016-08-30 Thread Jeff Goes
I have little knowledge when it comes to the creation of databases. I would like to know if someone can help me set a database for my website step by step since I have a deadline due to next month to finish a project that requires that kind of knowledge. The idea is to input information on the

Django Multi Table Inheritance and Preserving Child and Child History

2016-08-30 Thread Malik Rumi
Note: I originally posted this to http://dba.stackexchange.com/questions/147680/django-multi-table-inheritance-and-preserving-child-and-child-history, but 7 days and ZERO responses is not working for me. Place can have many different one to one fields, that’s why it can have bookstore, rest

Re: django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'treebeard.templatetags.admin_tree_list': cannot import name 'patterns'

2016-08-30 Thread Richard C
On second thoughts I just tried django 1.9.9 and it worked like a charm. Good luck with the 1.10 porting everyone! On Tuesday, 30 August 2016 21:22:19 UTC+1, Richard C wrote: > > Hi, > > I'm pretty new to this and (probably naively) trying to get django-shop > working with django 1.10. > I have

ti possible CommaSeparatedIpField

2016-08-30 Thread Jorge Cadena
Hi I have a idea CommaSeparatedIpField, it possible ? this for validacion IP ACL list in FreeSWITCH. -- 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-use

Django documentation release 1.10.1a1

2016-08-30 Thread Rich Shepard
I don't know how this PDF displays in other viewers, but in xpdf, mupdf, and acroread important strings in the text are very difficult to read because they have very low contrast with the white background. For example, comments are in a light grey and important strings are in a very pale yell

django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'treebeard.templatetags.admin_tree_list': cannot import name 'patterns'

2016-08-30 Thread Richard C
Hi, I'm pretty new to this and (probably naively) trying to get django-shop working with django 1.10. I have run into a few libraries that needed patterns() removing which I've done and raised issues with the appropriate owners, but now have run into this: django.template.library.InvalidTempla

Re: error in installing django[argon2] -regarding

2016-08-30 Thread Ricardo Daniel Quiroga
argon2 required lidfi in ubuntu install manuall $ sudo apt-get install libffi5 libffi-dev 2016-08-28 13:43 GMT-03:00 sabari rangan : > Collecting argon2-cffi>=16.1.0; extra == "argon2" (from django[argon2]) > Downloading argon2_cffi-16.1.0.tar.gz (1.2MB) > Complete output from command py

Re: beginner . problem simple form.

2016-08-30 Thread Jordi Fernandez
console no message, I see in one second what form search in bad url , bad because I want to the same view.(url) It's search in http://127.0.0.1:8000/crearasistenciaclasse/crearasistenciaclasse this is incorrect the correct is http://127.0.0.1:8000/crearasistenciaclasse El diumenge, 21 ago

Re: beginner . problem simple form.

2016-08-30 Thread Jordi Fernandez
the second is a comment El dimarts, 30 agost de 2016 18:56:39 UTC+2, Jordi Fernandez va escriure: > > > yes , we are test > El dilluns, 22 agost de 2016 22:38:39 UTC+2, ludovic coues va escriure: >> >> The second form tag is in an html comment. Everything inside >> won't be rendered. >> >> 201

Re: beginner . problem simple form.

2016-08-30 Thread Jordi Fernandez
yes , we are test El dilluns, 22 agost de 2016 22:38:39 UTC+2, ludovic coues va escriure: > > The second form tag is in an html comment. Everything inside > won't be rendered. > > 2016-08-22 14:31 GMT+02:00 Vijay Khemlani >: > > > Also, why do you have two form tags in your html? > > > > On

Re: get_available_name() got an unexpected keyword argument 'max_length'

2016-08-30 Thread Tim Graham
You need to update your own code or one of your dependencies as per https://docs.djangoproject.com/en/stable/releases/1.8/#support-for-the-max-length-argument-on-custom-storage-classes. If you follow https://docs.djangoproject.com/en/stable/howto/upgrade-version/ with an older version of Djang

Re: Django template iterating through two dictionaries/variables

2016-08-30 Thread Nate Granatir
You could also just join the dicts before passing them to the template. It looks like it's relatively straightforward (scores is just a list that contains dicts of a 'Number' and a 'score', right?) Then you could turn scores into a dict, assuming Numbers are unique: scores_new = {score['Number'

Re: simple form, beginner

2016-08-30 Thread Jordi Fernandez
sorry a error es undefined and other is error loading page (jquery) El dimarts, 30 agost de 2016 17:44:00 UTC+2, Jordi Fernandez va escriure: > > > {% > csrf_token %} > > > > {% csrf_token > %} > > > the two instrucctions not working, my view not received nothing post i > want a form with t

simple form, beginner

2016-08-30 Thread Jordi Fernandez
{% csrf_token %} {% csrf_token %} the two instrucctions not working, my view not received nothing post i want a form with the same view. remember I am Beginner! thank you def crearasistenciaclasse(request): user = 6 form = CrearasistenciaclasseForm(my_arg=user) if reques

[ANNOUNCE] djangoCMS 3.4 RC 1 released

2016-08-30 Thread czpython
Hello all, The django CMS core team just released the first release candidate for version 3.4. Download: https://github.com/divio/django-cms/archive/3.4.0rc1.zip Documentation: http://docs.django-cms.org/en/latest/index.html Release notes: http://docs.django-cms.org/en/latest/upgrade/3.4.html So

get_available_name() got an unexpected keyword argument 'max_length'

2016-08-30 Thread manolo gomez
Hi, I've updated from django 1.8 to 1.10, and now when save a ImageFile I'm getting the next error: get_available_name() got an unexpected keyword argument 'max_length' This is the end of the Traceback: File "/home/dev/Documents/web/children/views/views.py" in post 73.

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Web Architect
Thanks Erik. Will try out the solution you mentioned. On Tuesday, August 30, 2016 at 3:59:20 PM UTC+5:30, Erik Cederstrand wrote: > > > > Den 30. aug. 2016 kl. 11.20 skrev Erik Cederstrand < > erik+...@cederstrand.dk >: > > > > I'm not even sure that's possible to express in SQL, but it would >

Re: Postcode Search

2016-08-30 Thread Christian Ledermann
also have a look at http://stackoverflow.com/questions/19703975/django-sort-by-distance/35896358#35896358 On 25 August 2016 at 13:24, 'David Turner' via Django users wrote: > Thanks for this. Exactly what I am looking for. > > On 25 August 2016 at 12:59, Christian Ledermann > wrote: >> >> have a

Finally stable release of Django JET - responsive and fresh admin interface

2016-08-30 Thread Denis Kildishev
Finally stable release of Django JET - responsive and fresh admin interface http://jet.geex-arts.com/ -- 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-user

help designing a fallback django paralel server

2016-08-30 Thread Marco Silva
Hello, I have several critical systems, each run a django server witch users use trough the local network(192.168.xxx.xxx) to control and monitor the system. The goal would be to create a more powerfull remote server, that could unify several local servers, so that regular use would be only tr

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Marco Silva
Maybe this can help you https://docs.djangoproject.com/en/1.10/topics/db/aggregation/ terça-feira, 30 de Agosto de 2016 às 07:33:14 UTC+1, Web Architect escreveu: > > Hi, > > I am looking for an elegant and efficient mechanism to have a query filter > or a solution for the following one to many

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Erik Cederstrand
> Den 30. aug. 2016 kl. 11.20 skrev Erik Cederstrand > : > > I'm not even sure that's possible to express in SQL, but it would probably be > quite convoluted if it is. Here's an easier-to-understand solution: > > res = set() > for b in B.objects.all().select_related('a').annotate(Max('date_cre

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Web Architect
Hi Erik, Thanks for the solution. So, I understand we get all instances of B which are max (date created) or latest (date created) for each instance of A and then we check b.text == 'ABCD' and select the corresponding instance of A. Can't we add additional filter to check if text='ABCD' inste

Re: iregex doesn't work properly

2016-08-30 Thread Sergiy Khohlov
this one problem is not related to the django. It is Mysql special configuration. Dot is not working in your system as expected : http://dev.mysql.com/doc/refman/5.7/en/regexp.html Looks like your localization is broking regular expression in MySQL. In this case please ask this question in

Re: iregex doesn't work properly

2016-08-30 Thread Denis Yu
Here is the results: mysql> SELECT id FROM `clients_order_process` WHERE `clients_order_process`.`step_description` REGEXP '^заказ роутер.$'; Empty set (0,00 sec) while: mysql> SELECT id FROM `clients_order_process` WHERE `clients_order_process`.`step_description` REGEXP '^заказ роутер*а*$';

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Erik Cederstrand
> for b in B.objects.all().select_related('a').annotate(Max('date_created')): That should probably be: Max('a__b__date_created') instead. Erik -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

Re: iregex doesn't work properly

2016-08-30 Thread Sergiy Khohlov
try to execute from console : SELECT id FROM `clients_order_process` WHERE `clients_order_process`.`step_description` REGEXP '^заказ роутер.$' Many thanks, Serge +380 636150445 skype: skhohlov On Tue, Aug 30, 2016 at 11:58 AM, Denis Yu wrote: > > sorry, may be I explained the result of tes

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Erik Cederstrand
I'm not even sure that's possible to express in SQL, but it would probably be quite convoluted if it is. Here's an easier-to-understand solution: res = set() for b in B.objects.all().select_related('a').annotate(Max('date_created')): if b.date_created != b.date_created__max: continue

Re: iregex doesn't work properly

2016-08-30 Thread Denis Yu
sorry, may be I explained the result of testing incorrectly( pls let me make another try): here is the record in log table: | 2016-08-28 14:14:17.188990 | crm[crm] @ localhost [] | 934 | 0 | Query| SELECT COUNT(*) AS `__count` FROM `clients_order_process` WHERE (`clients_o

Re: iregex doesn't work properly

2016-08-30 Thread Sergiy Khohlov
You are making me confused. 1) Django send data to db and SQL is correct 2) MySQL returns correct result 3) Django shows right data Which one step has issue ? Many thanks, Serge +380 636150445 skype: skhohlov On Tue, Aug 30, 2016 at 10:51 AM, Denis Yu wrote: > Yes, i've seen. > > could yo

Re: iregex doesn't work properly

2016-08-30 Thread Denis Yu
Yes, i've seen. could you pls say one more ideas to check? воскресенье, 28 августа 2016 г., 21:11:56 UTC+6 пользователь Sergiy Khohlov написал: > > I've made mistake : "$" should be in request not "%" > > this request "SELECT COUNT(*) AS `__count` FROM `clients_order_process` > WHERE (`clie

Oracle Client Identifier

2016-08-30 Thread nisi242424
Hi Expert, Oracle has the feature that it notifies application user id to connected database session like this. https://oracle-base.com/articles/misc/dbms_session#client_identifier We could realize it for a new connection in Python, for example, cursor = connection.cursor() cursor.callproc('dbm

Re: A tricky query in one to many relationship - atleast for me:)

2016-08-30 Thread Web Architect
Hi Mike, Thanks for your response. I am aware of chaining filters. The latest() API in django queryset returns an object and not a queryset. Hence, I cannot add a filter to it. I had thought about using chaining filters but couldn't find a way. On Tuesday, August 30, 2016 at 12:18:56 PM UTC