Zero Downtime Field Type Changes

2019-03-12 Thread 'Kyle Mulka' via Django users
Hi there,

Wondering if there's any tool out there to make a zero downtime field type 
change easier. I want to change a django model field from one type to 
another, and the format of the field in the database is slightly different.

I've come up with a process I think will work, but it will be rather 
tedious if done manually. Wondering if there's a more automated approach or 
other tools out there already. I'd like to come up with a general solution 
for use in the future, but right now trying to tackle converting UUIDField 
from django-extensions to the built in django version.
https://github.com/django-extensions/django-extensions/issues/647

I was thinking about maybe using a custom field that supports both types, 
but not exactly sure how to write a custom field that would do that.

If it helps, the manual process I'm thinking about kind of goes as follows:

# existing model:
class Model:
field = OldField()

# add field_old with OldField type
# when updating or adding rows start writing to both fields
# copy data from field to field_old
class Model:
field = OldField()
field_old = OldField()

# stop using field, only use field_old
# remove field
class Model:
field_old = OldField()

# create field with new type
# when updating or adding rows start writing to both fields in their 
respective formats
# copy data from field_old in old format to field in new format
class Model:
field = NewField()
field_old = OldField()

# stop using field_old
# remove field_old
class Model:
field = NewField()

Thanks for your help!

--
Kyle Mulka
http://www.kylemulka.com

-- 
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/b16ffdee-74d6-4ba2-ac1f-b5bd9cf1e40b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: hi guys i have been having trouble setting up a login and registration page, can anyone please help me

2019-03-12 Thread Siddharth Tamang
Can you be specific what errors you are getting?

On Tue, Mar 12, 2019 at 8:25 PM abhishek jayalal <
abhishekjayalal...@gmail.com> wrote:

>
> --
> 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/c070e2bd-a38a-47fa-9da6-8e6a2951955f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Thank you
Siddharth Tamang
AWS Certified Solutions Architect - Associate

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


p.bnRe: Hell.o mmmhFrom Nivggghjbygeria

2019-03-12 Thread Moh Rifqi Fitriansyah
Click download ya nabi yang mau buat sarapan dan ya Allah f e xx CV
vyyccn

Pada tanggal Rab, 13 Mar 2019 02.10, Eugène Ngontang 
menulis:

> Hello,
>
> My name is Eugene. I'm from Cameroon, being an SRE-SE Engineer and Linux
> expert as you can see here in my LinkedIn profile
> https://www.linkedin.com/in/nixmind/.
>
> I've founded leading a social movement I created since 2016, called Les
> Castors Du Numérique (I speak french and english, but live in France
> actually, and we are english and french guys in the association, from
> multiple countries).
> Here is the little site I built to juste let people know the vision
> (actually in french, but will totally rebuilt in english and french) : 
> *https://www.lescdn.com/
> *
>
> The aim is to provide Africa folks with a pure playground to play and
> practice tech, convivially.
> We are just starting concrete things/activities, cause I think big and
> want pragmatism in our actions, and we are building a collaborative
> expertise platform for the association.
> So if you guys are one involved in tech, wishing to acquire and/or share
> experience, expertise.. you can join us, without any protocol
>
> Our actual main project is to build a collaborative expertise platform as
> stated above, but before get there, I've created  an interactive slack
> workspace, where we can talk, have fun and emulate each other, and guys
> like would pretty stimulate the movement, and why not work together to
> build this platform???
>
> Here is the workspace url : *https://lescastorsdunumrique.slack.com
> *, but I need to send you
> invitation in your mailboxes...
>
> Thus dear geeks brothers/friends, do you allow me to invite you there, so
> that we can create a "*django-users"* chanel for django specific
> purposes, while you could still explore other channels to acquire/share
> more knowledge?
> If yes, please reply to me with your email addresses ...
>
> Let me know if you have any question, I'll be pleased to answer and having
> you join us for a pragmatic action and vision, with highest value.
>
> Thank you for your attention.
>
> Kind regards,
> Eugène NG
>
> Le mar. 12 mars 2019 à 19:27, Joshua Kayode  a
> écrit :
>
>> You are all welcome
>>
>> On Tue, Mar 12, 2019, 12:17 Emmanuel klutse >
>>> I’m from Ghana and will also love to join.
>>>
>>> On Tue, 12 Mar 2019 at 11:14 AM, Emmanuel Agu 
>>> wrote:
>>>
 Nice one, am in.

 On Monday, 11 March 2019 14:16:28 UTC+1, Joshua Kayode wrote:
>
> Greetings, if you are a django developer in Nigeria, would you
> consider joining a WhatsApp group?
>
 --
 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/5bddb9fe-2cc4-4ba7-b7eb-f0772ac88d86%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/CAAw18mAWp9Gd1rtg%2B%2BJ76YXPWHCpmrHY%2BWtFZ4V39mk5DbvRtA%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/CAEL9fCEubaRNQZDPkkh%2B4hcvO%3DRsfcHmj1eALGw9PMoX1HK_wg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>

Re: Django csv file

2019-03-12 Thread Chetan Ganji
I would suggest you use transactions for inserting those many documents.
https://www.mongodb.com/transactions

Django ORM does not support MongoDB. So, you can't use models/ORM/Class
Based Views of Django with mongo.
Only way I know to use Mongo with Django is function based views. There are
some third party MONGO ORMS for django, but I never used them so far, so
can't comment on how good they are or are not. Do your R and find it out
;-)

I hope this helps you. Cheers!


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


On Wed, Mar 13, 2019 at 12:42 AM Ryan Nowakowski 
wrote:

> If I were you, I'd work through the Django tutorial first. Then ask
> specific questions if you have any.
>
> On March 12, 2019 5:32:08 AM CDT, Cigi Sebastine 
> wrote:
>>
>>
>> Hi all
>>
>> I am trying to insert data from csv file to mongodb4 using python3.7
>> (Bulk data insertion 47lakhs records)
>> i need to implement in django
>> Can please anyone share ur idea
>>
>> import pandas as pd
>> import json
>>
>> mng_client = MongoClient('localhost', 27017)
>> mng_db = mng_client['testcsv']
>> collection_name = mng_db['datastore']
>> db_cm = mng_db['datastore']
>>
>> df = pd.read_csv('filepath',encoding = 'ISO-8859-1') # loading csv file
>> #dfstr = df.to_json('testjson1.json')
>> data_json = json.loads( df.to_json())
>> db_cm.insert_many(data_json)
>>
>> --
> 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/89E98305-6AEC-4A82-9839-E86760DC3AB2%40fattuba.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/CAMKMUjv%3DrU%3DNJxhd%2BHwpz40RrFB_Z2qP9Mq7q2SoXFys4HSO2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django csv file

2019-03-12 Thread Ryan Nowakowski
If I were you, I'd work through the Django tutorial first. Then ask specific 
questions if you have any.

On March 12, 2019 5:32:08 AM CDT, Cigi Sebastine  
wrote:
>Hi all
>
>I am trying to insert data from csv file to mongodb4 using python3.7
>(Bulk
>data insertion 47lakhs records)
>i need to implement in django
>Can please anyone share ur idea
>
>import pandas as pd
>import json
>
>mng_client = MongoClient('localhost', 27017)
>mng_db = mng_client['testcsv']
>collection_name = mng_db['datastore']
>db_cm = mng_db['datastore']
>
>df = pd.read_csv('filepath',encoding = 'ISO-8859-1') # loading csv file
>#dfstr = df.to_json('testjson1.json')
>data_json = json.loads( df.to_json())
>db_cm.insert_many(data_json)
>
>-- 
>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/CAAaRqFPj7izHMWU4kO5o5Azpar71bhoAwjZToObYvOMMMqh%3Dfw%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/89E98305-6AEC-4A82-9839-E86760DC3AB2%40fattuba.com.
For more options, visit https://groups.google.com/d/optout.


Re: Hello From Nigeria

2019-03-12 Thread Eugène Ngontang
Hello,

My name is Eugene. I'm from Cameroon, being an SRE-SE Engineer and Linux
expert as you can see here in my LinkedIn profile
https://www.linkedin.com/in/nixmind/.

I've founded leading a social movement I created since 2016, called Les
Castors Du Numérique (I speak french and english, but live in France
actually, and we are english and french guys in the association, from
multiple countries).
Here is the little site I built to juste let people know the vision
(actually in french, but will totally rebuilt in english and french) :
*https://www.lescdn.com/
*

The aim is to provide Africa folks with a pure playground to play and
practice tech, convivially.
We are just starting concrete things/activities, cause I think big and want
pragmatism in our actions, and we are building a collaborative expertise
platform for the association.
So if you guys are one involved in tech, wishing to acquire and/or share
experience, expertise.. you can join us, without any protocol

