Re: Creating Objects from Annotations and Other Models

2019-03-20 Thread Derek
Permanently storing data that can be recalculated from existing data is a 
practice specific to the needs of particular applications.  

Have you perhaps considered making use of the "view" table functionality 
available in most databases?

For example, in PostgreSQL you can create a materialized view which "caches 
the result of a complex expensive query and then allow you to refresh this 
result periodically." - 
see http://www.postgresqltutorial.com/postgresql-materialized-views/


On Tuesday, 19 March 2019 17:34:11 UTC+2, Dylan Young wrote:
>
> 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/a1c55adc-c5fa-465c-8740-3a741bc22686%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-20 Thread Derek
If I had to do something like this right now I would probably look at:
* https://bossanova.uk/jexcel/examples/tracking-changes-on-the-spreadsheet 
, 
* plus the javascript needed to handle the front-end GET/POST requests 
(MANY examples on the web) when data changes, 
* along with Django DRF on the back-end to handle the server side data 
generation and database updates.

Please don't keep asking "how" and rather start with your own development.  

On Wednesday, 20 March 2019 21:57:21 UTC+2, Chetan Ganji wrote:
>
> Hi Sankar,
>
> Derek is right, we can only give you suggestions as we are far away from 
> you. How is really upto YOU.
> What you are trying to achieve is basically a front end task. You only 
> have knowledge of django which is a backend technology. 
>
> You have many options to make choice from - 
> 1. You have to learn to use jquery to do it the way you want it. 
> 2. Use the default UpdateView from django where EDIT/UPDATE view will be 
> shown separately. i.e. let go of inline editing feature.
> 3. Find someone who will code it for you. 
> 4. Any other that you can think of.
>
> Happy Coding :) 
>
>
> Regards,
> Chetan Ganji
> +91-900-483-4183
> ganji@gmail.com 
> http://ryucoder.in
>
>
> On Wed, Mar 20, 2019 at 11:58 AM VeeraNagaRaja Sankar  > wrote:
>
>> hi,
>>
>> means, i am only aware of Django so i need any code reference to do that
>>  thank you,
>>
>> Best Regards,
>> Inti VeeraNagaRaja Sankar,M.Tech(IT)
>> M: 9985864383
>> intis...@gmail.com 
>> https://about.me/veeranagarajasankar
>>
>>
>> On Wed, Mar 20, 2019 at 11:55 AM Derek > 
>> wrote:
>>
>>> That is not an answerable question.  We have given you suggestions - the 
>>> "how" is up to you.
>>>
>>> On Tuesday, 19 March 2019 09:36:27 UTC+2, veera nagaraja sankar Inti 
>>> wrote:


 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...@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/562202e8-53a3-44d2-b0aa-ba710e180787%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...@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/CAJFTHQa_6OGseZ8TwrniWrUNDM%2BkN8a%3DChBFrF7j4XRysARaLw%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/970120eb-6250-4645-87c7-e405c6a02686%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


log out a user when user closes tab or browser

2019-03-20 Thread Sam W
Is there a way in Django to log out a user when user closes tab or browser? 
This one "SESSION_EXPIRE_AT_BROWSER_CLOSE =True" Doesn't work 

-- 
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/644cca74-0443-4c71-8d8e-7326a252eb2e%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-20 Thread Chetan Ganji
Hi Sankar,

Derek is right, we can only give you suggestions as we are far away from
you. How is really upto YOU.
What you are trying to achieve is basically a front end task. You only have
knowledge of django which is a backend technology.

You have many options to make choice from -
1. You have to learn to use jquery to do it the way you want it.
2. Use the default UpdateView from django where EDIT/UPDATE view will be
shown separately. i.e. let go of inline editing feature.
3. Find someone who will code it for you.
4. Any other that you can think of.

Happy Coding :)


Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Wed, Mar 20, 2019 at 11:58 AM VeeraNagaRaja Sankar 
wrote:

> hi,
>
> means, i am only aware of Django so i need any code reference to do that
>  thank you,
>
> Best Regards,
> Inti VeeraNagaRaja Sankar,M.Tech(IT)
> M: 9985864383
> intisank...@gmail.com 
> https://about.me/veeranagarajasankar
>
>
> On Wed, Mar 20, 2019 at 11:55 AM Derek  wrote:
>
>> That is not an answerable question.  We have given you suggestions - the
>> "how" is up to you.
>>
>> On Tuesday, 19 March 2019 09:36:27 UTC+2, veera nagaraja sankar Inti
>> wrote:
>>>
>>>
>>> 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/562202e8-53a3-44d2-b0aa-ba710e180787%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/CAJFTHQa_6OGseZ8TwrniWrUNDM%2BkN8a%3DChBFrF7j4XRysARaLw%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/CAMKMUjuhQ56%3DEurstUPVqxOXv3u%2Bj3VSaggTOkOAx_u95CJ3%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Crispy: Helper Layout has no effect on form.

