Re: Modify Django Community Blog RSS feed url

2016-11-15 Thread Dávid Főző
Thank you! Really appreciate it.

-- 
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 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/c82441c3-cd18-4022-976a-ce10bb8ea93b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Basic configuration for running under Apache

2016-11-15 Thread Tim Graham
I think it's just an example directory name. You can use whatever names you 
like.

On Monday, November 14, 2016 at 2:36:44 PM UTC-5, bob gailer wrote:
>
> 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 explain? 
>
>

-- 
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 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/466a70b4-c5de-4b89-90b7-641731a8780e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Admin Email From Address

2016-11-15 Thread Matthew Pava
In such cases, we would have a fallback that is already established in the 
settings file.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django-users@googlegroups.com
Subject: Re: Admin Email From Address


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" 
mailto:matthew.p...@iss.com>> wrote:
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 possible 
without writing my own custom function.  Any ideas?

Thank you!

--
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 
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/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

--
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 
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/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 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/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


Django, Ajax e Fullcalendar

2016-11-15 Thread Elias Coutinho
Boa tarde a todos.

Assisti o vídeo de um colega 
https://www.youtube.com/watch?v=PwskBz5re4Q&feature=youtu.be e peguei 
carona no projeto dele para iniciar estudo de Ajax.
Aproveitei a api rest que ele criou, modifiquei um pouco para atender o que 
eu desejava, ja havia estudado django rest framework e foi moleza essa 
pasrte da app.

O que ficou confuso foi a integração do ajax com o django, vi as views e 
confesso que pouca coisa eu compreendi (para variar rsrs). Percebo que o 
Cuducos foi bem didatico mas como eu não fiquei muito tempo no hangout não 
pude perguntar nada.

Enfim, consigo fazer o CRUD no django e ver o resultado no fullcallendar, 
ficou lindão!

O problema é que sei das firulas que o fullcalendar pode fazer, como por 
exemplo:

1 - arrastar um evento de uma data para outra. (Editar)
2 - cadastrar um novo evento diretamente pelo fullcalendar utilizando 
modais.(Incluir)
3 - excluir um evento diretamente no fullcalendar utilizando 
modais.(excluir)

Ou seja, do CRUD só aprendi o R 

Então publicarei meu projeto no github e se alguém desejar me ajudar a 
implementar isso ficarei muito grato.

