Re: Why use CustomUserManager.create_user and not CustomUserManager.create?

2019-03-19 Thread Vinicius Assef
Also, there's the create_superuser() method.

On Fri, 15 Mar 2019 at 01:48, Peter of the Norse  wrote:

> The biggest difference is that when you call create_user, it creates a
> hash of the password.  Eventually, create_user does call create, but only
> after setting all the values properly.
>
> Sent from my iPad
>
> On Feb 17, 2019, at 4:30 AM, Maarten Nieber  wrote:
>
> Hi,
>
> the Django guidelines tell us to implement CustomUserManager.create_user.
> However, this seems to introduce some ambiguity between
> CustomUserManager.create_user and CustomUserManager.create, since both
> these methods can be expected to create a User. In fact,
> it would be easy to accidentically call the wrong method from source code.
>
> Is there any reason why the create_user function exists at all? Why
> doesn't Django tell us to override CustomUserManager.create?
>
> Or alternatively, I could imagine that Django could have a hook function
> that is called by CustomUserManager.create, where the hook can be used
> to implemented custom behaviour (so that at least we have only 1 function
> to create users). Would this be a better design? Or is the current
> design the correct one, and am I missing something? (in that case, please
> elaborate)
>
> Best regards,
> Maarten
>
>
> --
> 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/b934b1a4-a295-4e83-be9c-b787785e5fc6%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/E560F7DD-84E1-485F-92E4-D89E9240188D%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/CAFmXjSAdttiALjucO2OiSZX54GJOVQ4VvZQ3pX4yKDEgzsm46g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Creating Objects from Annotations and Other Models

2019-03-19 Thread Dylan Young
Hey all:

I often find myself fetching data from models in the database only to run a 
few trivial calculations and store the info in a different model.

Is there an established ORM pattern for directly creating objects in the DB 
based on the fields of other models?

Sorry if this is obvious, but I couldn't find much on this in my web 
searching. 


Best,

Casey 

-- 
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/c0eab0fc-d9f5-42cf-8c4d-28ebf8add1ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How To Use PostgreSQL with your Django on Ubuntu

2019-03-19 Thread VeeraNagaRaja Sankar
first need to install postgresql_psycopg2 driver

create postgres user (merudan)

# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'django',
# 'USER': 'merudan',
# 'PASSWORD': 'merudan',
# 'HOST': 'localhost',
# 'PORT': '5432',
# }
# }
Best Regards,
Inti VeeraNagaRaja Sankar,M.Tech(IT)
M: 9985864383
intisank...@gmail.com


On Tue, Mar 19, 2019 at 6:28 PM omar ahmed  wrote:

> ok what about old projects
> only install postgresql and change db settings
>
> On Tuesday, March 19, 2019 at 2:42:02 PM UTC+2, Jani Tiainen wrote:
>>
>> Install Postgre, setup django, change db settings to match your Postgre
>> db and user credentials. Start migrations.
>>
>>
>> On Tue, Mar 19, 2019 at 2:35 PM omar ahmed  wrote:
>>
>>> hello  ..
>>> how can i  Use PostgreSQL with your Django on Ubuntu
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To post to this group, send email to django...@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/3e795828-7560-4ffb-a7b2-f7a55d8db00d%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Jani Tiainen
>> Software wizard
>>
>> https://blog.jani.tiainen.cc/
>>
>> Always open for short term jobs or contracts to work with Django.
>>
> --
> 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/9dff6db3-2cb9-4d32-b13c-cb5562c645cc%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/CAJFTHQbMDkogPrN9zfyKsE66bB9LGknY6_hVvPY6cVw-tatmOQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How To Use PostgreSQL with your Django on Ubuntu

2019-03-19 Thread omar ahmed
ok what about old projects 
only install postgresql and change db settings

On Tuesday, March 19, 2019 at 2:42:02 PM UTC+2, Jani Tiainen wrote:
>
> Install Postgre, setup django, change db settings to match your Postgre db 
> and user credentials. Start migrations.
>
>
> On Tue, Mar 19, 2019 at 2:35 PM omar ahmed  > wrote:
>
>> hello  ..
>> how can i  Use PostgreSQL with your Django on Ubuntu
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/3e795828-7560-4ffb-a7b2-f7a55d8db00d%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Jani Tiainen
> Software wizard
>
> https://blog.jani.tiainen.cc/
>
> Always open for short term jobs or contracts to work with Django.
>

-- 
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/9dff6db3-2cb9-4d32-b13c-cb5562c645cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How To Use PostgreSQL with your Django on Ubuntu

