Re: Impossible d'utiliser language_code 'fr-fr' avec django 3.0.4

2020-03-26 Thread Simon Charette
La documentation de Django est disponible en Français.

Ce message d'erreur est traduit dans cette section: 
https://docs.djangoproject.com/fr/3.0/ref/checks/#translation

Tu as deux choix:
1. Ajoute 'fr-fr' à ton setting LANGUAGES tel qu'indiqué
2. Définit ton setting LANGUAGE_CODE = 'fr' plutôt que 'fr-fr'

Simon

Le jeudi 26 mars 2020 21:47:11 UTC-4, Anselme SERI a écrit :
>
> Je suis un nouveau dans le développement python et je teste actuellement 
> Django.
> Il m'est impossible d'utiliser le language_code 'fr-fr' dans django 3.0.4.
> Le message d'erreur qui s'affiche dans le terminal est le suivant :
>
> "ERRORS:
> ?: (translation.E004) You have provided a value for the LANGUAGE_CODE 
> setting that is not in the LANGUAGES setting."
>
> J'ai fouiner sur internet à la recherche de solution sans succès.
>
> Comment puis-je travailler avec une interface en français. Quelqu'un 
> pourrait m'aider?
>

-- 
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/37a930ed-f975-41c4-b567-ab710bc0a266%40googlegroups.com.


Re: Impossible d'utiliser language_code 'fr-fr' avec django 3.0.4

2020-03-26 Thread Jean Luc Gaman
Hello, Anselme malheureusement l’interface Django est en anglais que souhaite 
tu faire ? Si tu veux juste découvrir Django tu devrais suivre le tutoriel 
officiel de Django pour démarrer, 
https://docs.djangoproject.com/en/3.0/intro/tutorial01/ 




> Le 27 mars 2020 à 01:10, Anselme SERI  a écrit :
> 
> Je suis un nouveau dans le développement python et je teste actuellement 
> Django.
> Il m'est impossible d'utiliser le language_code 'fr-fr' dans django 3.0.4.
> Le message d'erreur qui s'affiche dans le terminal est le suivant :
> 
> "ERRORS:
> ?: (translation.E004) You have provided a value for the LANGUAGE_CODE setting 
> that is not in the LANGUAGES setting."
> 
> J'ai fouiner sur internet à la recherche de solution sans succès.
> 
> Comment puis-je travailler avec une interface en français. Quelqu'un pourrait 
> m'aider?
> 
> -- 
> 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/26f97a9e-ad1a-480a-bd2f-4d58e8af9c9b%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/9B6ADAF3-F133-4C24-96CD-841434EC8B24%40gmail.com.


Impossible d'utiliser language_code 'fr-fr' avec django 3.0.4

2020-03-26 Thread Anselme SERI
Je suis un nouveau dans le développement python et je teste actuellement 
Django.
Il m'est impossible d'utiliser le language_code 'fr-fr' dans django 3.0.4.
Le message d'erreur qui s'affiche dans le terminal est le suivant :

"ERRORS:
?: (translation.E004) You have provided a value for the LANGUAGE_CODE 
setting that is not in the LANGUAGES setting."

J'ai fouiner sur internet à la recherche de solution sans succès.

Comment puis-je travailler avec une interface en français. Quelqu'un 
pourrait m'aider?

-- 
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/26f97a9e-ad1a-480a-bd2f-4d58e8af9c9b%40googlegroups.com.


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

2020-03-26 Thread devyen
Hi

Do know how to whitelist an email domain name? It seems odd that I would
have to go though an white list all of the main email domains (gmail,
protonmail, live, yahoo etc.)

Ive been unable to figure it out on my own

Thanks,



On Sat, Mar 21, 2020 at 4:45 AM Integr@te System 
wrote:

> Hi Freind,
>
> Try to set whitelist for your specific domain testing or refer doc for
> your case.
>
>
> On Sat, Mar 21, 2020, 03:47 devyen  wrote:
>
>> 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
>> 
>> .
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/NHUy2I3ZVDg/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAP5HUWrxXTmMovbmz2KCUG6%3DRMy10fNW6A-hkQdkbNWqZxYGNw%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%2B%3DqY%3DPvkQe%2B6EdeMRZaiJ%3DnYKn%3Dd1b_JivqL4c4%3Dacr28D74Q%40mail.gmail.com.