Aqui o link do projeto no [GitHub.](
https://github.com/CoutinhoElias/vitrinebela)
Caso não tenham permissão basta me enviar seu usuário do github para eu 
add, ainda não descobri como deixar o projeto público, eu nunca fiz nenhum 
projeto privado.

Aqui o link do [fullcalendar.](https://fullcalendar.io/)

Caso alguém tenha um curso de ajax integrando com django pode portar aqui 
também.

Obrigado.

-- 
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 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/22b86c67-a346-4b79-8dc2-af4a5c451d46%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django, Ajax e Fullcalendar

2016-11-15 Thread Elias Coutinho

I'm sorry,
Now correctly translated.

Good afternoon everyone.

I watched a video from a colleague 
https://www.youtube.com/watch?v=PwskBz5re4Q&feature=youtu.be and I took a 
ride on his project to start Ajax study.
I took advantage of the api rest he created, modified it a little to fit 
what I wanted, had already studied django rest framework and it was this 
app pasha way.

What was confusing was the integration of ajax with django, I saw the views 
and confess that little I understood (for a change). I realize that the 
Cuducos was well didactic but since I did not stay long in the hangout I 
could not ask for anything.

Anyway, I can do CRUD in django and see the result in fullcallendar, it was 
nice!

The problem is that I know of the firsts that fullcalendar can do, such as:

1 - drag an event from one date to another. (To edit)
2 - register a new event directly by fullcalendar using modal. (Include)
3 - delete an event directly in fullcalendar using modal. (Delete)

That is, from CRUD I only learned the R 

So I will post my project on github and if anyone wants to help me 
implement this I will be very grateful.

Here the project link in [GitHub.] 
(Https://github.com/CoutinhoElias/vitrinebela)
If you do not have permission just send me your github user to add me, I 
still have not figured out how to leave the public project, I've never done 
any private projects.

Here the [fullcalendar.] Link (https://fullcalendar.io/)

If someone has an ajax course integrating with django you can carry here as 
well.

Thank you.


Em terça-feira, 15 de novembro de 2016 13:57:54 UTC-3, Elias Coutinho 
escreveu:
>
> Boa tarde a todos.
>
> Assisti o vídeo de um colega 
> https://www.youtube.com/watch?v=PwskBz5re4Q&feature=youtu.be e peguei 
> carona no projeto dele para iniciar estudo de Ajax.
> Aproveitei a api rest que ele criou, modifiquei um pouco para atender o 
> que eu desejava, ja havia estudado django rest framework e foi moleza essa 
> pasrte da app.
>
> O que ficou confuso foi a integração do ajax com o django, vi as views e 
> confesso que pouca coisa eu compreendi (para variar rsrs). Percebo que o 
> Cuducos foi bem didatico mas como eu não fiquei muito tempo no hangout não 
> pude perguntar nada.
>
> Enfim, consigo fazer o CRUD no django e ver o resultado no fullcallendar, 
> ficou lindão!
>
> O problema é que sei das firulas que o fullcalendar pode fazer, como por 
> exemplo:
>
> 1 - arrastar um evento de uma data para outra. (Editar)
> 2 - cadastrar um novo evento diretamente pelo fullcalendar utilizando 
> modais.(Incluir)
> 3 - excluir um evento diretamente no fullcalendar utilizando 
> modais.(excluir)
>
> Ou seja, do CRUD só aprendi o R 
>
> Então publicarei meu projeto no github e se alguém desejar me ajudar a 
> implementar isso ficarei muito grato.
>
> Aqui o link do projeto no [GitHub.](
> https://github.com/CoutinhoElias/vitrinebela)
> Caso não tenham permissão basta me enviar seu usuário do github para eu 
> add, ainda não descobri como deixar o projeto público, eu nunca fiz nenhum 
> projeto privado.
>
> Aqui o link do [fullcalendar.](https://fullcalendar.io/)
>
> Caso alguém tenha um curso de ajax integrando com django pode portar aqui 
> também.
>
> Obrigado.
>

-- 
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 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/ba460719-d8d7-4898-9a09-dc4ffcff7ab0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


javascript variable to django template

2016-11-15 Thread kml Awad
Hi,

How can I inject javacript object (variable ) in django template (html) ?

Thank you for your help.

regards.

-- 
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 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/57cc4f22-3aad-4b2a-8a21-4f0fe957cc0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: javascript variable to django template

2016-11-15 Thread GMail
Hi,

As any other variable:


  var myAwesomeVar = {{ my_awesome_var }};
  alert(myAwesomeVar);


> On 15 Nov 2016, at 18:46, kml Awad  wrote:
> 
> Hi,
> 
> How can I inject javacript object (variable ) in django template (html) ?
> 
> Thank you for your help.
> 
> regards.
> 
> -- 
> 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 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/57cc4f22-3aad-4b2a-8a21-4f0fe957cc0d%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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 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/07AA14F4-DDA6-4884-A3B6-8B2CAAE1BB5B%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Basic configuration for running under Apache

2016-11-15 Thread Antonis Christofides
The author of that snippet decided that the root directory of the Django 
project is named "mysite.com", whereas the Django project itself is "mysite". 
While this is plausible, it is suboptimal as an example because usually the 
root directory of the Django project has the same name as the Django project 
itself ("django-admin startproject" creates it this way).

So you can perfectly read it as //path/to/mysite/mysite/wsgi.py etc.

--
Antonis Christofides
http://djangodeployment.com/


On Mon, 14 Nov 2016 14:36:04 -0500, bob gailer  wrote:

> 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 explain?
> 
> -- 
> 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 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/c9f26e89-87f9-5ba8-d708-6ceb236a8e5e%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.


-- 
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 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/E1c6imC-0001UX-A0%40rmm6prod02.runbox.com.
For more options, visit https://groups.google.com/d/optout.


Re: Admin Email From Address

2016-11-15 Thread Constantine Covtushenko
Sorry but I do not see any valuable reason of doing things in such way.

Email is sent from wrong sender.
And if someone decides to email back than those user would be confused.

It is better to call things by its name.

On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava  wrote:

> In such cases, we would have a fallback that is already established in the
> settings file.
>
>
>
> *From:* django-users@googlegroups.com [mailto:django-users@
> googlegroups.com] *On Behalf Of *Constantine Covtushenko
> *Sent:* Tuesday, November 15, 2016 12:46 AM
> *To:* django-users@googlegroups.com
> *Subject:* Re: Admin Email From Address
>
>
>
> 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 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 possible
> without writing my own custom function.  Any ideas?
>
>
>
> Thank you!
>
>
>
> --
> 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 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/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> 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 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/CAK52boX3QBmimdd3z5YSbKDOAMOeD
> rX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 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/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 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/CAK52boXM8Eg9aDpHOmZOqCHSne55e_DwMYWHRBF%3D086VsNDhbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RE: Admin Email From Address

2016-11-15 Thread Matthew Pava
The error emails only go to the admins: me.  I would not be confused because 
the subject line of the email indicates that it is coming from the Django app 
starting with [Django].  The value in receiving the emails with the user’s 
email address is so that if, for instance, the president of the company gets an 
error page or anyone else gets an error page, I can very quickly determine 
which error I should focus on by simply glancing on who the email is from.  (In 
this case, the president…)

From: kostyak7...@gmail.com [mailto:kostyak7...@gmail.com] On Behalf Of 
Constantine Covtushenko
Sent: Tuesday, November 15, 2016 2:27 PM
To: django-users@googlegroups.com
Subject: Re: Admin Email From Address

Sorry but I do not see any valuable reason of doing things in such way.

Email is sent from wrong sender.
And if someone decides to email back than those user would be confused.

It is better to call things by its name.

On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava 
mailto:matthew.p...@iss.com>> wrote:
In such cases, we would have a fallback that is already established in the 
settings file.

From: django-users@googlegroups.com 
[mailto:django-users@googlegroups.com] On 
Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django-users@googlegroups.com
Subject: Re: Admin Email From Address


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" 
mailto:matthew.p...@iss.com>> wrote:
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 possible 
without writing my own custom function.  Any ideas?

Thank you!

--
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 
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/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

--
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 
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/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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 
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/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL.

For more options, visit https://groups.google.com/d/optout.

--
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 
django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 

Re: Admin Email From Address

2016-11-15 Thread Constantine Covtushenko
As I know all error emails are sent within logger handler: 'mail_admins'.

I would suggest to override 'AdminEmailHandler' and 'mail_admins'.

for more information check logging documentation
.

Hope that helps

On Tue, Nov 15, 2016 at 10:31 PM, Matthew Pava  wrote:

> The error emails only go to the admins: me.  I would not be confused
> because the subject line of the email indicates that it is coming from the
> Django app starting with [Django].  The value in receiving the emails with
> the user’s email address is so that if, for instance, the president of the
> company gets an error page or anyone else gets an error page, I can very
> quickly determine which error I should focus on by simply glancing on who
> the email is from.  (In this case, the president…)
>
>
>
> *From:* kostyak7...@gmail.com [mailto:kostyak7...@gmail.com] *On Behalf
> Of *Constantine Covtushenko
> *Sent:* Tuesday, November 15, 2016 2:27 PM
>
> *To:* django-users@googlegroups.com
> *Subject:* Re: Admin Email From Address
>
>
>
> Sorry but I do not see any valuable reason of doing things in such way.
>
>
>
> Email is sent from wrong sender.
>
> And if someone decides to email back than those user would be confused.
>
>
>
> It is better to call things by its name.
>
>
>
> On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava 
> wrote:
>
> In such cases, we would have a fallback that is already established in the
> settings file.
>
>
>
> *From:* django-users@googlegroups.com [mailto:django-users@
> googlegroups.com] *On Behalf Of *Constantine Covtushenko
> *Sent:* Tuesday, November 15, 2016 12:46 AM
> *To:* django-users@googlegroups.com
> *Subject:* Re: Admin Email From Address
>
>
>
> 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 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 possible
> without writing my own custom function.  Any ideas?
>
>
>
> Thank you!
>
>
>
> --
> 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 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/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> 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 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/CAK52boX3QBmimdd3z5YSbKDOAMOeD
> rX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> 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 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/e85597c0b8634f46ae5d1f6ede73abdd%40ISS1.ISS.LOCAL
> 
> .
>
>
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> 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 django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-u

RE: Admin Email From Address

2016-11-15 Thread Matthew Pava
Thank you so much, Constantine!  That was the clue I needed.  It’s not exactly 
the cleanest solution, but it does get the job done.  I copied 
AdminEmailHandler and mail_admins and modified them appropriately to include 
the from_email address.

I had some issue with “Apps not loaded,” but all I had to do then was move 
“from django.conf import settings” to the top of the file before all other 
imports.


From: kostyak7...@gmail.com [mailto:kostyak7...@gmail.com] On Behalf Of 
Constantine Covtushenko
Sent: Tuesday, November 15, 2016 3:19 PM
To: django-users@googlegroups.com
Subject: Re: Admin Email From Address

As I know all error emails are sent within logger handler: 'mail_admins'.

I would suggest to override 'AdminEmailHandler' and 'mail_admins'.

for more information check logging 
documentation.

Hope that helps

On Tue, Nov 15, 2016 at 10:31 PM, Matthew Pava 
mailto:matthew.p...@iss.com>> wrote:
The error emails only go to the admins: me.  I would not be confused because 
the subject line of the email indicates that it is coming from the Django app 
starting with [Django].  The value in receiving the emails with the user’s 
email address is so that if, for instance, the president of the company gets an 
error page or anyone else gets an error page, I can very quickly determine 
which error I should focus on by simply glancing on who the email is from.  (In 
this case, the president…)

From: kostyak7...@gmail.com 
[mailto:kostyak7...@gmail.com] On Behalf Of 
Constantine Covtushenko
Sent: Tuesday, November 15, 2016 2:27 PM

To: django-users@googlegroups.com
Subject: Re: Admin Email From Address

Sorry but I do not see any valuable reason of doing things in such way.

Email is sent from wrong sender.
And if someone decides to email back than those user would be confused.

It is better to call things by its name.

On Tue, Nov 15, 2016 at 4:05 PM, Matthew Pava 
mailto:matthew.p...@iss.com>> wrote:
In such cases, we would have a fallback that is already established in the 
settings file.

From: django-users@googlegroups.com 
[mailto:django-users@googlegroups.com] On 
Behalf Of Constantine Covtushenko
Sent: Tuesday, November 15, 2016 12:46 AM
To: django-users@googlegroups.com
Subject: Re: Admin Email From Address


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" 
mailto:matthew.p...@iss.com>> wrote:
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 possible 
without writing my own custom function.  Any ideas?

Thank you!

--
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 
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/29de56e899934c489630983151e28092%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

--
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 
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/CAK52boX3QBmimdd3z5YSbKDOAMOeDrX6iF3NzvsLs-fNx2PO1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubs

Can I use Django Channels to solve this architectural prolem?

2016-11-15 Thread psaod8fza9s
Hi there,

I want to develop a Django site where users have the possibility to 
interact with systemd services in realtime and to see the log output in 
realtime.

I sketched up a quick draft on my idea how this could work: 
https://i.imgur.com/pd5uLtl.jpg


One simplified use-case would be:

  1. User visits Django website.
  2. User chooses one of many systemd services. each service would be 
represented by a single webpage, eg. /services/id/1, /services/id/2...
  3. User gets presented a realtime log, the source being either journald 
or lastlog-file on the file system.
  4. User clicks on Stop button.
  5. Service gets stopped.
  6. User receives exit codes, etc. in a readable format.
  7. User clicks on start button
  8. User receives exit codes (started successfully/failed/etc) in a 
readable format.
  9. User leaves Django website.

I wrote a simple Controller (MyController.py) that connects to the systemd 
interface of the dbus, to controllthe systemd services and listen for 
property changes, but also to read logfiles from the file system. I inteded 
MyController to run as root and sit between Django and dbus/systemd.

I would think WebSockets are the best solution to deal with the realtime 
log display in 3) and with the live interaction in 4) 5) 6) 7) and 8).
I recently read about Django Channels and I believe this would be the 
solution to Django<(WebSocket)->User.

