Re: Admin Email From Address

2016-11-14 Thread Constantine Covtushenko
Hi Matthew, There should be considered following: 1. Not always cod runs with user interaction - worker cases 2. Not always user authenticated With such cases who the sender should be? Regards, Constantine C. On Nov 15, 2016 12:43 AM, "Matthew Pava" wrote: I would like

Admin Email From Address

2016-11-14 Thread Matthew Pava
I would like to be able to change the 'from' address of the admin error emails in production environments to be the email address of the user that generated the error. It would be convenient in triaging errors rather quickly. I did examine the Django source code, but it doesn't appear to be

Re: DatabaseWrapper.needs_rollback and transaction.rollback()

2016-11-14 Thread marky1...@gmail.com
By "commit_manually" I meant set_autocommit(False). Sorry for the confusion. -- 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: DatabaseWrapper.needs_rollback and transaction.rollback()

2016-11-14 Thread marky1...@gmail.com
In the real code, we have much more complex code flow where transaction.atomic offers no readability improvement (imo) over commit_manually. (and even if transaction.atomic were an improvement at all call sites, we have lots of code using commit manually which cannot be changed immediately.)

Re: DatabaseWrapper.needs_rollback and transaction.rollback()

2016-11-14 Thread Simon Charette
Hello Mark, Is there a reason for not using the transaction.atomic context manager instead of managing your transaction manually by calling .set_autocommit(False) and rollback? Simon Le lundi 14 novembre 2016 15:46:38 UTC-5, mark...@gmail.com a écrit : > > After a validationError occurs, why

Re: django.db.utils.OperationalError: near ")": syntax error ERROR at $ python3 manage.py migrate

2016-11-14 Thread Simon Charette
Hello Peter, That looks like https://code.djangoproject.com/ticket/24424 Simon Le lundi 14 novembre 2016 12:06:41 UTC-5, Peter Sels a écrit : > > Dear Django-ers, > > I ran into a problem with Django. > > -- > Situation: > -- > > I am using version 1.10.3 of Django. > > For the fifth time I

Re: DatabaseWrapper.needs_rollback and transaction.rollback()

2016-11-14 Thread marky1...@gmail.com
I have found this: https://code.djangoproject.com/ticket/26340 , where Aymeric Augustin said that he thought that transaction.rollback should indeed set DatabaseWrapper.needs_rollback to False, as I would expect. -- You received this message because you are subscribed to the Google Groups

DatabaseWrapper.needs_rollback and transaction.rollback()

2016-11-14 Thread marky1...@gmail.com
After a validationError occurs, why is the transaction considered dirty, blocking all db reads/writes? In this example: https://bitbucket.org/marky1991/django-test/raw/59c9ff89e4b12b4a831c36171139cb022735201b/test1.py , I don't really expect a TransactionManagementError at all, as the failure

Basic configuration for running under Apache

2016-11-14 Thread bob gailer
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/modwsgi/ This page offers: WSGIScriptAlias //path/to/mysite.com/mysite/wsgi.py WSGIPythonPath /path/to/mysite.com In my setup this becomes c:\Users\myname\mysite\mysite\wsgi.py I am puzzled by the .com in the example. Can you

django.db.utils.OperationalError: near ")": syntax error ERROR at $ python3 manage.py migrate

2016-11-14 Thread Peter Sels
Dear Django-ers, I ran into a problem with Django. -- Situation: -- I am using version 1.10.3 of Django. For the fifth time I updated my table related classes in models.py. The 4 previous time this ran well all through (1) The server ran and did not complain about syntax errors or anything

Re: Modify Django Community Blog RSS feed url

2016-11-14 Thread Tim Graham
Done. On Monday, November 14, 2016 at 7:03:43 AM UTC-5, Dávid Főző wrote: > > Hello fellow Djangonauts, > > I submitted rss feed of my website as a Django Blog. Now, I would like to > modify it to make sure only selected articles will be submitted. > > If you have authority in this, I would like

Re: Running daphne in production - Mac OS X Server 10.11

2016-11-14 Thread Adam Teale
Unfortunately I haven't had any luck with it. I have the mod_proxy and mod_proxy_wstunnel Apache modules loaded and I the following proxies inside the virtual host for port 443 (SSL) ProxyPass /chat/stream/ wss://127.0.0.1:8000/chat/stream/ ProxyPassReverse /chat/stream/

Re: How to access Django data with the field name in text?

2016-11-14 Thread rmschne
yep, that did it. It was getattr() and setattr() I was unaware of (or forgot!). I made my code a bit more generic (and I know I have not put in much error correction or exception detection, but will do so). Thank you. See code here: fields = [(f.name, f.verbose_name) for f in

Modify Django Community Blog RSS feed url

2016-11-14 Thread Dávid Főző
Hello fellow Djangonauts, I submitted rss feed of my website as a Django Blog. Now, I would like to modify it to make sure only selected articles will be submitted. If you have authority in this, I would like to change this: https://www.davidfozo.com/blog/feeds/rss/ to this:

Re: How to access Django data with the field name in text?

2016-11-14 Thread Vijay Khemlani
If I understood it correctly, you might want to do it like this setattr(att, "fname", "value_to_be_set") and to get the value first_name = getattr(att, "fname") On Mon, Nov 14, 2016 at 8:38 AM, rmschne wrote: > I have a extracted all the field names from a Django model

How to access Django data with the field name in text?

2016-11-14 Thread rmschne
I have a extracted all the field names from a Django model into a list called "fields", e.g. fields = [(f.name, f.verbose_name) for f in Meetingattendee._meta.get_fields()] I ask the user to select a record, e.g. att=Meetingattendee.objects.get(id=attid) where "attid" is the ID of the