Re: hello world

2020-03-26 Thread Mr Black Hat
I try djangoproject.com,

On Fri, Mar 27, 2020, 03:22 surendra bhaskar <
surendra.bhaska...@siesgst.ac.in> wrote:

> Follow official documentation it's best
>
> On Thu, 26 Mar, 2020, 6:25 PM victor awakan, 
> wrote:
>
>>
>> Have you try to follow the official documentation tutorial ?
>>
>> On Thu 26. Mar 2020 at 14.48, Mr Black Hat 
>> wrote:
>>
>>> hello i am beginner in django, guys can you help me from where should i
>>> learn django
>>> i know how to create projects in django and also multiple apps, but i
>>> dont know how to templating in django
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to django-users+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/264cdf8d-d508-4919-b2bb-ca9c67ffa6df%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/CAAipwd87-CuvFzb9B4NccQ%3DxRJLogM7GeZjPXSzENUE3v2AchA%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/CAPT84Tmvv-EmCKiwkcza-AYeMBkz1E1OD5TNDq%3D9SCAF%3DFV7Ew%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/CAJ0Fmsp2qM164aj462U2%2BozY0-PbdR0Xe4%3DYsUhmziJoWQTboA%40mail.gmail.com.


Re: hello world

2020-03-26 Thread surendra bhaskar
Follow official documentation it's best

On Thu, 26 Mar, 2020, 6:25 PM victor awakan,  wrote:

>
> Have you try to follow the official documentation tutorial ?
>
> On Thu 26. Mar 2020 at 14.48, Mr Black Hat 
> wrote:
>
>> hello i am beginner in django, guys can you help me from where should i
>> learn django
>> i know how to create projects in django and also multiple apps, but i
>> dont know how to templating in django
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/264cdf8d-d508-4919-b2bb-ca9c67ffa6df%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/CAAipwd87-CuvFzb9B4NccQ%3DxRJLogM7GeZjPXSzENUE3v2AchA%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/CAPT84Tmvv-EmCKiwkcza-AYeMBkz1E1OD5TNDq%3D9SCAF%3DFV7Ew%40mail.gmail.com.


Re: selectfilter2 javascript and django

2020-03-26 Thread Jason Liu
Thank you so much for providing the solution, it solved my problem as well.