But somehow Django needs to talk to my MyController.py daemon for starting 
and stopping, as well as getting the systemd exit codes across to the User 
in realtime.
I believe I cannot use xmlrpc, because that is a pure Request<->Response 
principle. But a live log is continuous, and if you start a service, that 
could take ten seconds and I really want to have quick response times. I 
also thought about background job management, but I prefer WebSockets over 
this, so I don't have to implement multiple technologies.

My question would be this: Could I somehow use Channels to connect 
MyController with Django and vice versa, similar to xmlrpc but so that both 
sides can send?

I am open for all ideas at this point, but I prefer to implement only one 
kind of technology if that would be possible.

Thanks in advance!

psaodwhatevermynameis.

-- 
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 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/4224be09-059f-42e5-8352-b3aad34bf5b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Can I use Django Channels to solve this architectural prolem?

2016-11-15 Thread Andrew Godwin
You could use channels (well, ASGI, it's lower-level interface) for the
interconnect:

 - Use channels for signals from the web service to the controller daemon
(maybe "service.stop" or "service.start" with the service name in the
message payload). You can trigger these from simple AJAX or GET views, no
need for websocket here.
 - Send the log continuously out to a Group as it's received, one group per
service. Then, when someone joins and wishes to tail the log, tie in their
socket to the group.

However, this does not supply log playback of lines before a client joins,
so you'd have to fill in that gap. In the end, you're probably looking at
some sort of datastore in the middle there to store logs and then replay
them into a socket as it joins.

Andrew

On Tue, Nov 15, 2016 at 2:27 PM,  wrote:

> Hi there,
>
> I want to develop a Django site where users have the possibility to
> interact with systemd services in realtime and to see the log output in
> realtime.
>
> I sketched up a quick draft on my idea how this could work:
> https://i.imgur.com/pd5uLtl.jpg
>
>
> One simplified use-case would be:
>
>   1. User visits Django website.
>   2. User chooses one of many systemd services. each service would be
> represented by a single webpage, eg. /services/id/1, /services/id/2...
>   3. User gets presented a realtime log, the source being either journald
> or lastlog-file on the file system.
>   4. User clicks on Stop button.
>   5. Service gets stopped.
>   6. User receives exit codes, etc. in a readable format.
>   7. User clicks on start button
>   8. User receives exit codes (started successfully/failed/etc) in a
> readable format.
>   9. User leaves Django website.
>
> I wrote a simple Controller (MyController.py) that connects to the systemd
> interface of the dbus, to controllthe systemd services and listen for
> property changes, but also to read logfiles from the file system. I inteded
> MyController to run as root and sit between Django and dbus/systemd.
>
> I would think WebSockets are the best solution to deal with the realtime
> log display in 3) and with the live interaction in 4) 5) 6) 7) and 8).
> I recently read about Django Channels and I believe this would be the
> solution to Django<(WebSocket)->User.
>
> But somehow Django needs to talk to my MyController.py daemon for starting
> and stopping, as well as getting the systemd exit codes across to the User
> in realtime.
> I believe I cannot use xmlrpc, because that is a pure Request<->Response
> principle. But a live log is continuous, and if you start a service, that
> could take ten seconds and I really want to have quick response times. I
> also thought about background job management, but I prefer WebSockets over
> this, so I don't have to implement multiple technologies.
>
> My question would be this: Could I somehow use Channels to connect
> MyController with Django and vice versa, similar to xmlrpc but so that both
> sides can send?
>
> I am open for all ideas at this point, but I prefer to implement only one
> kind of technology if that would be possible.
>
> Thanks in advance!
>
> psaodwhatevermynameis.
>
> --
> 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 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/4224be09-059f-42e5-8352-b3aad34bf5b7%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 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/CAFwN1uph7BpWtG95OsTuwKp0sr1Hw1fhdYMf8dKuuK3R9OP1jA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.