2019-03-19 Thread Jani Tiainen
Install Postgre, setup django, change db settings to match your Postgre db
and user credentials. Start migrations.


On Tue, Mar 19, 2019 at 2:35 PM omar ahmed  wrote:

> hello  ..
> how can i  Use PostgreSQL with your Django on Ubuntu
>
> --
> 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/3e795828-7560-4ffb-a7b2-f7a55d8db00d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Jani Tiainen
Software wizard

https://blog.jani.tiainen.cc/

Always open for short term jobs or contracts to work with Django.

-- 
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/CAHn91odgj6g5%3DumpXDEih8PfvQHt%3DJ3bgK-JYSAS51fDg-aW8Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How To Use PostgreSQL with your Django on Ubuntu

2019-03-19 Thread omar ahmed
hello  ..
how can i  Use PostgreSQL with your Django on Ubuntu

-- 
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/3e795828-7560-4ffb-a7b2-f7a55d8db00d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


django-multimedia

2019-03-19 Thread Jose Echenique
Play video from django app inside the html and by hdmi simultaneously in a
raspberry pi, do you recommend django-multimedia?

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


Re: Request & Response >> Device send HTTP request to web server

2019-03-19 Thread Sabuhi Shukurov
I was wondering if you have pdf version I have been looking but 
unfortunately not found the one free .

On Tuesday, 19 March 2019 03:05:42 UTC+4, Mohan Goud wrote:
>
> Unit 9 of IoT by Vijay madisetti is completely related to that
>
> On Tue 19 Mar, 2019, 2:43 AM Sabuhi Shukurov   wrote:
>
>> Hello!
>>
>> I need your help and assistance in my project. Currently we are 
>> developing project on   the device, which is on arduino written on C low 
>> level, it is really difficult to handle do many things, we want to keep it 
>> as simple as we can, everything will rely on to the our web app(Django). 
>> device suppose to send request in each minute and get response to each 
>> request. data comes in each minuet as str, we need to parse the data and 
>> send response to take actions. Is there any example of it?  or anything 
>> would help me to work on this project? I would definitely appreciate your 
>> help. Thanks in advance!
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/f38ff183-bcc0-4d45-a5d2-be10633af021%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/02a97ae2-0273-47cc-a451-09abb4aba5a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Request & Response >> Device send HTTP request to web server

2019-03-19 Thread Sabuhi Shukurov
thank you! you let me find the book


On Tuesday, 19 March 2019 03:05:42 UTC+4, Mohan Goud wrote:
>
> Unit 9 of IoT by Vijay madisetti is completely related to that
>
> On Tue 19 Mar, 2019, 2:43 AM Sabuhi Shukurov   wrote:
>
>> Hello!
>>
>> I need your help and assistance in my project. Currently we are 
>> developing project on   the device, which is on arduino written on C low 
>> level, it is really difficult to handle do many things, we want to keep it 
>> as simple as we can, everything will rely on to the our web app(Django). 
>> device suppose to send request in each minute and get response to each 
>> request. data comes in each minuet as str, we need to parse the data and 
>> send response to take actions. Is there any example of it?  or anything 
>> would help me to work on this project? I would definitely appreciate your 
>> help. Thanks in advance!
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/f38ff183-bcc0-4d45-a5d2-be10633af021%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/537b59a5-8d08-4119-86c8-953664531c10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


select table rows in Django

2019-03-19 Thread veera nagaraja sankar Inti
check box filed is not selected in the Django template

-- 
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/e03ee093-fd1e-4d3b-a162-cbf924b65b76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is there any inline editing the data and delete data in table in Django?

2019-03-19 Thread veera nagaraja sankar Inti

how ?

On Monday, March 4, 2019 at 12:40:03 PM UTC+5:30, Derek wrote:
>
> Grid / tabular editing outside of the admin is tricky; I have not been 
> able to manage it and have not found a good app for it.
>
> Here are some suggested reading:
>
> * https://www.ibm.com/developerworks/library/wa-django/index.html
> * https://bossanova.uk/jexcel 
> * 
> https://medium.com/ag-grid/building-a-crud-application-with-ag-grid-part-4-3189034df922
>
> You'd also need an app like Django REST Framework to handle GET/POST of 
> JSON data to populate your grid.
>
> On Wednesday, 27 February 2019 20:39:04 UTC+2, veera nagaraja sankar Inti 
> wrote:
>>
>> need help friends ?..
>>
>> thq..
>>
>

-- 
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/daa68276-96fa-4cfb-98ed-52db00df4727%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.