Our actual main project is to build a collaborative expertise platform as
stated above, but before get there, I've created  an interactive slack
workspace, where we can talk, have fun and emulate each other, and guys
like would pretty stimulate the movement, and why not work together to
build this platform???

Here is the workspace url : *https://lescastorsdunumrique.slack.com
*, but I need to send you
invitation in your mailboxes...

Thus dear geeks brothers/friends, do you allow me to invite you there, so
that we can create a "*django-users"* chanel for django specific purposes,
while you could still explore other channels to acquire/share more
knowledge?
If yes, please reply to me with your email addresses ...

Let me know if you have any question, I'll be pleased to answer and having
you join us for a pragmatic action and vision, with highest value.

Thank you for your attention.

Kind regards,
Eugène NG

Le mar. 12 mars 2019 à 19:27, Joshua Kayode  a
écrit :

> You are all welcome
>
> On Tue, Mar 12, 2019, 12:17 Emmanuel klutse 
>> I’m from Ghana and will also love to join.
>>
>> On Tue, 12 Mar 2019 at 11:14 AM, Emmanuel Agu 
>> wrote:
>>
>>> Nice one, am in.
>>>
>>> On Monday, 11 March 2019 14:16:28 UTC+1, Joshua Kayode wrote:

 Greetings, if you are a django developer in Nigeria, would you consider
 joining a WhatsApp group?

>>> --
>>> 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/5bddb9fe-2cc4-4ba7-b7eb-f0772ac88d86%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/CAAw18mAWp9Gd1rtg%2B%2BJ76YXPWHCpmrHY%2BWtFZ4V39mk5DbvRtA%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/CAEL9fCEubaRNQZDPkkh%2B4hcvO%3DRsfcHmj1eALGw9PMoX1HK_wg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
LesCDN 
engont...@lescdn.com

*Aux hommes il faut un chef, et au*

* chef il faut des hommes!L'habit ne fait pas le moine, mais lorsqu'on te
voit on te juge!*

-- 
You received this message because you 

Re: Hello From Nigeria

2019-03-12 Thread Joshua Kayode
You are all welcome

On Tue, Mar 12, 2019, 12:17 Emmanuel klutse  I’m from Ghana and will also love to join.
>
> On Tue, 12 Mar 2019 at 11:14 AM, Emmanuel Agu 
> wrote:
>
>> Nice one, am in.
>>
>> On Monday, 11 March 2019 14:16:28 UTC+1, Joshua Kayode wrote:
>>>
>>> Greetings, if you are a django developer in Nigeria, would you consider
>>> joining a WhatsApp group?
>>>
>> --
>> 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/5bddb9fe-2cc4-4ba7-b7eb-f0772ac88d86%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/CAAw18mAWp9Gd1rtg%2B%2BJ76YXPWHCpmrHY%2BWtFZ4V39mk5DbvRtA%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/CAEL9fCEubaRNQZDPkkh%2B4hcvO%3DRsfcHmj1eALGw9PMoX1HK_wg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Link does not work correctly

2019-03-12 Thread Barkalez XX

Hi

You can see my code in:

https://github.com/barkalez/recetas

I have it like this:

Register

El domingo, 10 de marzo de 2019, 18:22:29 (UTC+1), Gil Obradors escribió:
>
> Hi
> I can't give you the exactly response,
>
> But I know that you are playing with href=url direct, without using django 
> template code
> I suggest you to change de href of register from about, to a href with 
> django template code:
> Something like : href="{% static 'greenfapp/main.css' %}
> But I can't see at urls.py from user app, so I don't know if user apps 
> register view has any name associociated to
>
> You must write something like href="{ url :'recetas-home' % }  ( nor 
> direct url)
>
>
> Good luck
>
>
> Missatge de Barkalez XX > del dia dg., 10 
> de març 2019 a les 15:28:
>
>>
>> In the browser, when I'm in "http://127.0.0.1:8000/; and click in 
>> register it takes me to "http://127.0.0.1:8000/register; and it works 
>> correctly, but if I'm in "http: //127.0.0.1:8000/about/ "and click on 
>> register takes me to" http://127.0.0.1:8000/about/register/ "instead of" 
>> http://127.0.0.1:8000/register " . My project : 
>> https://github.com/barkalez/recetas
>>
>> -- 
>> 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/f77b7e65-3e0c-4f29-b951-d052e669fe20%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/10a468fd-e48a-480a-9404-4f0bca6cc0f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


hi guys i have been having trouble setting up a login and registration page, can anyone please help me

2019-03-12 Thread abhishek jayalal


