Re: unable Integrating Djongo 1.3.1 with django 2.2.10

2020-03-20 Thread Sam Chaffy
Install pymongo package by > pip install pymongo


or, better practice

make a virtual environment directory where all your dependencies will be 
installed.


> python -m venv  myvenv (assuming you name it myvenv)

If you are in Windows 

activate virtual environment with:

> cd in directory where you created virtual environment

> myvenv\Scripts\activate

Make sure you have pip installed

> pip install pymongo

then you won't have this error. 


On Thursday, March 19, 2020 at 1:35:52 PM UTC-7, Eswar Subramanyam wrote:
>
> Hi 
>
> I opted for Djongo to take advantage of Django ORM with MongoDB..
>
> but while starting the server, i get the following error
>
> AppData\Roaming\Python\Python38\site-packages\django\db\utils.py", line 
> 121, in load_backend
> raise ImproperlyConfigured(
> django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available 
> database backend.
> Try using 'django.db.backends.XXX', where XXX is one of:
> 'mysql', 'oracle', 'postgresql', 'sqlite3'
>
>
> I have lost a lot of time trying to figure out, and came to a conclusion 
> that i cant use ORM on Mongo DB.
>
> Have someone got a clue on what going wrong ?
>
> I dump also all the installed packages
>
> Thanks for your help/
>
> Package   Version
> - --
> asgiref   3.2.5
> bson  0.5.8
> certifi   2019.11.28
> chardet   3.0.4
> dataclasses   0.6
> Django2.2.11
> django-menu-generator 1.0.4
> djongo1.3.1
> idna  2.9
> mongoengine   0.19.1
> pip   20.0.2
> pymango   0.1.1
> pymongo   3.10.1
> python-dateutil   2.8.1
> pytz  2019.3
> requests  2.23.0
> setuptools41.2.0
> six   1.14.0
> sqlparse  0.2.4
> urllib3   1.25.8
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c6142786-1e5e-4230-b6f7-4607035cb3b6%40googlegroups.com.


need connection string help to connect to Db Postgresql

2020-03-20 Thread Juan J . Moreno Piña
I am not able to connect Postgresql , due to miss connectio string. also 
filling DB confi table:
Engine=""
Name=""
User
pass
Host: ?
Database_port: ?

thanks

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a88c4566-ee7a-481b-ab8c-55222840e399%40googlegroups.com.


Re: Inability to Connect django with MySQL database

2020-03-20 Thread Luis Zárate
This looks like your Mysql user can login without password in localhost
(are you sure, your user has correct permissions?).
Try to create a user with password and allow login from localhost, and
change your django settings, also try to connect with your user with mysql
client from localhost.



El vie., 20 mar. 2020 a las 14:55, Victor ()
escribió:

> What's the database variable in your settings.py file
>
> On Friday, March 20, 2020 at 2:54:05 PM UTC+1, Ifeanyi Chielo wrote:
>>
>> Hello,
>> I am new to Python django, I have been making efforts to connect a django
>> application to mysql without success. Bellow is the information that I got
>> PS C:\Users\IFEANYI CHIELO\divine> python manage.py migrate
>> Traceback (most recent call last):
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>> line 216, in ensure_connection
>> self.connect()
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>> line 194, in connect
>> self.connection = self.get_new_connection(conn_params)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\base.py",
>> line 227, in get_new_connection
>> return Database.connect(**conn_params)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\__init__.py",
>> line 84, in Connect
>> return Connection(*args, **kwargs)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\connections.py",
>> line 179, in __init__
>> super(Connection, self).__init__(*args, **kwargs2)
>> MySQLdb._exceptions.OperationalError: (1045, "Access denied for user
>> 'admin'@'localhost' (using password: NO)")
>>
>> The above exception was the direct cause of the following exception:
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 15, in 
>> execute_from_command_line(sys.argv)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
>> line 381, in execute_from_command_line
>> utility.execute()
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
>> line 375, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
>> line 316, in run_from_argv
>> self.execute(*args, **cmd_options)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
>> line 350, in execute
>> self.check()
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
>> line 379, in check
>> include_deployment_checks=include_deployment_checks,
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\migrate.py",
>> line 59, in _run_checks
>> issues = run_checks(tags=[Tags.database])
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\registry.py",
>> line 71, in run_checks
>> new_errors = check(app_configs=app_configs)
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\database.py",
>> line 10, in check_database_backends
>> issues.extend(conn.validation.check(**kwargs))
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\validation.py",
>> line 9, in check
>> issues.extend(self._check_sql_mode(**kwargs))
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\validation.py",
>> line 13, in _check_sql_mode
>> with self.connection.cursor() as cursor:
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>> line 255, in cursor
>> return self._cursor()
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>> line 232, in _cursor
>> self.ensure_connection()
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>> line 216, in ensure_connection
>> self.connect()
>>   File "C:\Users\IFEANYI
>> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py",
>> line 89, in __exit__
>> raise dj_exc_value.with_traceback(traceback) from exc_value
>>   File "C:\Users\IFEANYI
>> 

Re: Django IRC...Is it Active?

2020-03-20 Thread Matthew Leung
Thanks Nick!

On Friday, March 20, 2020 at 8:12:41 AM UTC-7, Nick Sarbicki wrote:
>
> If you are just looking for help the #django channel on the python 
> developers slack workspace (pyslackers.com) is pretty active.
>
> Full disclosure - I'm an admin of the slack workspace.
>
> - Nick
>
>
> On Fri, Mar 20, 2020 at 2:14 PM Andréas Kühne  > wrote:
>
>> Currently the django project recommends using the forums:
>>
>> forum.djangoproject.com
>>
>> Regards,
>>
>> Andréas
>>
>>
>> Den fre 20 mars 2020 kl 14:59 skrev Shishir Jha > >:
>>
>>> Yes I also want to ask for django official discord server
>>>
>>> On Fri, Mar 20, 2020 at 7:23 PM B.Ramburn >> > wrote:
>>>
 we could use a discord server?

 Regards,


 B.Ramburn BSc LLM#
 Snr. Quantity Surveyor


 On Fri, 20 Mar 2020 at 12:04, Matthew Leung >>> > wrote:

> I tried it...there is nobody in there :(
>
> -- 
> 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...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.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...@googlegroups.com .
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/CAKhymb3eu_Gzsm_DD5FOXdPT0qjhez8rZTfe6KRb38uZ6bVnOw%40mail.gmail.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...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CA%2BC7wFQ7gBapjT%3DBqvptvGra8K5r3PFHXeP9hgC94T1eKuAd9A%40mail.gmail.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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAK4qSCdGvwcZoh3AwXY9mucudQwgNxWzqU%2BPDz4Oe%3D74qELmoA%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f1379ebc-b966-4d65-8aa7-3339e702e2f3%40googlegroups.com.


Re: How to run django app on a private network

2020-03-20 Thread Ing.Daniel Bojorge
Deploy it the same, just make sure the devices have access to the server
where you have it deployed.

I you want some help to deploy and read spanish, here this tutorial
http://debsconsultores.blogspot.com/2018/12/deploy-django-21-en-ubuntu-server-1804.html




Dios L@s Bendiga

Saludos,



[image: --]

daniel.bojorge
[image: http://]about.me/daniel.bojorge

 [image: snake]*Curso Desarrollo Web con Python usando Django 2.2 Para
Principiantes con Descuento 95%    *[image:
snake]
*WebService RestFul API con Python usando Django RestFrameWork*

*Fácil Replicación de Cualquier Base de Datos y/o Sistema Operativo*

*Programación en Capas (Web y Escritorio)* 
Mi Blog 
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)




El vie., 20 mar. 2020 a las 14:47, Victor ()
escribió:

> Hello guys, how do i run a django app on my network so i can access it
> from other devices on that network? Thank you
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/d1384c20-fa48-413d-a514-6d9ff45757a5%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMQeQjaCBivXvFvmLvdZ2j%2BZh%2B-d%3Da5VsfLKdgPypXUw1ZGE8Q%40mail.gmail.com.


Re: Inability to Connect django with MySQL database

2020-03-20 Thread Victor
What's the database variable in your settings.py file

On Friday, March 20, 2020 at 2:54:05 PM UTC+1, Ifeanyi Chielo wrote:
>
> Hello, 
> I am new to Python django, I have been making efforts to connect a django 
> application to mysql without success. Bellow is the information that I got
> PS C:\Users\IFEANYI CHIELO\divine> python manage.py migrate
> Traceback (most recent call last):
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 216, in ensure_connection
> self.connect()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 194, in connect
> self.connection = self.get_new_connection(conn_params)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\base.py",
>  
> line 227, in get_new_connection
> return Database.connect(**conn_params)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\__init__.py",
>  
> line 84, in Connect
> return Connection(*args, **kwargs)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\connections.py",
>  
> line 179, in __init__
> super(Connection, self).__init__(*args, **kwargs2)
> MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 
> 'admin'@'localhost' (using password: NO)")
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File "manage.py", line 15, in 
> execute_from_command_line(sys.argv)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
>  
> line 381, in execute_from_command_line
> utility.execute()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
>  
> line 375, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
>  
> line 316, in run_from_argv
> self.execute(*args, **cmd_options)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
>  
> line 350, in execute
> self.check()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
>  
> line 379, in check
> include_deployment_checks=include_deployment_checks,
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\migrate.py",
>  
> line 59, in _run_checks
> issues = run_checks(tags=[Tags.database])
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\registry.py",
>  
> line 71, in run_checks
> new_errors = check(app_configs=app_configs)
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\database.py",
>  
> line 10, in check_database_backends
> issues.extend(conn.validation.check(**kwargs))
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\validation.py",
>  
> line 9, in check
> issues.extend(self._check_sql_mode(**kwargs))
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\validation.py",
>  
> line 13, in _check_sql_mode
> with self.connection.cursor() as cursor:
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 255, in cursor
> return self._cursor()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 232, in _cursor
> self.ensure_connection()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 216, in ensure_connection
> self.connect()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py",
>  
> line 89, in __exit__
> raise dj_exc_value.with_traceback(traceback) from exc_value
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 216, in ensure_connection
> self.connect()
>   File "C:\Users\IFEANYI 
> CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
>  
> line 194, in connect
> self.connection = self.get_new_connection(conn_params)
>   File "C:\Users\IFEANYI 
> 

Re: Django IRC...Is it Active?

2020-03-20 Thread Evil Kunt
Its active buddy

On 20 Mar 2020 17:34, "Matthew Leung"  wrote:

> I tried it...there is nobody in there :(
>
> --
> 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 view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABCeVgzfWy%3DFR%2Bofsodhy_9osg2n%3DjDaYREdaJrnrFqdqrdEVw%40mail.gmail.com.


How to run django app on a private network

2020-03-20 Thread Victor
Hello guys, how do i run a django app on my network so i can access it from 
other devices on that network? Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d1384c20-fa48-413d-a514-6d9ff45757a5%40googlegroups.com.


email": [ "Enter a valid email address." ]

2020-03-20 Thread devyen
Hi,

I am tying to use the EmailField in my AbstractBaseUser Class see below. 
However the serializer does not recognize any emails as valid (I tested 
with this one, which is clearly valid) 

Can you help me?

Thank you so much!


models.py

class User(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(max_length=256, unique=True)
first_name = models.TextField(verbose_name="First Name", blank=True)
last_name = models.TextField(verbose_name="Last Name", blank=True)
user_id = models.TextField(unique=True)
data = JSONField(default=default_data, name="device_data")
is_staff = models.BooleanField(default=False)
is_active = models.BooleanField(default=True)
date_joined = models.DateTimeField(default=timezone.now)

objects = UserManager()

USERNAME_FIELD = 'email'

def __str__(self):
return self.email

def get_first_name(self):
return self.first_name

def get_last_name(self):
return self.last_name

def get_email(self):
return self.email

def __unicode__(self):
return self.email, self.user_id

def get_user_id(self):
return self.user_id

serializers.py

from rest_framework import serializers
from .models import User


class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ['email', 'password']


part of views.py

class UserRegistration(APIView):
def post(self, request):
serializer = UserSerializer(data=request.data)
if serializer.is_valid():
print('valid')
user_object = []
email = serializer.validated_data['email']
password = serializer.validated_data['password']
if "first_name" in serializer.validated_data:
first_name = serializer.validated_data['first_name']
user_object.append(first_name)
else:
pass
if "last_name" in serializer.validated_data:
last_name = serializer.validated_data['last_name']
user_object.append(last_name)
else:
pass

# serializer.save()
return Response(user_object, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)


I send this:

http -f POST http://127.0.0.1:8000/reg email='k...@k.com', password='pw'

to receive this error:

{

"email": [

"Enter a valid email address."

]

}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bc92176b-7eb2-4e2a-a8a0-215eef7392c7%40googlegroups.com.


Re: importar datos en tiempo real de una base de datos externa

2020-03-20 Thread Luis Zárate
Hola,

Revisa la siguienten documentación
- https://docs.djangoproject.com/en/3.0/topics/db/multi-db/
- https://docs.djangoproject.com/en/3.0/howto/legacy-databases/
La idea es que puede hacer una app que sea una conexión a la db a travez de
modelos creados con inspectdb (debe hacer algunas correcciones manuales), y
puede usar un router para saber en que database debe leer los datos.
Al final en el settings configurar ambas conexiones


Saludos.

El vie., 20 mar. 2020 a las 10:56, Shainny Martinez (<
shainnymarcruz...@gmail.com>) escribió:

> Django permite realizar SQL fuera de su ORM, es decir, puedes hacer una
> confección db externa con el correspondiente código SQL.
>
> Lo que te quiero decir es que, puedes escribir un queryset personalizado.
>
>
> Ese es el link directo a la documentación para que sepas cómo hacerlo:
> https://docs.djangoproject.com/en/3.0/topics/db/sql/
>
>
>
> Espero haberte ayudado.
>
>
>
> El vie., 20 de mar. de 2020 11:45 AM, wilmer urango 
> escribió:
>
>> Buenas
>>
>> Me gustaría saber si existe una herramienta en django capaz de llamar
>> datos de cualquier base de datos externa, coloco ejemplo especifico, estoy
>> haciendo una herramienta en un empresa y quiero sacar algunos datos de la
>> base de datos que tiene su ERP esto en tiempo real obviamente y hasta la
>> fecha no he encontrado nada.
>>
>> Les agradezco su ayuda.
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/7d7950a7-6163-4c2c-923b-d080dc05a2ca%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACPibpG4nN5DifH_Xo372sEPyf_jsUhLPEf4XhF0wHHuW9r6Pw%40mail.gmail.com
> 
> .
>


-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyOj6F97wq8dpTojgGsB4uwwz9sjozAA5HkXTGepkerFgA%40mail.gmail.com.


Re: importar datos en tiempo real de una base de datos externa

2020-03-20 Thread Shainny Martinez
Django permite realizar SQL fuera de su ORM, es decir, puedes hacer una
confección db externa con el correspondiente código SQL.

Lo que te quiero decir es que, puedes escribir un queryset personalizado.


Ese es el link directo a la documentación para que sepas cómo hacerlo:
https://docs.djangoproject.com/en/3.0/topics/db/sql/



Espero haberte ayudado.



El vie., 20 de mar. de 2020 11:45 AM, wilmer urango 
escribió:

> Buenas
>
> Me gustaría saber si existe una herramienta en django capaz de llamar
> datos de cualquier base de datos externa, coloco ejemplo especifico, estoy
> haciendo una herramienta en un empresa y quiero sacar algunos datos de la
> base de datos que tiene su ERP esto en tiempo real obviamente y hasta la
> fecha no he encontrado nada.
>
> Les agradezco su ayuda.
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/7d7950a7-6163-4c2c-923b-d080dc05a2ca%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACPibpG4nN5DifH_Xo372sEPyf_jsUhLPEf4XhF0wHHuW9r6Pw%40mail.gmail.com.


importar datos en tiempo real de una base de datos externa

2020-03-20 Thread wilmer urango
Buenas 

Me gustaría saber si existe una herramienta en django capaz de llamar datos 
de cualquier base de datos externa, coloco ejemplo especifico, estoy 
haciendo una herramienta en un empresa y quiero sacar algunos datos de la 
base de datos que tiene su ERP esto en tiempo real obviamente y hasta la 
fecha no he encontrado nada.

Les agradezco su ayuda.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7d7950a7-6163-4c2c-923b-d080dc05a2ca%40googlegroups.com.


Re: Django IRC...Is it Active?

2020-03-20 Thread Nick Sarbicki
If you are just looking for help the #django channel on the python
developers slack workspace (pyslackers.com) is pretty active.

Full disclosure - I'm an admin of the slack workspace.

- Nick


On Fri, Mar 20, 2020 at 2:14 PM Andréas Kühne 
wrote:

> Currently the django project recommends using the forums:
>
> forum.djangoproject.com
>
> Regards,
>
> Andréas
>
>
> Den fre 20 mars 2020 kl 14:59 skrev Shishir Jha :
>
>> Yes I also want to ask for django official discord server
>>
>> On Fri, Mar 20, 2020 at 7:23 PM B.Ramburn  wrote:
>>
>>> we could use a discord server?
>>>
>>> Regards,
>>>
>>>
>>> B.Ramburn BSc LLM#
>>> Snr. Quantity Surveyor
>>>
>>>
>>> On Fri, 20 Mar 2020 at 12:04, Matthew Leung  wrote:
>>>
 I tried it...there is nobody in there :(

 --
 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 view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAKhymb3eu_Gzsm_DD5FOXdPT0qjhez8rZTfe6KRb38uZ6bVnOw%40mail.gmail.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CA%2BC7wFQ7gBapjT%3DBqvptvGra8K5r3PFHXeP9hgC94T1eKuAd9A%40mail.gmail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCdGvwcZoh3AwXY9mucudQwgNxWzqU%2BPDz4Oe%3D74qELmoA%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGuvt91oo9mApvvE5_aHBY4ODCGJ2JYVOA6BQJHO302NCQEmsQ%40mail.gmail.com.


Re: It is Possible to send html File through Django Rest api? Please suggest

2020-03-20 Thread Andréas Kühne
This is of course possible. If you look at the restframework examples you
can run it in a html browser that returns different values than the api
itself.

Regards,

Andréas


Den fre 20 mars 2020 kl 09:47 skrev Sai Sandeep Rayanuthala <
rayanutha...@gmail.com>:

> Yeah possible. Use content disposition.
>
> On Thu, 19 Mar 2020, 13:01 Suraj Thapa FC,  wrote:
>
>> No
>>
>> On Thu, 19 Mar 2020, 10:53 am venna venkatReddy, <
>> vennavenkat...@gmail.com> wrote:
>>
>>> It is Possible to send html File through Django Rest API. I need how to
>>> send Template/one.html file to Other Application when they hit my API.
>>>
>>> Please respond or suggest any url
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/30728453-679d-4016-893a-1e3854bdd895%40googlegroups.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAPjsHcHWvEvwjtHEe7paKszeE3O31xjcyxeZ%2B9YG50a7VS2gsw%40mail.gmail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CADBepW_uRwitbRF1Uf7DxGAEh-tbXDv5HwQaNQ_z0ys8mYpAFA%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCdQFues1%2Be3ZyCJ2zHyDLPpSZz7r%2B-QiVD36HZsnBjFeQ%40mail.gmail.com.


Re: Django IRC...Is it Active?

2020-03-20 Thread Andréas Kühne
Currently the django project recommends using the forums:

forum.djangoproject.com

Regards,

Andréas


Den fre 20 mars 2020 kl 14:59 skrev Shishir Jha :

> Yes I also want to ask for django official discord server
>
> On Fri, Mar 20, 2020 at 7:23 PM B.Ramburn  wrote:
>
>> we could use a discord server?
>>
>> Regards,
>>
>>
>> B.Ramburn BSc LLM#
>> Snr. Quantity Surveyor
>>
>>
>> On Fri, 20 Mar 2020 at 12:04, Matthew Leung  wrote:
>>
>>> I tried it...there is nobody in there :(
>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAKhymb3eu_Gzsm_DD5FOXdPT0qjhez8rZTfe6KRb38uZ6bVnOw%40mail.gmail.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BC7wFQ7gBapjT%3DBqvptvGra8K5r3PFHXeP9hgC94T1eKuAd9A%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCdGvwcZoh3AwXY9mucudQwgNxWzqU%2BPDz4Oe%3D74qELmoA%40mail.gmail.com.


Re: Django IRC...Is it Active?

2020-03-20 Thread Shishir Jha
Yes I also want to ask for django official discord server

On Fri, Mar 20, 2020 at 7:23 PM B.Ramburn  wrote:

> we could use a discord server?
>
> Regards,
>
>
> B.Ramburn BSc LLM#
> Snr. Quantity Surveyor
>
>
> On Fri, 20 Mar 2020 at 12:04, Matthew Leung  wrote:
>
>> I tried it...there is nobody in there :(
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKhymb3eu_Gzsm_DD5FOXdPT0qjhez8rZTfe6KRb38uZ6bVnOw%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BC7wFQ7gBapjT%3DBqvptvGra8K5r3PFHXeP9hgC94T1eKuAd9A%40mail.gmail.com.


Inability to Connect django with MySQL database

2020-03-20 Thread Ifeanyi Chielo
Hello, 
I am new to Python django, I have been making efforts to connect a django 
application to mysql without success. Bellow is the information that I got
PS C:\Users\IFEANYI CHIELO\divine> python manage.py migrate
Traceback (most recent call last):
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 216, in ensure_connection
self.connect()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 194, in connect
self.connection = self.get_new_connection(conn_params)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\base.py",
 
line 227, in get_new_connection
return Database.connect(**conn_params)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\__init__.py",
 
line 84, in Connect
return Connection(*args, **kwargs)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\connections.py",
 
line 179, in __init__
super(Connection, self).__init__(*args, **kwargs2)
MySQLdb._exceptions.OperationalError: (1045, "Access denied for user 
'admin'@'localhost' (using password: NO)")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 15, in 
execute_from_command_line(sys.argv)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
 
line 381, in execute_from_command_line
utility.execute()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\__init__.py",
 
line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
 
line 316, in run_from_argv
self.execute(*args, **cmd_options)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
 
line 350, in execute
self.check()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\base.py",
 
line 379, in check
include_deployment_checks=include_deployment_checks,
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\management\commands\migrate.py",
 
line 59, in _run_checks
issues = run_checks(tags=[Tags.database])
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\registry.py",
 
line 71, in run_checks
new_errors = check(app_configs=app_configs)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\core\checks\database.py",
 
line 10, in check_database_backends
issues.extend(conn.validation.check(**kwargs))
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\validation.py",
 
line 9, in check
issues.extend(self._check_sql_mode(**kwargs))
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\validation.py",
 
line 13, in _check_sql_mode
with self.connection.cursor() as cursor:
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 255, in cursor
return self._cursor()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 232, in _cursor
self.ensure_connection()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 216, in ensure_connection
self.connect()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\utils.py",
 
line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 216, in ensure_connection
self.connect()
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\base\base.py",
 
line 194, in connect
self.connection = self.get_new_connection(conn_params)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\django\db\backends\mysql\base.py",
 
line 227, in get_new_connection
return Database.connect(**conn_params)
  File "C:\Users\IFEANYI 
CHIELO\AppData\Local\Programs\Python\Python37\lib\site-packages\MySQLdb\__init__.py",
 
line 84, in Connect
return Connection(*args, **kwargs)
  File "C:\Users\IFEANYI 

Re: Django IRC...Is it Active?

2020-03-20 Thread B.Ramburn
we could use a discord server?

Regards,


B.Ramburn BSc LLM#
Snr. Quantity Surveyor


On Fri, 20 Mar 2020 at 12:04, Matthew Leung  wrote:

> I tried it...there is nobody in there :(
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKhymb3eu_Gzsm_DD5FOXdPT0qjhez8rZTfe6KRb38uZ6bVnOw%40mail.gmail.com.


Re: A question about the Django server

2020-03-20 Thread Bhavesh Ramburn

did you migrate?


On Friday, 20 March 2020 12:05:09 UTC, Liu楽叁 wrote:
>
> I am using windows and I started a server by 'py manage.py runserver' in 
> the powershell, It works
>
> [image: 1584673561(1).jpg]
> and I also can visit the web I writed for test
>
> [image: 1584673711(1).jpg]
> but when I try to login the background, the server is break down
>
> [image: 1584673916(1).jpg]
>
> I have tried so hard to find out what's the problem, but still can not fix 
> it. so I am asking for your help and advice. thanks
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/19a91831-c233-422f-a05a-e6a3fd7fe425%40googlegroups.com.


Re: A question about the Django server

2020-03-20 Thread Bruckner de Villiers
Have you set up your admin.py?

 

Bruckner de Villiers

083 625 1086

 

From:  on behalf of Liu楽叁 

Reply to: 
Date: Friday, 20 March 2020 at 14:05
To: Django users 
Subject: A question about the Django server

 

I am using windows and I started a server by 'py manage.py runserver' in the 
powershell, It works

and I also can visit the web I writed for test

but when I try to login the background, the server is break down

 

I have tried so hard to find out what's the problem, but still can not fix it. 
so I am asking for your help and advice. thanks

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6054fc39-21a1-4e72-8edc-4c17a838d41f%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/72428AAE-C944-4C58-9FC2-0A1665819458%40gmail.com.


arithmatic captcha

2020-03-20 Thread Hema Bhagnani
I have already coded the user login and signup page. Now I want to add 
arithmetic captcha to my signup page.I have not used the models form or any 
form.form..How to implement the arithmetic captcha??

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a7000c3c-2969-4602-a6cd-8025957bd1e6%40googlegroups.com.


Django IRC...Is it Active?

2020-03-20 Thread Matthew Leung
I tried it...there is nobody in there :(

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dcc59e8e-2bc6-478e-85f8-63d5fa95de35%40googlegroups.com.


A question about the Django server

2020-03-20 Thread Liu楽叁
I am using windows and I started a server by 'py manage.py runserver' in 
the powershell, It works

[image: 1584673561(1).jpg]
and I also can visit the web I writed for test

[image: 1584673711(1).jpg]
but when I try to login the background, the server is break down

[image: 1584673916(1).jpg] 

I have tried so hard to find out what's the problem, but still can not fix 
it. so I am asking for your help and advice. thanks

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6054fc39-21a1-4e72-8edc-4c17a838d41f%40googlegroups.com.


Regarding the postgres sql query

2020-03-20 Thread Devendra reddy
Hi to all ,

Help me to fix this problem .

Into the table the data is inserting for every 5 minutes. But I want to get
the data for every one hour from the table and want to send the response to
the JSON or UI .

Thanks and regards
Devendra.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CABB0Uf2bRVxRY6pzmtRBvQr%2BVoc4KftoYa03Q5QxE39gzpCKxQ%40mail.gmail.com.


Re: unable Integrating Djongo 1.3.1 with django 2.2.10

2020-03-20 Thread Khaleel Ahmed H. M. Shariff
HI Eswar,
May Peace, Blessings & Mercy of Almighty God be on you!

I should I realized it earlier. It would have saved your time.

In Python, we read the last line in the list of errors & do not really care
for the earlier errors.

Thanks you very much for the update.

God Bless You!
God Bless India!!
--

Love & Regards
Dr. (h.c.) Khaleel Ahmed H. M.

Managing Director, Tanzanite Realty India Private Limited

+91-9845007864

+91-7829777864

---
Human Life is Precious
Koran Surah Ma'idah Chapter 5 Verse 32:
If anyone killed a person, not in retaliation of murder, or (and) to spread
mischief in the land - it would be as if he killed all mankind, & if anyone
saved a life, it would be as if he saved the life of all mankind.


On Fri, Mar 20, 2020 at 3:04 PM Eswar Subramanyam <
eswar.subraman...@gmail.com> wrote:

> Hi Khaleel and whoever this may help in the future,
>
>
> Actually you were right Khaleel, on those lines i checked this thread
> which was useful to me.
>
> https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory
>
> Following which i was stareing at the exception and realised that the clue
> which was in front of me since hours to resolve this issue.Like in Java,
> python gives you the root cause of an exception, but as i was used to Java
> and .Net i didnt realise the annotation used by python.
>
> The exception i was bothered about the exception:
> AppData\Roaming\Python\Python38\site-packages\django\db\utils.py", line
> 121, in load_backend
> raise ImproperlyConfigured(
> django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available
> database backend.
> Try using 'django.db.backends.XXX', where XXX is one of:
> 'mysql', 'oracle', 'postgresql', 'sqlite3'
>
> Where as python had already listed the root cause which was :
>
> \Python\Python38\site-packages\djongo\database.py", line 2, in 
> from pymongo import MongoClient
> ModuleNotFoundError: No module named 'pymongo'
>
> The *above exception was the direct cause *of the following exception:
>
> Indeed that's where Khaleel you were right, PyMongo i installed through
> pycharm, which desginated a sitepackage folder that wasnt my user
> site-package...
>
> Hope this helps someone falling into the same trap.
>
> Cheers,
> Es.
>
> Le jeudi 19 mars 2020 21:35:52 UTC+1, Eswar Subramanyam a écrit :
>>
>> Hi
>>
>> I opted for Djongo to take advantage of Django ORM with MongoDB..
>>
>> but while starting the server, i get the following error
>>
>> AppData\Roaming\Python\Python38\site-packages\django\db\utils.py", line
>> 121, in load_backend
>> raise ImproperlyConfigured(
>> django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available
>> database backend.
>> Try using 'django.db.backends.XXX', where XXX is one of:
>> 'mysql', 'oracle', 'postgresql', 'sqlite3'
>>
>>
>> I have lost a lot of time trying to figure out, and came to a conclusion
>> that i cant use ORM on Mongo DB.
>>
>> Have someone got a clue on what going wrong ?
>>
>> I dump also all the installed packages
>>
>> Thanks for your help/
>>
>> Package   Version
>> - --
>> asgiref   3.2.5
>> bson  0.5.8
>> certifi   2019.11.28
>> chardet   3.0.4
>> dataclasses   0.6
>> Django2.2.11
>> django-menu-generator 1.0.4
>> djongo1.3.1
>> idna  2.9
>> mongoengine   0.19.1
>> pip   20.0.2
>> pymango   0.1.1
>> pymongo   3.10.1
>> python-dateutil   2.8.1
>> pytz  2019.3
>> requests  2.23.0
>> setuptools41.2.0
>> six   1.14.0
>> sqlparse  0.2.4
>> urllib3   1.25.8
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2419aa99-7535-4bd5-b250-ca38d61b67bd%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMjBbiBmR5O8U3nAvzFPEBeLGqavkBAPfOKKRRrZepNuUDX35A%40mail.gmail.com.


raise MigrationError(selected.column) djongo.sql2mongo.MigrationError: id

2020-03-20 Thread shree hari
here is the complete log of the error: https://del.dog/ujiruhawag.txt
there's no other primary key set. using the default id which is set by 
django. 
i would request to give fix for this error.

thank you


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ff5b4adc-902c-4564-8e99-47eb2e25e0da%40googlegroups.com.


Re: unable Integrating Djongo 1.3.1 with django 2.2.10

2020-03-20 Thread Eswar Subramanyam
Hi Khaleel and whoever this may help in the future,


Actually you were right Khaleel, on those lines i checked this thread which 
was useful to me.
https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory

Following which i was stareing at the exception and realised that the clue 
which was in front of me since hours to resolve this issue.Like in Java, 
python gives you the root cause of an exception, but as i was used to Java 
and .Net i didnt realise the annotation used by python.

The exception i was bothered about the exception:
AppData\Roaming\Python\Python38\site-packages\django\db\utils.py", line 
121, in load_backend
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available 
database backend.
Try using 'django.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'

Where as python had already listed the root cause which was :

\Python\Python38\site-packages\djongo\database.py", line 2, in 
from pymongo import MongoClient
ModuleNotFoundError: No module named 'pymongo'

The *above exception was the direct cause *of the following exception:

Indeed that's where Khaleel you were right, PyMongo i installed through 
pycharm, which desginated a sitepackage folder that wasnt my user 
site-package...

Hope this helps someone falling into the same trap.

Cheers,
Es.

Le jeudi 19 mars 2020 21:35:52 UTC+1, Eswar Subramanyam a écrit :
>
> Hi 
>
> I opted for Djongo to take advantage of Django ORM with MongoDB..
>
> but while starting the server, i get the following error
>
> AppData\Roaming\Python\Python38\site-packages\django\db\utils.py", line 
> 121, in load_backend
> raise ImproperlyConfigured(
> django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available 
> database backend.
> Try using 'django.db.backends.XXX', where XXX is one of:
> 'mysql', 'oracle', 'postgresql', 'sqlite3'
>
>
> I have lost a lot of time trying to figure out, and came to a conclusion 
> that i cant use ORM on Mongo DB.
>
> Have someone got a clue on what going wrong ?
>
> I dump also all the installed packages
>
> Thanks for your help/
>
> Package   Version
> - --
> asgiref   3.2.5
> bson  0.5.8
> certifi   2019.11.28
> chardet   3.0.4
> dataclasses   0.6
> Django2.2.11
> django-menu-generator 1.0.4
> djongo1.3.1
> idna  2.9
> mongoengine   0.19.1
> pip   20.0.2
> pymango   0.1.1
> pymongo   3.10.1
> python-dateutil   2.8.1
> pytz  2019.3
> requests  2.23.0
> setuptools41.2.0
> six   1.14.0
> sqlparse  0.2.4
> urllib3   1.25.8
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2419aa99-7535-4bd5-b250-ca38d61b67bd%40googlegroups.com.


Re:

2020-03-20 Thread Mohammad yunus
Thx

On Tue, 24 Dec 2019, 6:50 pm V.K. Vanama,  wrote:

> The following steps are useful on Microsoft Windows Platform, I am using
> Microsoft Windows 10 64-bit
>
> Step 1: Create a django project either through command line interface or
> through any IDE such as JetBrains PyCharm, Atom, etc...
> Step 2: Observe the sub-folder name inside the django project contains the
> same name as the project name.
> Step 3: Notice that the sub-folder contains 4 python files named
> __init__.py, settings.py, urls.py, wsgi.py
> Step 4: Open the settings.py file & scroll down to the django project
> database component which is default to Sq Lite.
> Step 5: Remove the default settings corresponding to the Sq Lite and
> Replace them by MySQL database as follows:-
> {
> 'ENGINE': 'MYSQL',
> 'USERNAME': '', # Replace  with your MySQL database username.
> 'PASSWORD': '', # Replace  with your MySQL database password
> corresponds to the username provided above.
> 'HOST':'localhost/remotehost', # If it is remote host, you have to provide
> its IP Address., & also update the relevant IP Address in the
> ALLOWED_HOSTS = [] in the settings.py file itself.
> 'PORT': 3306, # 3306 is default for MySQL, if you have your own replace it
> by your port number
> }
>
> Step 6: Save/Refresh the settings.py
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/52a9bb07-1487-4ead-9cf8-0edff80519a3%40googlegroups.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEQiGcOAwcnqKqvNM0doJTQT9P8kn-wof_v__pbkyxpRQ-qC3Q%40mail.gmail.com.


Re: unable Integrating Djongo 1.3.1 with django 2.2.10

2020-03-20 Thread Eswar Subramanyam
Hi Khaleel

God bless you and your family too.

I understand your point, but i have only one python 3.8 installed. And
Django version is 2.2.1. other package 1.3.1 isnt Django but Djongo, so i
am not able to figure out where this is issue is cropping up. i cleaned
also the pyharm packages but still doesnt work.

Thank you for your help.

Kind Regards
Es.

On Fri, Mar 20, 2020 at 3:49 AM Khaleel Ahmed H. M. Shariff <
khaleelahme...@gmail.com> wrote:

> Hi Eswar,
> May Peace, Blessings & Mercy of Almighty God be on you!
>
> Short answer, your environment is messed up. Now, let us address who or
> how was it messed up
>
> There are many reasons why you could be getting this error.
> One major issue similar I have frequently faced is in case you have
> multiple versions of Python on the same box. Python 2.x & 3.x installed on
> the same box. Django version 1.x is compatible with Python 2.x.  Python 3.x
> & django 1.x do not work together. In case you have multiple versions of
> Python installed, you may have to tweak the PATH to indicate the
> appropriate directory in the search path ahead of the other directories.
>
> This is probably your reason for the stuff not working as you have both
> 2.2.11 & 1.3.1 of Django installed.
>
> 1. You may be using an IDE like pycharm/spyder/any other IDE. Normally,
> these IDEs try to download packages. In case there is a version mismatch in
> the source of the package, there could be a mess up.
> 2. Your PATH & PYTHONPATH environment variable may not have the relevant
> directory or have a different directory with the same file name ahead of
> the actual file you want loaded.
> 3. You may be using a virtualenv. Try to deactivate & try executing the
> same
>
> Hope this helps.
> Kindly share your experience.
> Thanks in advance.
>
>
> God Bless You!
> God Bless India!!
> --
>
> Love & Regards
> Dr. (h.c.) Khaleel Ahmed H. M.
>
> Managing Director, Tanzanite Realty India Private Limited
>
> +91-9845007864
>
> +91-7829777864
>
> ---
> Human Life is Precious
> Koran Surah Ma'idah Chapter 5 Verse 32:
> If anyone killed a person, not in retaliation of murder, or (and) to
> spread mischief in the land - it would be as if he killed all mankind, & if
> anyone saved a life, it would be as if he saved the life of all mankind.
>
>
> On Fri, Mar 20, 2020 at 2:05 AM Eswar Subramanyam <
> eswar.subraman...@gmail.com> wrote:
>
>> Hi
>>
>> I opted for Djongo to take advantage of Django ORM with MongoDB..
>>
>> but while starting the server, i get the following error
>>
>> AppData\Roaming\Python\Python38\site-packages\django\db\utils.py", line
>> 121, in load_backend
>> raise ImproperlyConfigured(
>> django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available
>> database backend.
>> Try using 'django.db.backends.XXX', where XXX is one of:
>> 'mysql', 'oracle', 'postgresql', 'sqlite3'
>>
>>
>> I have lost a lot of time trying to figure out, and came to a conclusion
>> that i cant use ORM on Mongo DB.
>>
>> Have someone got a clue on what going wrong ?
>>
>> I dump also all the installed packages
>>
>> Thanks for your help/
>>
>> Package   Version
>> - --
>> asgiref   3.2.5
>> bson  0.5.8
>> certifi   2019.11.28
>> chardet   3.0.4
>> dataclasses   0.6
>> Django2.2.11
>> django-menu-generator 1.0.4
>> djongo1.3.1
>> idna  2.9
>> mongoengine   0.19.1
>> pip   20.0.2
>> pymango   0.1.1
>> pymongo   3.10.1
>> python-dateutil   2.8.1
>> pytz  2019.3
>> requests  2.23.0
>> setuptools41.2.0
>> six   1.14.0
>> sqlparse  0.2.4
>> urllib3   1.25.8
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/6b10fe72-f834-4eb2-86e9-0595031e4b4a%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMjBbiBdqNAfgyg3U2d3Fa9w5Y18eOyyN10OoF9Za8aStKPqyg%40mail.gmail.com
> 
> .
>


-- 
Cordialement,

Re: It is Possible to send html File through Django Rest api? Please suggest

2020-03-20 Thread Sai Sandeep Rayanuthala
Yeah possible. Use content disposition.

On Thu, 19 Mar 2020, 13:01 Suraj Thapa FC,  wrote:

> No
>
> On Thu, 19 Mar 2020, 10:53 am venna venkatReddy, 
> wrote:
>
>> It is Possible to send html File through Django Rest API. I need how to
>> send Template/one.html file to Other Application when they hit my API.
>>
>> Please respond or suggest any url
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/30728453-679d-4016-893a-1e3854bdd895%40googlegroups.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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPjsHcHWvEvwjtHEe7paKszeE3O31xjcyxeZ%2B9YG50a7VS2gsw%40mail.gmail.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADBepW_uRwitbRF1Uf7DxGAEh-tbXDv5HwQaNQ_z0ys8mYpAFA%40mail.gmail.com.