On Wednesday, April 29, 2015 at 6:34:25 AM UTC-7, Dimitris Kougioumtzis 
wrote:
>
>
> ok i found it 
>
> in the urls.py i add  the 
>
>  (r'^jsi18n/$', 'django.views.i18n.javascript_catalog'),
>
>
> and in template 
>
>  
>
>
>
> Τη Τετάρτη, 29 Απριλίου 2015 - 4:12:56 μ.μ. UTC+3, ο χρήστης Dimitris 
> Kougioumtzis έγραψε:
>>
>> i want to use the selectfilter  widget for a view , the user in my django 
>> application is only active not staff because i want to restrict access to 
>> django admin pages. But selectfilter widget dosen't  work
>>
>>
>>
>> the error i get is  
>>
>>
>> SyntaxError: expected expression, got '<'
>>
>> 
>>
>> /admin/jsi18n/ (line 1)
>> 4
>> ReferenceError: interpolate is not defined
>>
>> quickElement('h2', selector_available, interpolate(gettext('Available %s'), 
>> [fie...
>>
>>
>>
>>
>>
>> how to use selectfilter functionality to other views in django 
>> application other tha the admin 
>>
>>
>> thx a lot 
>>
>

-- 
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/984326f4-6ae1-4704-bc28-c33dac44be1f%40googlegroups.com.


Re: keep getting the Fatal Python error with mod_wsgi and apache

2020-03-26 Thread Fateh Budwal
Yes i did recreate my virtualenv.  

On Thursday, March 26, 2020 at 6:58:15 AM UTC-7, Stephen J. Butler wrote:
>
> Did you recreate the virtualenv on the server, or did you copy it from 
> your development machine? You should recreate virtualenv's when deploying 
> to a different server.
>
> On Thu, Mar 26, 2020 at 8:53 AM Fateh Budwal  > wrote:
>
>> Yes python 3.8.2 is installed 
>>
>> On Wednesday, March 25, 2020 at 8:30:35 PM UTC-7, Hella Nick wrote:
>>>
>>> 你的服务器是安装的python3.8.2的版本吗?
>>>
>>> Fateh Budwal  于2020年3月26日周四 上午6:03写道:
>>>
 Hello Everyone 
  I have complied python 3.8.2 with django 2.2. it run locally fine but 
 when i try to deploy it with Apache and mod_wsgi 4.7.1 and getting the 
 below error. Any suggestions ?  

 Current thread 0x7f5aa48af880 (most recent call first):
 no Python framePython path configuration:
   PYTHONHOME = (not set)
   PYTHONPATH = (not set)
   program name = /var/www/project/venu/bin/python
   isolated = 0
   environment = 1
   user site = 1
   import site = 1
   sys._base_executable = /var/www/project/venu/bin/python
   sys.base_prefix = '/opt/python3.8.2'
   sys.base_exec_prefix = '/opt/python3.8.2'
   sys.executable = '/var/www/project/venu/bin/python
   sys.prefix = '/opt/python3.8.2'
   sys.exec_prefix = '/opt/python3.8.2'
   sys.path = [
 '/opt/python3.8.2/lib/python38.zip',
 '/opt/python3.8.2/lib/python3.8',
 '/opt/python3.8.2/lib/lib-dynload',
   ]
 Fatal Python error: init_fs_encoding: failed to get the Python codec of 
 the filesystem encoding
 Python runtime state: core initialized
 ModuleNotFoundError: No module named encodings

 Current thread (most recent call first)

 -- 
 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/CAOts0r0qLZLyaFczsQvdKNm45uhhRFYZPwo3uTfMK9Jmy%2B1oNQ%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/5f39f719-94f3-4f30-a7d3-2a65749af0cf%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/d5d28b14-12d5-41cd-a878-97e6d6157afd%40googlegroups.com.


Re: I have issue. I want to migrate database from sqlite3 to postgresql. With a table have 10M records. I need a solution for issue. Maybe help me?

2020-03-26 Thread Farai M
Export to csv  in SQL then import into postgresql from there

On Wed, Mar 25, 2020, 6:43 PM Thắng IT  wrote:

> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/067ffc03-bb03-4a52-8921-21e818a5b41f%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/CAMeub5Ot%3DgoqvfmxsbUP7gioRMWjQReSW4gNtG-PkPnHPvaPYA%40mail.gmail.com.


Re: CRUD Operations Without Model

2020-03-26 Thread pot-potato
Hey, whatever your name is,

There is a command called *inspectdb *in Django (*python manage.py 
inspectdb*). Basically it reads database tables configuration and creates a 
models script.

which can be copied into models.py then use it. And make sure that they are 
in models class meta for these tables are set to *managed = False.*

if managed set to false then Django will not modify database tables. But 
there is a catch, You have to manually update model if you change any table 
configuration from database side like form pgadmin4.

refer this link for more information 
https://docs.djangoproject.com/en/3.0/howto/legacy-databases/.

Thanks and Regards,
Naveen

On Thursday, 26 March 2020 18:18:23 UTC+5:30, LiquidOxygen SpiritsGenuine 
wrote:
>
> Hello All..
>
> I am using PostgreSQL as my database. I already have the tables created.
> I just want to use DJango/Python APIs to perform CRUD operations without 
> re-creating the tables again using Model. 
>
> Please help.
>

-- 
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/d7ba2640-24ec-432c-b11e-a2a57d6c9256%40googlegroups.com.


Re: keep getting the Fatal Python error with mod_wsgi and apache

2020-03-26 Thread Stephen J. Butler
Did you recreate the virtualenv on the server, or did you copy it from your
development machine? You should recreate virtualenv's when deploying to a
different server.

On Thu, Mar 26, 2020 at 8:53 AM Fateh Budwal  wrote:

> Yes python 3.8.2 is installed
>
> On Wednesday, March 25, 2020 at 8:30:35 PM UTC-7, Hella Nick wrote:
>>
>> 你的服务器是安装的python3.8.2的版本吗?
>>
>> Fateh Budwal  于2020年3月26日周四 上午6:03写道:
>>
>>> Hello Everyone
>>>  I have complied python 3.8.2 with django 2.2. it run locally fine but
>>> when i try to deploy it with Apache and mod_wsgi 4.7.1 and getting the
>>> below error. Any suggestions ?
>>>
>>> Current thread 0x7f5aa48af880 (most recent call first):
>>> no Python framePython path configuration:
>>>   PYTHONHOME = (not set)
>>>   PYTHONPATH = (not set)
>>>   program name = /var/www/project/venu/bin/python
>>>   isolated = 0
>>>   environment = 1
>>>   user site = 1
>>>   import site = 1
>>>   sys._base_executable = /var/www/project/venu/bin/python
>>>   sys.base_prefix = '/opt/python3.8.2'
>>>   sys.base_exec_prefix = '/opt/python3.8.2'
>>>   sys.executable = '/var/www/project/venu/bin/python
>>>   sys.prefix = '/opt/python3.8.2'
>>>   sys.exec_prefix = '/opt/python3.8.2'
>>>   sys.path = [
>>> '/opt/python3.8.2/lib/python38.zip',
>>> '/opt/python3.8.2/lib/python3.8',
>>> '/opt/python3.8.2/lib/lib-dynload',
>>>   ]
>>> Fatal Python error: init_fs_encoding: failed to get the Python codec of the 
>>> filesystem encoding
>>> Python runtime state: core initialized
>>> ModuleNotFoundError: No module named encodings
>>>
>>> Current thread (most recent call first)
>>>
>>> --
>>> 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/CAOts0r0qLZLyaFczsQvdKNm45uhhRFYZPwo3uTfMK9Jmy%2B1oNQ%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/5f39f719-94f3-4f30-a7d3-2a65749af0cf%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/CAD4ANxXn7oxc-5UOHV7FQd84O5H71GegMgPL1hgca_4mEPgqzA%40mail.gmail.com.


Re: keep getting the Fatal Python error with mod_wsgi and apache

2020-03-26 Thread Fateh Budwal
i do have django 2.2.8 installed in production.

On Wednesday, March 25, 2020 at 9:36:58 PM UTC-7, Mike Dewhirst wrote:
>
> On 26/03/2020 2:29 pm, Hella Nick wrote: 
> > 你的服务器是安装的python3.8.2的版本吗? 
> > 
> > Fateh Budwal   >> 
> > 于2020年3月26日周四 上午6:03写道: 
> > 
> > Hello Everyone 
> >  I have complied python 3.8.2 with django 2.2. 
> > 
>
>
> https://docs.djangoproject.com/en/3.0/faq/install/#faq-python-version-support 
>
> That page says Python 3.8 support was added in Django 2.2.8 but you 
> don't mention which Django is installed in production. 
>
> > it run locally fine but when i try to deploy it with Apache and 
> > mod_wsgi 4.7.1 and getting the below error. Any suggestions ? 
> > 
> > |Currentthread 0x7f5aa48af880(most recent call first):no 
> > Pythonframe Pythonpath configuration:PYTHONHOME 
> > =(notset)PYTHONPATH =(notset)program name 
> > =/var/www/project/venu/bin/python isolated =0environment =1user 
> > site =1importsite =1sys._base_executable 
> > =/var/www/project/venu/bin/python sys.base_prefix 
> > ='/opt/python3.8.2'sys.base_exec_prefix 
> > ='/opt/python3.8.2'sys.executable 
> > ='/var/www/project/venu/bin/python sys.prefix = '/opt/python3.8.2' 
> > sys.exec_prefix = '/opt/python3.8.2' sys.path = [ 
> > '/opt/python3.8.2/lib/python38.zip', 
> > '/opt/python3.8.2/lib/python3.8', 
> > '/opt/python3.8.2/lib/lib-dynload', ] Fatal Python error: 
> > init_fs_encoding: failed to get the Python codec of the filesystem 
> > encoding Python runtime state: core initialized 
> > ModuleNotFoundError: No module named encodings Current thread 
> > (most recent call first)| 
> > 
> > -- 
> > 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/CAOts0r0qLZLyaFczsQvdKNm45uhhRFYZPwo3uTfMK9Jmy%2B1oNQ%40mail.gmail.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/CAOts0r0qLZLyaFczsQvdKNm45uhhRFYZPwo3uTfMK9Jmy%2B1oNQ%40mail.gmail.com?utm_medium=email_source=footer>.
>  
>
> > 
> > -- 
> > 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/CAHfGPEeGWB6kdVc65d6s53M-M0KnGS0Er_PFE-pz3tSZco_cGg%40mail.gmail.com
>  
> > <
> https://groups.google.com/d/msgid/django-users/CAHfGPEeGWB6kdVc65d6s53M-M0KnGS0Er_PFE-pz3tSZco_cGg%40mail.gmail.com?utm_medium=email_source=footer>.
>  
>
>
>

-- 
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/84e39ab6-1618-447e-b373-49cf1e7903c3%40googlegroups.com.


Re: keep getting the Fatal Python error with mod_wsgi and apache

2020-03-26 Thread Fateh Budwal
Yes python 3.8.2 is installed 

On Wednesday, March 25, 2020 at 8:30:35 PM UTC-7, Hella Nick wrote:
>
> 你的服务器是安装的python3.8.2的版本吗?
>
> Fateh Budwal > 于2020年3月26日周四 上午6:03写道:
>
>> Hello Everyone 
>>  I have complied python 3.8.2 with django 2.2. it run locally fine but 
>> when i try to deploy it with Apache and mod_wsgi 4.7.1 and getting the 
>> below error. Any suggestions ?  
>>
>> Current thread 0x7f5aa48af880 (most recent call first):
>> no Python framePython path configuration:
>>   PYTHONHOME = (not set)
>>   PYTHONPATH = (not set)
>>   program name = /var/www/project/venu/bin/python
>>   isolated = 0
>>   environment = 1
>>   user site = 1
>>   import site = 1
>>   sys._base_executable = /var/www/project/venu/bin/python
>>   sys.base_prefix = '/opt/python3.8.2'
>>   sys.base_exec_prefix = '/opt/python3.8.2'
>>   sys.executable = '/var/www/project/venu/bin/python
>>   sys.prefix = '/opt/python3.8.2'
>>   sys.exec_prefix = '/opt/python3.8.2'
>>   sys.path = [
>> '/opt/python3.8.2/lib/python38.zip',
>> '/opt/python3.8.2/lib/python3.8',
>> '/opt/python3.8.2/lib/lib-dynload',
>>   ]
>> Fatal Python error: init_fs_encoding: failed to get the Python codec of the 
>> filesystem encoding
>> Python runtime state: core initialized
>> ModuleNotFoundError: No module named encodings
>>
>> Current thread (most recent call first)
>>
>> -- 
>> 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/CAOts0r0qLZLyaFczsQvdKNm45uhhRFYZPwo3uTfMK9Jmy%2B1oNQ%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/5f39f719-94f3-4f30-a7d3-2a65749af0cf%40googlegroups.com.


Re: hello world

2020-03-26 Thread victor awakan
Have you try to follow the official documentation tutorial ?

On Thu 26. Mar 2020 at 14.48, Mr Black Hat 
wrote:

> hello i am beginner in django, guys can you help me from where should i
> learn django
> i know how to create projects in django and also multiple apps, but i dont
> know how to templating in django
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/264cdf8d-d508-4919-b2bb-ca9c67ffa6df%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/CAAipwd87-CuvFzb9B4NccQ%3DxRJLogM7GeZjPXSzENUE3v2AchA%40mail.gmail.com.


CRUD Operations Without Model

2020-03-26 Thread LiquidOxygen SpiritsGenuine
Hello All..

I am using PostgreSQL as my database. I already have the tables created.
I just want to use DJango/Python APIs to perform CRUD operations without 
re-creating the tables again using Model. 

Please help.

-- 
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/d5614aba-e898-4c28-aba4-be2e41bd8063%40googlegroups.com.


hello world

2020-03-26 Thread Mr Black Hat
hello i am beginner in django, guys can you help me from where should i 
learn django
i know how to create projects in django and also multiple apps, but i dont 
know how to templating in django

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


Re: django search page not found error

2020-03-26 Thread omid jahadi
How can i handle this exception ... I have this error: "No agents found 
matching the query"

On Thursday, March 26, 2020 at 12:08:14 AM UTC+4:30, Motaz Hejaze wrote:
>
> No problem , you can catch this exception in your views.py if you want ..
>
> On Wed, 25 Mar 2020, 12:46 pm omid jahadi,  > wrote:
>
>> It doesn't work ... Actually, ManyToManyField is not null ... I get error 
>> when i search a keyword that doesn't match with any user! ... For example, 
>> first_name is 'Omid', when i search 'o' or 'm', search works fine and 
>> return 'Omid', but, when i search 'k', i get PageNotFound error
>>
>> On Wednesday, March 25, 2020 at 7:00:00 AM UTC+4:30, Motaz Hejaze wrote:
>>>
>>> Add null=True to manytomany field
>>>
>>>
>>> On Wed, 25 Mar 2020, 2:02 am omid jahadi,  wrote:
>>>
 Hello everybody! I want to search in a ManyToManyField in the 
 DetailView. It works fine if a user with the same query exist, but if 
 there 
 isn't a user, i get page not found error.

 models.py:

 class agents(models.Model):
 agent_type = models.ForeignKey(types, on_delete=models.SET_NULL, 
 blank=True, null=True)
 name = models.CharField(max_length=100)
 users = models.ManyToManyField(user_models.users, through='user_agent')

 views.py:

 class AgentDetailView(LoginRequiredMixin, generic.DetailView):
 model = models.agents
 template_name = 'agent/agent_detail.html'

 def get_queryset(self):
 query = self.request.GET.get('q')
 if query:
 return 
 models.agents.objects.filter(Q(users__user__first_name__contains=query)
 | 
 Q(users__user__last_name__contains=query)
 | 
 Q(users__id_number__contains=query)
 | 
 Q(users__mobile__contains=query))
 else:
 return models.agents.objects.all()

 agent_detail.html:

 name: {{ agents.name }}
 
 >>> placeholder="Search..."/>
 Search
 
 {% if agents.users %}
 Users:
 
 {% for users in agents.users.all %}
 {{ users }}
 
 {% endfor %}
 
 {% else %}
 There are no user for this agent in database.
 {% endif %}

 -- 
 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/54061fa4-2412-424a-8887-916dcc10c051%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/703c8b77-9775-4895-b5cd-a701f7e2d69d%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/028252e1-5b32-483a-839e-8bc823e1e242%40googlegroups.com.


Re: I have issue. I want to migrate database from sqlite3 to postgresql. With a table have 10M records. I need a solution for issue. Maybe help me?

2020-03-26 Thread Daniel Chimeno
One possible solution:

$ createdb newdb
$ pgloader ./test/sqlite/sqlite.db postgresql:///newdb

https://github.com/dimitri/pgloader



El miércoles, 25 de marzo de 2020, 17:45:54 (UTC+1), Thắng IT escribió:
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3435d5bf-0422-4be0-afd5-e61b13460ea1%40googlegroups.com.


Re: End of extended support for Django 1.11

2020-03-26 Thread Andréas Kühne
You can rely on April 2020, but not beyond that is the way I would
interpret it. However - you should be migrating off it anyway - it's an old
version.

Regards,

Andréas


Den tors 26 mars 2020 kl 00:11 skrev Daniela Kim :

> Hi everyone,
>
> When exactly is the *end of extended support* for Django 1.11?  The Django
> Roadmap  says
> "Until at least April 2020" and Django's supported versions
>  page says
> "April 2020".  May I assume that the extended support will last until the
> end of April, if not beyond?
>
> Thanks,
> Daniela
>
> --
> 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/3091c2a5-047d-4e81-ade3-335d8a5af990%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/CAK4qSCe5e_x3%3DzDg6JPuiXwXRECh0SvBvR7SVnb_KKzC0sSWBg%40mail.gmail.com.