Nope, OPTIONS is not new configuration tool
You can find more info 
https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-OPTIONS
If you will have usage problems, please create new message in django-users 
IRC or mailing list, this mailing list is for
development django itself.

понедельник, 22 июня 2015 г., 18:41:13 UTC+3 пользователь 
[email protected] написал:
>
> Thanks Andriy, I missed that, is this new in 1.8 ?
>
> Le lundi 22 juin 2015 17:06:46 UTC+2, Andriy Sokolovskiy (coldmind) a 
> écrit :
>>
>> I think due to 
>> https://github.com/django/django/blob/8047e3666b0b50bb04e6f16c2a4fb21ddfd5713f/django/db/backends/postgresql_psycopg2/base.py#L162
>>  
>> you can set application_name as the part of OPTIONS while configuration of 
>> your database, so it will be passed to psycopg2.connect.
>>
>>
>> понедельник, 22 июня 2015 г., 17:56:16 UTC+3 пользователь 
>> [email protected] написал:
>>>
>>> Hi,
>>>
>>> Be aware I will never speak about Django application as often used in 
>>> Django developpement, here the string **application_name** is not the name 
>>> of a Django'app.
>>> PostgreSQL permits on connection to specify a string that represent the 
>>> name of application that connect, useful to identify human tools like 
>>> *psql* or automated tools like *slony*, this optionnal parameter is 
>>> called *application_name*. This is very useful to debugging purpose, 
>>> postgresql prints this information in logs or internal view liek 
>>> pg_stat_activity, for example
>>>
>>> gatling=# select * from pg_stat_activity  limit 1 ;
>>> -[ RECORD 1 ]----+------------------------------
>>> datid            | 318636
>>> datname          | lolyx
>>> pid              | 8436
>>> usesysid         | 16384
>>> usename          | rodo
>>> application_name | slon.local_listen
>>> client_addr      | ::1
>>> client_hostname  | 
>>> client_port      | 42918
>>> backend_start    | 2015-06-16 20:31:50.177957+02
>>> xact_start       | 
>>> query_start      | 2015-06-22 16:25:57.494463+02
>>> state_change     | 2015-06-22 16:25:57.494564+02
>>> waiting          | f
>>> state            | idle
>>> backend_xid      | 
>>> backend_xmin     | 
>>> query            | rollback transaction;
>>>
>>> Ref : 
>>> http://www.postgresql.org/docs/current/static/runtime-config-logging.html#GUC-APPLICATION-NAME
>>>  
>>> http://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNSTRING
>>>
>>>
>>> The welll known python driver for postgresql *psycopg2* permots to use 
>>> this functionnnality by using kwargs when openning connection as :
>>>
>>> conn = connect(database='foo', port='5435',
>>>                host='127.0.0.1', user='rodo',password='rodo',
>>>                application_name='foobar')
>>> le code ici
>>>
>>> Ref : http://initd.org/psycopg/docs/module.html
>>>
>>> But, actually Django doesn't permit to use this option, before proposing 
>>> a patch to implement this in future version of Django I would like to 
>>> receive your comments and idea about this feature.
>>> My first idea is to add an optionnal entry in settings.DATABASE as is :
>>>
>>> DATABASES 
>>>  
>>> This new key in DATABASE dict will not use by all backends, not only 
>>> PostgreSQL has this functionnality, AFAIK SQL Server permits this too.
>>>
>>> I'll read your comments with interest, this will be my first patch to 
>>> Django and I'll be happy to discuss things like what is an acceptable name 
>>> for this new entry ?
>>> And of course I'll read the Contritbuting to Django before make my PR.
>>>
>>> Is this feature is accepted, the next step will be to automatically set 
>>> this settiings when using the **shell**, **dbshell** or **shell_plus** 
>>> command to help identify human action on production systems !
>>>
>>> Regards,
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/0d3f93f5-0142-4bd1-b2b8-fac4ae96f144%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to