-- 
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/c070e2bd-a38a-47fa-9da6-8e6a2951955f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
"""
Django settings for my_project project.

Generated by 'django-admin startproject' using Django 2.1.5.

For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/

For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""

import os

# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '8iiq6iay()4szs3j&=le7px2fw%d)cy8b$)13$cm@=%@2*1ga+'

# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True

ALLOWED_HOSTS = []


# Application definition

INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'accounts.apps.AccountsConfig',
]

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',
]

ROOT_URLCONF = 'my_project.urls'

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

WSGI_APPLICATION = 'my_project.wsgi.application'


# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}


# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]


# Internationalization
# https://docs.djangoproject.com/en/2.1/topics/i18n/

LANGUAGE_CODE = 'en-us'

TIME_ZONE = 'UTC'

USE_I18N = True

USE_L10N = True

USE_TZ = True


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/

STATIC_URL = '/static/'
LOGIN_REDIRECT_URL = '/'

[no subject]

2019-03-12 Thread Devendra reddy
Hi to all

How to delete multiple objects(leads) using check boxes in jango
Please send me solution

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


Re: Error logging in to admin potal in Django 2.1.7

2019-03-12 Thread Suresh Kannan
Hi,

I am not sure this is an answer but it could be an issue with sqlite
version
https://stackoverflow.com/questions/53637182/django-no-such-table-main-auth-user-old


On Mon, 11 Mar 2019 at 07:14, Rishiraj Saxena  wrote:

> I am new to Django when I try to log in to Django using environment
> variables as the latest version of Django I am unable to log in to admin
> portal of Django with correct username and password that I created using
> "python manage.py createsuperuser". But when I try to do the same thing
> using Django 2.0.7 I am able to log in but then I  can not update the
> objects as i get the error No such table: main.auth_user__old. What should
> i do??
>
> --
> 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/3ea951ca-b65d-4446-9b70-efc66908e666%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/CANfVfcAjb_tYge0t6JMBEBgOcUoVNfu1AJcdr%2BkU_9vicX55dw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: What step am I missing?

2019-03-12 Thread Suresh Kannan
Hi,

You can watch these videos. I think this might help you.

https://www.youtube.com/watch?v=FNQxxpM1yOs (windows)

https://www.youtube.com/watch?v=oT1A1KKf0SI=PLxxA5z-8B2xk4szCgFmgonNcCboyNneMD
(linux)

On Mon, 11 Mar 2019 at 09:35, Joseph Jones  wrote:

> Thank you so much, does one bring up the cd command in the python terminal?
>
> On Mon, Mar 11, 2019 at 8:07 AM Kayode Oladipo 
> wrote:
>
>> You have to be in the project level directory to access 'manage.py'.
>> Use the 'cd' command in the terminal to do this.
>>
>> On Sun, Mar 10, 2019, 23:23 Joseph Jones >
>>> Hello all!
>>> I have been reading
>>> https://www.packtpub.com/application-development/learn-python-programming-second-edition
>>>  Since
>>> November, so I am very much new to the Python community. I am currently on
>>> chapter 14 "Web development" which suggests completing the tutorial on
>>> djangoproject.com after installing Django of course. When I've run the
>>> first two commands in the cmd of my PC I get the output the tutorial would
>>> indicate. However when I run the command .../> py manage.py runserver I
>>> receive a command error that no such file exists. My question is what
>>> mistake am I making? I'm hypothesizing one is to create a file entitled
>>> "manage.py' before beginning, however unless I'm misreading the text in the
>>> tutorial the command .../> django-admin startproject runserver
>>> auto-generates said file. Any suggestions on what I'm doing wrong would be
>>> immensely appreciated. Let me apologize in advance if I either, ask for
>>> clarification in any responses(again I am new), or mess up again through
>>> out the course of the tutorial and again reach out to the community. Thank
>>> you for any help,
>>> Joseph
>>>
>>> --
>>> 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/CAJGsC5OzcyMwrW%3D-EmU%2B-3o8esQ2JeVQoJScq%3DHy_mtsxKRuKQ%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/CA%2BARzD8BiTZ8Rzfi9twFF7GTzYpBZqpCdpR3K_tGW5b1Rfsdrw%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/CAJGsC5N2poHoALgwHLkk%3D9o9jGeUZ1NStedbnBS-oLdYgVzSQA%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/CANfVfcBvhtWwwuKEe95BhAkYzQjV2k1Am4pFvMSsf_8yZWg2MA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: add Image Field in model

2019-03-12 Thread omar ahmed
ok i will try it ... thank you

On Tuesday, March 12, 2019 at 3:24:04 PM UTC+2, Suresh Kannan wrote:
>
> Hi,
>
> https://stackoverflow.com/a/49867787/4037275 
>
> On Tue, 12 Mar 2019 at 09:20, omar ahmed > 
> wrote:
>
>> hello
>> i want to add image field in my model
>> i typed :
>>  image = models.ImageField()
>> but :
>>  Cannot use ImageField because Pillow is not installed
>>
>> -- 
>> 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/6101b636-925a-4f22-9637-13678d2ecaf0%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/c2a106ef-59e2-4199-9c44-55e5e9f01195%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: add Image Field in model

2019-03-12 Thread Suresh Kannan
Hi,

https://stackoverflow.com/a/49867787/4037275

On Tue, 12 Mar 2019 at 09:20, omar ahmed  wrote:

> hello
> i want to add image field in my model
> i typed :
>  image = models.ImageField()
> but :
>  Cannot use ImageField because Pillow is not installed
>
> --
> 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/6101b636-925a-4f22-9637-13678d2ecaf0%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/CANfVfcAv5-xEXJ7PZymST5a-GJCJqivYUBQO0DWaZ2kFrPQAAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fatal error

2019-03-12 Thread Suresh Kannan
Hi,

Perhaps this helps you

https://stackoverflow.com/questions/24627525/fatal-error-in-launcher-unable-to-create-process-using-c-program-files-x86

https://stackoverflow.com/questions/37220055/pip-fatal-error-in-launcher-unable-to-create-process-using/39733705

On Mon, 11 Mar 2019 at 12:04,  wrote:

> Hii all
> While I am creating django project I have getting this type of error Fatal
> error in launcher : Unable to create process using'"'
> I tried python -m pip install --upgrade pip
> Python -m pip install -U pip
> Python -m pip install virtualenv
>
> Can anybody please help me
>
> --
> 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/15d843bb-1b95-4a0d-ba7b-2e5023fd15d8%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/CANfVfcBucQvFicKAO2R92rWUK0Hw4sFnn%2BkvSFit5dBzj6WLkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


add Image Field in model

2019-03-12 Thread omar ahmed
hello
i want to add image field in my model
i typed :
 image = models.ImageField()
but :
 Cannot use ImageField because Pillow is not installed

-- 
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/6101b636-925a-4f22-9637-13678d2ecaf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: hiii to all

2019-03-12 Thread sahukara harish
thank you,
Gilbeesh Kosma




i will try this.

On Tue, Mar 12, 2019 at 2:04 AM Gilbeesh Kosma 
wrote:

> Welcome in world of  django, i think you must start with a Poll app.
> On Mar 12, 2019 2:02 AM, "sahukara harish" 
> wrote:
>
>> can any one suggest a simple django project to me.plz
>> i am fresher so it can help me to improve my technical knowledge.
>>
>> --
>> 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/CAJTXQ2PSJsaZHBLxRtPwGQ7wx9AGt61O95C4iym7Jz2X5GpPcA%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/CABV4%2BX5C-cJJVTYkQvG97XY7FD30SD_Xy%2BVqXeQz79yZw4AFeQ%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/CAJTXQ2NEpUVPNrYFcybH%2BRzF60D0r3SkeO4gTeWVdMm2YFVz%3Dg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Hello From Nigeria

2019-03-12 Thread Emmanuel klutse
I’m from Ghana and will also love to join.

On Tue, 12 Mar 2019 at 11:14 AM, Emmanuel Agu 
wrote:

> Nice one, am in.
>
> On Monday, 11 March 2019 14:16:28 UTC+1, Joshua Kayode wrote:
>>
>> Greetings, if you are a django developer in Nigeria, would you consider
>> joining a WhatsApp group?
>>
> --
> 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/5bddb9fe-2cc4-4ba7-b7eb-f0772ac88d86%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/CAAw18mAWp9Gd1rtg%2B%2BJ76YXPWHCpmrHY%2BWtFZ4V39mk5DbvRtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django csv file

2019-03-12 Thread Cigi Sebastine
Hi all

I am trying to insert data from csv file to mongodb4 using python3.7 (Bulk
data insertion 47lakhs records)
i need to implement in django
Can please anyone share ur idea

import pandas as pd
import json

mng_client = MongoClient('localhost', 27017)
mng_db = mng_client['testcsv']
collection_name = mng_db['datastore']
db_cm = mng_db['datastore']

df = pd.read_csv('filepath',encoding = 'ISO-8859-1') # loading csv file
#dfstr = df.to_json('testjson1.json')
data_json = json.loads( df.to_json())
db_cm.insert_many(data_json)

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


Re: Hello From Nigeria

2019-03-12 Thread Emmanuel Agu
Nice one, am in.

On Monday, 11 March 2019 14:16:28 UTC+1, Joshua Kayode wrote:
>
> Greetings, if you are a django developer in Nigeria, would you consider 
> joining a WhatsApp group?
>

-- 
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/5bddb9fe-2cc4-4ba7-b7eb-f0772ac88d86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Connection Reset by Peer

2019-03-12 Thread Jani Tiainen
That another server which is client to your app terminated connection for
some reason. That's most common cause.

ma 11. maalisk. 2019 klo 21.53 Alex Snyder 
kirjoitti:

> There's no browser involved. Just another server. If I manually post it
> works fine.
>
> On Monday, March 11, 2019 at 2:17:22 PM UTC-5, Jani Tiainen wrote:
>>
>> Hi.
>>
>> Usually error means that client (browser) terminated connection before
>> request was completely handled and returned to client.
>>
>>
>>
>>
>> ma 11. maalisk. 2019 klo 17.58 Alex Snyder 
>> kirjoitti:
>>
>>> Hello,
>>> I'm working on a webhook receiver and all was working fine the other
>>> day. Now I'm receiving connection reset by peer errors. The data being
>>> posted is getting received so and I can't figure out why it all of a sudden
>>> started giving errors.
>>>
>>> Could it be that connections are coming in too quickly? It didn't have a
>>> problem with it before.
>>>
>>> I'm getting the following:
>>> Exception happened during processing of request from ('redacted', 58812)
>>> Traceback (most recent call last):
>>>   File
>>> "/Users/myuser/anaconda3/envs/myenv/lib/python3.7/socketserver.py", line
>>> 650, in process_request_thread
>>> self.finish_request(request, client_address)
>>>   File
>>> "/Users/myuser/anaconda3/envs/myenv/lib/python3.7/socketserver.py", line
>>> 360, in finish_request
>>>
>>> self.RequestHandlerClass(request, client_address, self)
>>>   File
>>> "/Users/myuser/anaconda3/envs/myenv/lib/python3.7/socketserver.py", line
>>> 720, in __init__
>>> self.handle()
>>>   File
>>> "/Users/myuser/anaconda3/envs/myenv/lib/python3.7/site-packages/django/core/servers/basehttp.py",
>>> line 171, in han
>>> dle
>>> self.handle_one_request()
>>>   File
>>> "/Users/myuser/anaconda3/envs/myenv/lib/python3.7/site-packages/django/core/servers/basehttp.py",
>>> line 179, in han
>>> dle_one_request
>>> self.raw_requestline = self.rfile.readline(65537)
>>>   File "/Users/myuser/anaconda3/envs/myenv/lib/python3.7/socket.py",
>>> line 589, in readinto
>>> return self._sock.recv_into(b)
>>> ConnectionResetError: [Errno 54] Connection reset by peer
>>>
>>>
>>> My View
>>>
>>> @require_POST
>>> @csrf_exempt
>>> def computer_checkin(request):
>>> if request.method == 'POST':
>>> #ip = get_client_ip(request)
>>> print(request)
>>> #request_data = json.loads(request.body.decode("utf-8"))
>>> #print(ip)
>>> return HttpResponse(201)
>>> else:
>>> return HttpResponse(400)
>>> # if ip in allowed_ip:
>>> # #print(request_data['webhook']['webhookEvent'])
>>> # return HttpResponse('Pong')
>>> # else
>>> # return HttpResponseForbidden('Permissions denied')
>>>
>>>
>>> This is what the sending server gives for an error:
>>> Exception while trying to post event to
>>> http://redacted:8000/webhooks/ComputerCheckIn - I/O error on POST
>>> request for "http://redacted:8000/webhooks/ComputerCheckIn":Connect to
>>> redacted:8000 [/redacted] failed: connect timed out; nested exception is
>>> org.apache.http.conn.ConnectTimeoutException: Connect to redacted:8000
>>> [/redacted] failed: connect timed out
>>>
>>>
>>> --
>>> 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/343df769-44f3-4316-882e-a701280b358a%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/12b526ed-da4c-4473-b813-7bbb2c787dfb%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