2019-03-20 Thread Mohammad Etemaddar
Here is my model form which is rendered by crispy.
When I change the layout, ordering, or adding elements, has no effect on 
rendered form.

Do you see any problem in the code?

Thank you


class FactoryForm(forms.ModelForm):
class Meta:
model = Factory
fields = ('name','field', 'description', 'manager','province','city',
'address','phone_number','logo')

province = forms.ModelChoiceField(queryset=Province.objects.all())

def __init__(self, *args, **kwargs):
super(FactoryForm, self).__init__(*args, **kwargs)

self.helper = FormHelper(self)
self.helper.form_tag = False
self.helper.disable_csrf = True

self.helper.layout = Layout(
Fieldset(
'Legend',
'name', 'field', 'description', 'manager', 'province', 'city', 'address', 
'phone_number',
HTML(""),
'logo',
)
)

if self.instance.name:
self.fields['province'].initial = self.instance.city.province
self.fields['city'].queryset = City.objects.filter(province=self
.instance.city.province)

-- 
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/4962a495-c0d3-4164-b0ee-4978a74ade8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to create a fixed-length binary field with a unique constraint?

2019-03-20 Thread Anubhav Gupta
Hi,

My use case is exactly similar to this with one additional condition that I 
want this column to serve as Primary Key of my table. Now when I use the 
following code:

class BinaryTable(models.Model):
binary_hash = models.BinaryField(primary_key=True)
comments = models.CharField(max_length=70)

class Meta:
db_table = 'binary_table'
   
I get the error code (1170, "BLOB/TEXT column 'binary_hash' used in key 
specification without a key length")
The behaviour is same if I specify unique=True instead of primary_key=True.

Now, one workaround is that from SHA256Field we return "BINARY(32) PRIMARY 
KEY"
The problem with this is that django sees no primary_key=True column while 
parsing the model declaration and assigns an automatic primary key and then 
raises the error that there are 2 primary keys. Any ideas how I can achieve 
primary key constraint on this custom field?

On Thursday, 13 July 2017 22:04:49 UTC+5:30, winke...@hornetsecurity.com 
wrote:
>
> On Thursday, July 13, 2017 at 4:06:38 PM UTC+2, Tom Evans wrote:
>  [...]
>
>> Guido: 
>>
>> You can make your own custom database types quite simply (completely 
>> untested): 
>>
>> class FixedSizedBinaryField(models.BinaryField): 
>>   def __init__(self, num_bytes=None, *args, **kwargs): 
>> self.nbytes = num_bytes 
>> super(FixedSizedBinaryField, self).__init__(*args, **kwargs) 
>>
>>   def deconstruct(self): 
>> name, path, args, kwargs = super(FixedSizedBinaryField, 
>> self).deconstruct() 
>> kwargs[''num_bytes'] = self.nbytes 
>> return name, path, args, kwargs 
>>
>>   def db_type(self, connection): 
>> return "binary(%d)" % self.nbytes 
>>
>> For more details, check out the docs on custom fields: 
>>
>> https://docs.djangoproject.com/en/1.11/howto/custom-model-fields/ 
>>
>
> Thanks for the suggestion. I am now working with this custom field class 
> (I actually found the relevant documentation and the solution myself in the 
> meantime. It's almost identical to yours, except without a configurable 
> length):
>
> class SHA256Field(models.BinaryField):
> def __init__(self, *args, **kwargs):
> kwargs['max_length'] = 32
> super(SHA256Field, self).__init__(*args, **kwargs)
>
> def deconstruct(self):
> name, path, args, kwargs = super(SHA256Field, self).deconstruct()
> del kwargs["max_length"]
> return name, path, args, kwargs
>
> def db_type(self, connection):
> return "BINARY(32)"
>
> This works very well for me - in MySQL/MariaDB. I haven't tested it with 
> any other database systems.
>
> Regards,
>
> Guido
>  
>
>

-- 
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/c817b490-8795-47c1-9146-f952b853f57c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


error passing int values from browser to path

2019-03-20 Thread charan . j . tej
iam oassing an interger valu from browser to the path using but 
it is  showing as an error not an intege
Environment:


Request Method: GET
Request URL: http://localhost:8000/hello/2

Django Version: 2.1.7
Python Version: 3.7.2
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback:

File "C:\Users\sai charan 
tej\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\exception.py"
 
in inner
  34. response = get_response(request)

File "C:\Users\sai charan 
tej\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\base.py"
 
in _get_response
  126. response = self.process_exception_by_middleware(e, 
request)

File "C:\Users\sai charan 
tej\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\handlers\base.py"
 
in _get_response
  124. response = wrapped_callback(request, *callback_args, 
**callback_kwargs)

Exception Type: TypeError at /hello/2
Exception Value: hello() got an unexpected keyword argument 'int'
r

-- 
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/8ae35e9d-5e8d-4d5a-b386-935ab6af0753%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How To Use PostgreSQL with your Django on Ubuntu

2019-03-20 Thread VeeraNagaRaja Sankar
hi Nasim,

this is config setting to use the Postgres DB instead of using SQLite in
Django
Best Regards,
Inti VeeraNagaRaja Sankar,M.Tech(IT)
M: 9985864383
intisank...@gmail.com 
https://about.me/veeranagarajasankar


On Wed, Mar 20, 2019 at 5:56 PM Nasim TKP  wrote:

> What is this will you explain in detail please
>
> On Wed, 20 Mar 2019, 2:50 pm omar ahmed,  wrote:
>
>> done ... it works thank you veera
>>
>> On Tuesday, March 19, 2019 at 3:32:31 PM UTC+2, veera nagaraja sankar
>> Inti wrote:
>>>
>>> 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
>>> intis...@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...@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/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/5598e6c4-e2fe-4e1d-bd4f-31cc7e18e1e2%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/CAAVzVZXPFPjojKUNYybzx-wqLRznBbA-iqZsz3wuyt0cwFGjuA%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 grou

Re: How To Use PostgreSQL with your Django on Ubuntu

2019-03-20 Thread Nasim TKP
What is this will you explain in detail please

On Wed, 20 Mar 2019, 2:50 pm omar ahmed,  wrote:

> done ... it works thank you veera
>
> On Tuesday, March 19, 2019 at 3:32:31 PM UTC+2, veera nagaraja sankar Inti
> wrote:
>>
>> 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
>> intis...@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...@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/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/5598e6c4-e2fe-4e1d-bd4f-31cc7e18e1e2%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/CAAVzVZXPFPjojKUNYybzx-wqLRznBbA-iqZsz3wuyt0cwFGjuA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: ML-Python

2019-03-20 Thread UNIQ technologies
Use model_selection it will work sklearn.model_selection
On Mar 20, 2019 2:46 PM, "'Amitesh Sahay' via Django users" <
django-users@googlegroups.com> wrote:

> This forum is to provide help on Django related queries. Kindly refrain
> asking un-related topics.
>
> Regards,
> Amitesh Sahay
>
>
> On Wednesday, 13 March, 2019, 9:05:08 pm IST, Utpal Mishra <
> utpalmishr...@gmail.com> wrote:
>
>
> You have to use "model_selection", it will work. Quite a while ago
> "cross_validation" has been replaced by" model_selection".
> For reference you can go through my code: https://colab.research.
> google.com/drive/1NliqtxZVvLhZNXhNFyXQZpwG392hcvh4
> Do inform, in any case.
>
> On Wed, Mar 13, 2019 at 5:14 PM Hafit Omar  wrote:
>
> Hi Everyone I'm Hafit from Libya,
> Can anyone help me in in sklearn library I want to import cross_validation
> it doesn't work but the other like preprocessing and svm it does, please
> it's urgent,
> Thank you 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+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/CAP%3DccR57ZTOvdw8EUSozSOGvK2%
> 2BzZJb6q3ocoAA%2B9Rk4FJjTbA%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/CAObFs%3DeC593qwhgFx30g6uqsyenhoq5Sru
> 6F7SA0%3DLQY5pinXQ%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/1857506389.7576125.1553073317294%40mail.yahoo.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/CACR8Nam-kn5Nngzrf3YybQv9pu%3Dv4gz_ikqCb7FspaO6C%2Bzh0Q%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-20 Thread omar ahmed
done ... it works thank you veera

On Tuesday, March 19, 2019 at 3:32:31 PM UTC+2, veera nagaraja sankar Inti 
wrote:
>
> 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
> intis...@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...@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/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/5598e6c4-e2fe-4e1d-bd4f-31cc7e18e1e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ML-Python

2019-03-20 Thread Emeka Boris ama
Are u using notebook or Editor?

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


Re: ML-Python

2019-03-20 Thread 'Amitesh Sahay' via Django users
This forum is to provide help on Django related queries. Kindly refrain asking 
un-related topics.


Regards,
Amitesh Sahay 

On Wednesday, 13 March, 2019, 9:05:08 pm IST, Utpal Mishra 
 wrote:  
 
 You have to use "model_selection", it will work. Quite a while ago 
"cross_validation" has been replaced by" model_selection".For reference you can 
go through my code: 
https://colab.research.google.com/drive/1NliqtxZVvLhZNXhNFyXQZpwG392hcvh4Do 
inform, in any case.
On Wed, Mar 13, 2019 at 5:14 PM Hafit Omar  wrote:

Hi Everyone I'm Hafit from Libya,Can anyone help me in in sklearn library I 
want to import cross_validation it doesn't work but the other like 
preprocessing and svm it does, please it's urgent,Thank you 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+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/CAP%3DccR57ZTOvdw8EUSozSOGvK2%2BzZJb6q3ocoAA%2B9Rk4FJjTbA%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/CAObFs%3DeC593qwhgFx30g6uqsyenhoq5Sru6F7SA0%3DLQY5pinXQ%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/1857506389.7576125.1553073317294%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.