Re: Django app to PWA

2020-07-22 Thread Ryan Nowakowski



On July 21, 2020 3:36:36 PM CDT, Anirudh choudhary 
 wrote:
>Hello everyone
>
>can anyone share me the link how to make your webpage to Progressive
>web app
>
>i have tried
>
>django-pwa and other package
>

It's not exactly plug n play but I like the way wq uses Django to create a PWA.

https://wq.io/

-- 
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/11E77043-547A-4736-897A-E3361CC2BFE5%40fattuba.com.


Re: Campo auto incremento

2020-07-22 Thread carlos
https://docs.djangoproject.com/en/3.0/topics/db/models/#automatic-primary-key-fields

On Wed, Jul 22, 2020 at 6:52 PM Velho Oeste Truck 
wrote:

> Pessoal, estou com uma duvida, se alguém puder me ajudar.
>
> criei inicialmente um model sem ID, o Django então gerou a padrao...só
> que estou trabalhando com Oracle 11, o Django gera esse campo como auto
> incremento e o Oracle na versao 11 nao comporta...
>
> Alterei minha model então, gerando minha pk, exclui o arquivo initial.py
> executando novamente o makemigrate..detalhe, o django continua gerando o
> campo auto increment da maneira dele...
>
> esse é o campo na minha model
>
> id = models.IntegerField(primary_key=True),
>
>
>
> esse é o gerado no arquivo initial
>
> ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 
> verbose_name='ID')),
>
>
> como fazer o Django  criar exatamente da maneira que estou passando na
> model..
>
>
> --
> 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/d020d60b-4dde-4e09-861a-cac5c777fe33o%40googlegroups.com
> 
> .
>


-- 
att.
Carlos Rocha

-- 
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/CAM-7rO3hYZKH-2DVD9X8xOc9k85HeSE90A_RHPN157CDornA9w%40mail.gmail.com.


Campo auto incremento

2020-07-22 Thread Velho Oeste Truck
Pessoal, estou com uma duvida, se alguém puder me ajudar.

criei inicialmente um model sem ID, o Django então gerou a padrao...só  que 
estou trabalhando com Oracle 11, o Django gera esse campo como auto 
incremento e o Oracle na versao 11 nao comporta...

Alterei minha model então, gerando minha pk, exclui o arquivo initial.py  
executando novamente o makemigrate..detalhe, o django continua gerando o 
campo auto increment da maneira dele... 

esse é o campo na minha model

id = models.IntegerField(primary_key=True),



esse é o gerado no arquivo initial

('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, 
verbose_name='ID')),


como fazer o Django  criar exatamente da maneira que estou passando na 
model..


-- 
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/d020d60b-4dde-4e09-861a-cac5c777fe33o%40googlegroups.com.


Re: RES: Help me pleace

2020-07-22 Thread Nikola Tesla



Please, can you send some screenshots of the code related to your 
question?


--
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/e257ff05-6c7e-0606-0ee7-546370ede0df%40gmail.com.


Re: Need Help : Custom User Model

2020-07-22 Thread Exactly musty
Reach me I would give you my github repo to copy it from

-- 
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/f0600b77-38c4-4ea7-9c40-28ba8f8416c0o%40googlegroups.com.


Re: Need Help : Custom User Model

2020-07-22 Thread Exactly musty
Months ago I was looking for those same thing, I read the doc but wasnt 
clear enough I had to follow tutorials not until I learnt it, now I use it 
on all my project, which i added django allauth but i recommend reading 
this and following this tutorial, if you a newbie custom user model can be 
a pain in the ass 
https://testdriven.io/blog/django-custom-user-model/ read and follow this 
tutorial,if you dont understand I can give you a github repo which I do 
copy from to start other project 
On Wednesday, July 22, 2020 at 8:31:41 PM UTC+1, Joel T wrote:
>
> I'm a newbie to web development and more so with the use of django. How do 
> I create a custom user model that has additional fields for other users of 
> my web app while keeping the default django user model for myself - 
> mid-project. I appreciate the help. 
> 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/d871ea15-457e-47d3-8127-4f3326660b05o%40googlegroups.com.


Need Help : Custom User Model

2020-07-22 Thread Joel T
I'm a newbie to web development and more so with the use of django. How do I 
create a custom user model that has additional fields for other users of my web 
app while keeping the default django user model for myself - mid-project. I 
appreciate the help.
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/91f849a9-f7e8-4254-9088-a0c22b5b96e0o%40googlegroups.com.


Re: Not found media/some.jpg

2020-07-22 Thread Mangal Is Back
there is a person who do not want that i could help you
Sorrry

On Wed, Jul 22, 2020 at 8:33 AM Exactly musty 
wrote:

> delete the media folder and add image again from your admin
>
>
>
>
> On Wednesday, July 22, 2020 at 3:56:35 AM UTC+1, Salima Begum wrote:
>>
>> Hi all,
>> Here, i am using three image fields in PostAd form. Images are not saved
>> to the media folder. Can anyone help me please.
>>
>> In models.py
>>
>> class classifieds(models.Model):
>> title = models.CharField(max_length=60)
>> description = models.CharField(max_length=600)
>> price = models.IntegerField()
>> image = models.ImageField(upload_to='photo/', null=True, blank=True)
>> image2 = models.ImageField(upload_to='photo/', null=True, blank=True)
>> image3 = models.ImageField(upload_to='photo/', null=True, blank=True)
>> added_date = models.DateTimeField(editable=False)
>> modified_date = models.DateTimeField()
>>
>> In settings.py:
>>
>> MEDIA_ROOT = os.path.join(BASE_DIR,'media')
>> MEDIA_URL = *'/media/'*
>>
>> In urls.py(project urls):
>>
>> urlpatterns += static(settings.MEDIA_URL,
>> document_root=settings.MEDIA_ROOT)
>>
>> In views.py:
>>
>> snippet of views.py
>>
>> if request.method == 'POST':
>> title = request.POST['title']
>> description = request.POST['description']
>> price = request.POST['price']
>> image = request.POST['image']
>> image1 = request.POST['image1']
>> image2 = request.POST['image2']
>>
>> I am getting this error
>>
>> Thanks in advance
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/70cd5015-b614-4d58-9a94-3bfe5818630bo%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/CAMMJTYJc8-0yoHw2F8eZRk8i91ZCjvrj8QDiMpioK6ugW%3DGX0w%40mail.gmail.com.


RES: Help me pleace

2020-07-22 Thread Samuel Nogueira
Please, can you send some screenshots of the code related to your question? De: Nikola TeslaEnviado:quarta-feira, 22 de julho de 2020 14:52Para: django-users@googlegroups.comAssunto: Help me pleace Hi, I'm trying to get the sender's email in the headers of my email (I mean my blog's contact form). When the visitor sends me a message through my blog's contact form, I want his email to appear in the section that says From... attach an image How can I set it up so that it reaches me correctly? -- 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/60523d43-20aa-77d9-b2e3-b912be6ecca6%40gmail.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/A4032B2F-1E50-49DB-B9FA-70E9EE0A4350%40hxcore.ol.


Django key/value JSON widget

2020-07-22 Thread Federico Capoano
Hey everyone,

I'm looking for a key/value widget to edit a JSON flat object, like this 
widget here: 
https://django-hstore.readthedocs.io/en/latest/#django-admin-widget (I made 
this one a while ago, but I'm not maintaining that project anymore).

But I'm having no luck in finding it, there must already be some, right?

Thanks in advance
Federico

-- 
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/e47d28d9-78dc-49d1-ad18-ffe81acdbeabn%40googlegroups.com.


Help me pleace

2020-07-22 Thread Nikola Tesla
/Hi, I'm trying to get the sender's email in the headers of my email (I 
mean my blog's contact form). When the visitor sends me a message 
through my blog's contact form, I want his email to appear in the 
section that says From... attach an image

/

/How can I set it up so that it reaches me correctly?/

--
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/60523d43-20aa-77d9-b2e3-b912be6ecca6%40gmail.com.


Re: Django Rest Framework

2020-07-22 Thread Shishir Jha
Did you solve it?

On Wed, 22 Jul 2020, 5:10 pm mishra39076,  wrote:

> I wan to fetch logged-in username using request but i am not getting it in
> departmentAndDesignationManagement/views.py
> If anyone can help me then please suggest me.
> I attached screenshots of companyRegistrationAndLoginApplication/views.py
> departmentAndDesignationManagement/views.py and their serializers.
>
>
> --
> 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/0d242052-b5c5-4ec1-80d5-e19fdbe1beb4n%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/CA%2BC7wFQ9ujX%2BricN_1vJFdZ1GOK7ZZgwMwBbK1brSZBMR0hMBQ%40mail.gmail.com.


Re: Get Personal and maching Horoscope

2020-07-22 Thread Yamen Gamal Eldin
Even though that question don't belong here.
but i guess you should think abt three things:
1 - get and show the data you need to/after processing " birthdays -
matchers"
2 - condition on matching "Which horoscope matches with the other"
3 - how to store the data and the business rule " where to store those
birthdays and in what format - where to store the information of the
matching rules"

That's how i am going to think abt it anyways.
Good day.

On Wed, Jul 22, 2020 at 1:39 PM Tobi DEGNON  wrote:

> This is not really Django related, you will better off doing a Google
> search.
>
> Le mer. 22 juill. 2020 11 h 13, Ashutosh Mishra <
> ashutoshmishra...@gmail.com> a écrit :
>
>> I want to create api's to get personal horoscope and the matching
>> horoscope by providing
>> date of birth for girl and boy,some one plz guide how  can we do this
>>
>> --
>> 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/76f166af-28e2-4c9e-b847-528773f55e31n%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/CACeK5bmywn54wB8JdBgo%2Bt03mTb5kU3SxbX3EvOzOzPu3i_S9Q%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/CAOwHV6-PHD9j5%2BtOAk3k9ZC3JLHhuUHkXdwddMxcNmM-NRFF-A%40mail.gmail.com.


Re: Import csv file on django view

2020-07-22 Thread Liu Zheng
Hi,

Are you sure that the file used for detection is the same as the file
opened and decoded and gave you incorrect information?

By the way, ascii is a proper subset of utf-8. If chardet said it ascii,
decoding it using utf-8 should always work.

If your file contains non-ascii UTF-8 bytes, maybe it’s a bug in chardet?
You can try it directly, without mixing it with django’s requests first.
Make sure you can detect and decode the file locally in a test program.
Then put it into the app.

If you share the file, i’m also glad to help you try it.

On Thu, 23 Jul 2020 at 12:04 AM, Ronaldo Mata 
wrote:

> Hi Kovy, this is not solved. Liu Zheng but using
> chardet(request.FILES['file'].read()) return encoding "ascii" is not
> correct, I've uploaded a file using utf-7 as encoding for example and the
> result is wrog. and then I tried
> request.FILES['file'].read().decode('ascii') and not work return bad data.
> Example for @ string return "+AEA-" string.
>
> El mié., 22 jul. 2020 a las 11:16, Kovy Jacob ()
> escribió:
>
>> I’m confused. I don’t know if I can help.
>>
>> On Jul 22, 2020, at 11:11 AM, Liu Zheng  wrote:
>>
>> Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and
>> the chardet file handler are binary handlers. Binary handler presents the
>> raw data. chardet takes a sequence or raw data and then detect the encoding
>> format. With its prediction, if you want to open that puece of data in text
>> mode, you can use the .decode() method of bytes object to
>> get a python string.
>>
>> On Wed, 22 Jul 2020 at 11:04 PM, Kovy Jacob  wrote:
>>
>>> That’s probably not the proper answer, but that’s the best I can do.
>>> Sorry :-(
>>>
>>>
>>> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata 
>>> wrote:
>>>
>>> Yes, the problem here is that the files will be loaded by the user, so I
>>> don't know what delimiter I will receive. This is not a base command that I
>>> am using, it is the logic that I want to incorporate in a view
>>>
>>> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob ()
>>> escribió:
>>>
 Ah, so is the problem that you don’t always know what the delimiter is
 when you read it? If yes, what is the use case for this? You might not need
 a universal solution, maybe just put all the info into a csv yourself,
 manually.

 On Jul 22, 2020, at 10:39 AM, Ronaldo Mata 
 wrote:

 Hi Kovy, I'm using csv module, but I need to handle the delimiters of
 the files, sometimes you come separated by "," others by ";" and rarely by
 "|"

 El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ()
 escribió:

> Could you just use the standard python csv module?
>
> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata 
> wrote:
>
> Hi Liu thank for your answer.
>
> This has been a headache, I am trying to read the file using
> csv.DictReader initially i had an error trying to get the dict keys when
> iterating by rows, and i thought it could be encoding (for this reason i
> wanted to prepare the view to use the correct encoding). for that reason I
> asked my question.
>
> 1) your first approach doesn't work, if i send utf-8 file, chardet
> returns ascii as encoding. it seems request.FILES ['file']. read () 
> returns
> a binary with that encoding.
>
> 2) In the end I realized that the problem was the delimiter of the csv
> but predicting it is another problem.
>
> Anyway, it was a task that I had to do and that was my limitation. I
> think there must be a library that does all this, uploading a csv file is
> common practice in many web apps.
>
> El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
> escribió:
>
>> Hi. First of all, I think it's impossible to perfectly detect
>> encoding without further information. See the answer in this SO post:
>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>>  There
>> are many packages and tools to help detect encoding format, but keep in
>> mind that they are only giving educated guesses. (Most of the time, the
>> guess is correct, but do check the dev page to see whether there are 
>> known
>> issues related to your problem.)
>>
>> Now let's say you have decided to use chardet. Check its doc page for
>> the usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
>> You'll
>> have more than one solutions. Here are some examples:
>>
>> 1. If the files uploaded to your server are all expected to be small
>> csv files (less than a few MB and not many users do it concurrently), you
>> can do the following:
>>
>> #in the view to handle the uploaded file: (assume file input name is
>> just "file")
>> file_content = request.FILES['file'].read()
>> chardet.detect(file_content)
>>
>> 2. Also, chardet seems to support incremental (line-by-line)
>> detection
>> 

Re: Import csv file on django view

2020-07-22 Thread Ronaldo Mata
Hi Kovy, this is not solved. Liu Zheng but using
chardet(request.FILES['file'].read()) return encoding "ascii" is not
correct, I've uploaded a file using utf-7 as encoding for example and the
result is wrog. and then I tried
request.FILES['file'].read().decode('ascii') and not work return bad data.
Example for @ string return "+AEA-" string.

El mié., 22 jul. 2020 a las 11:16, Kovy Jacob ()
escribió:

> I’m confused. I don’t know if I can help.
>
> On Jul 22, 2020, at 11:11 AM, Liu Zheng  wrote:
>
> Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and
> the chardet file handler are binary handlers. Binary handler presents the
> raw data. chardet takes a sequence or raw data and then detect the encoding
> format. With its prediction, if you want to open that puece of data in text
> mode, you can use the .decode() method of bytes object to
> get a python string.
>
> On Wed, 22 Jul 2020 at 11:04 PM, Kovy Jacob  wrote:
>
>> That’s probably not the proper answer, but that’s the best I can do.
>> Sorry :-(
>>
>>
>> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata 
>> wrote:
>>
>> Yes, the problem here is that the files will be loaded by the user, so I
>> don't know what delimiter I will receive. This is not a base command that I
>> am using, it is the logic that I want to incorporate in a view
>>
>> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob ()
>> escribió:
>>
>>> Ah, so is the problem that you don’t always know what the delimiter is
>>> when you read it? If yes, what is the use case for this? You might not need
>>> a universal solution, maybe just put all the info into a csv yourself,
>>> manually.
>>>
>>> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata 
>>> wrote:
>>>
>>> Hi Kovy, I'm using csv module, but I need to handle the delimiters of
>>> the files, sometimes you come separated by "," others by ";" and rarely by
>>> "|"
>>>
>>> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ()
>>> escribió:
>>>
 Could you just use the standard python csv module?

 On Jul 22, 2020, at 10:25 AM, Ronaldo Mata 
 wrote:

 Hi Liu thank for your answer.

 This has been a headache, I am trying to read the file using
 csv.DictReader initially i had an error trying to get the dict keys when
 iterating by rows, and i thought it could be encoding (for this reason i
 wanted to prepare the view to use the correct encoding). for that reason I
 asked my question.

 1) your first approach doesn't work, if i send utf-8 file, chardet
 returns ascii as encoding. it seems request.FILES ['file']. read () returns
 a binary with that encoding.

 2) In the end I realized that the problem was the delimiter of the csv
 but predicting it is another problem.

 Anyway, it was a task that I had to do and that was my limitation. I
 think there must be a library that does all this, uploading a csv file is
 common practice in many web apps.

 El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
 escribió:

> Hi. First of all, I think it's impossible to perfectly detect encoding
> without further information. See the answer in this SO post:
> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>  There
> are many packages and tools to help detect encoding format, but keep in
> mind that they are only giving educated guesses. (Most of the time, the
> guess is correct, but do check the dev page to see whether there are known
> issues related to your problem.)
>
> Now let's say you have decided to use chardet. Check its doc page for
> the usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
> You'll
> have more than one solutions. Here are some examples:
>
> 1. If the files uploaded to your server are all expected to be small
> csv files (less than a few MB and not many users do it concurrently), you
> can do the following:
>
> #in the view to handle the uploaded file: (assume file input name is
> just "file")
> file_content = request.FILES['file'].read()
> chardet.detect(file_content)
>
> 2. Also, chardet seems to support incremental (line-by-line) detection
> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>
> Given this, we can also read from requests.FILES line by line and pass
> each line to chardet
>
> from chardet.universaldetector import UniversalDetector
>
> #somewhere in a view function
> detector = UniversalDetector()
> file_handle = request.FILES['file']
> for line in file_handle:
> detector.feed(line)
> if detector.done: break
> detector.close()
> # result available as a dict at detector.result
>
>
>
>
>
> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>>
>> How to deal with encoding when you try to read a csv file on view.
>>

Re: New Comer Alert !!!

2020-07-22 Thread george kwakye addo
David, you are welcome to this wonderful django group. Let us know any
problem you come along with. We are all here to help one another. THANK YOU

On Tue, 21 Jul 2020 at 21:06, kyenshak david 
wrote:

> Hello everyone, my name is David. I'm new to django. I've been doing
> django for Four months now and i must say I've enjoyed every bit of it.
> Though i encountered challenges errors along the way, but its all worth
> it. once again i'm glad to be here and am happy to meet you guys.
> and please if there's a Whatsapp group or any social media platform you
> guys recommend, i'd be happy to join
>
> 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/d98d3ef4-1859-4bb9-99eb-98591a1e61aeo%40googlegroups.com
> 
> .
>


-- 
George Kwakye Addo | Agriculture Scientist. Web/Software Developer
Tel: 0268971091 | Email: georgeka...@gmail.com/georgekwakyea...@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/CALDvOL0a3kKLV%3DbTN-CWufHSRhpiyy%3DQxTOQYVKGEkR7rPBaug%40mail.gmail.com.


Re: A short question:

2020-07-22 Thread Ronaldo Mata
Hi Hadisur Rahman, you can try to use selenium (web automation) or try to
find an API call into DevTools > Network > XHR

El mié., 22 jul. 2020 a las 11:41, Hadisur Rahman ()
escribió:

> One of the websites we are going to scrape uses dynamic content loading
> via JavaScript. How would you overcome that?
>
> --
> 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/b7f88647-02b2-4c8a-a9cc-154e2d33cea7n%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/CAP%3DoziRYAMrhZP-4hX_yaHRNceW1QuFhqvzhS4fN-0UmgA3PmQ%40mail.gmail.com.


A short question:

2020-07-22 Thread Hadisur Rahman
One of the websites we are going to scrape uses dynamic content loading via 
JavaScript. How would you overcome that?

-- 
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/b7f88647-02b2-4c8a-a9cc-154e2d33cea7n%40googlegroups.com.


Re: How to trace circular import error Django never solved!! Please sort this out.

2020-07-22 Thread Chaitanya Sai
Thanks for your reply guys. I figured it out. I have typo of serializer
name in serilizers.py which is causing the error.
Damn, I spend 4 hours into this.

On Wed, Jul 22, 2020 at 11:22 AM Liu Zheng  wrote:

> Hi,
>
> Probably not enough to look at urls.py files only. My guess: Do you use
> ‘reverse’ function anywhere in covid app? If so, here’s a circular import:
>
> urls.py imports covid urls -> covid urls import covid views -> one covid
> view uses reverse -> reverse import urls.py of the project (to look up the
> url with the end point name).
>
> A quick fix will be using lazy_reverse instead of reverse.
>
> On Wed, 22 Jul 2020 at 10:22 PM, sandeep kumar 
> wrote:
>
>> I have faced this issue atleast 100 times..:)
>>
>> Her are the steps (sorry, I could not find a better way):
>>
>> 1. comment urls in urls.py (inside individual app)
>> 2. check if you still have issue
>> 2a. if you do not have issue, then you probably have not defined views
>> for some of the urls
>> 2b. if you still see the error, comment 'impot views' statement.
>> 3a. if the issue is gone after commenting 'import views' then check
>> views.py file, it must have some typos (e.g., misalignment, accidental
>> copying of some special character etc.)
>> 3b. if the issue is not gone even after commenting 'import views', let me
>> know. I am not sure I have reached that stage ever..:)
>>
>> Hope this helps.
>>
>> Thanks,
>> Sandeep
>>
>> --
>> *Dr. Sandeep Kumar,*
>> Postdoctoral Researcher,
>> Lunenfeld Tanenbaum Research Institute,
>> Mount Sinai Hospital,
>> 600 University Ave,
>> 
>> Toronto, Ontario
>> 
>> Canada
>> 
>> http://individual.utoronto.ca/sandeepkumar/
>>
>>
>> On Wed, Jul 22, 2020 at 10:12 AM Chaitanya Sai 
>> wrote:
>>
>>> Hello Django users,
>>> Is there not even single person who can solve this issue??
>>>
>>>
>>> On Tue, Jul 21, 2020 at 8:09 PM Sai  wrote:
>>>
 I am working Django rest framework api project, where I had multiple
 apps in the project. I got a circular import error when I am adding the app
 URLs to the main URLs. I Tried everything checked spellings, checked app
 structure but no use. Its been really frustrating with issue..please help
 to solve the problem. The app is working fine when I take off newly added
 line `path("covid/", include("Covid.urls")),`

 I am using python3.6, django 3.0.4 and django-rest-framework 3.11.0

 Here is project
 **urls.py**


 from django.contrib import admin
 from django.conf.urls import url
 from django.urls import path, include
 from rest_framework_swagger.views import get_swagger_view

 schema_view = get_swagger_view(title='TmmrwInc API Documentation')

 urlpatterns = [
 path('admin/', admin.site.urls),
 # path('', include('django.contrib.auth.urls')),
 # path('rest_auth/', include('rest_auth.urls')),
 path('api/password_reset/',
 include('django_rest_passwordreset.urls',
 namespace='password_reset')),
 # url(r'^invitations/', include('invitations.urls',
 namespace='invitations')),
 path('', include('rest_invitations.urls')),
 path("", include("UserAuth.urls")),
 path("doctors/", include("Administration.urls")),
 path("appointments/", include("Appointments.urls")),
 path("messaging/", include("messaging.urls")),
 path("meet/", include("meet.urls")),
 path("api_documentation/", schema_view),
 path("covid/", include("Covid.urls")),
 ]

 This is app **urls.py** file

 from django.urls import path
 from . import views

 app_name = 'Covid'

 urlpatterns = [
 path('event/', views.EventBookingView.as_view()),
 ]

 **settings.py** installed apps

 ALLOWED_HOSTS = ['*']


 # Application definition

 INSTALLED_APPS = [
 "django.contrib.admin",
 "django.contrib.auth",
 "django.contrib.sites",
 "django.contrib.contenttypes",
 "django.contrib.sessions",
 "django.contrib.messages",
 "django.contrib.staticfiles",
 "UserAuth",
 "rest_framework",
 "corsheaders",
 'rest_framework.authtoken',
 'rest_auth',
 'Appointments',
 'messaging',
 'Administration',
 'channels',
 'invitations',
 'rest_invitations',
 'django_rest_passwordreset',
 'django_celery_beat',

Re: How to trace circular import error Django never solved!! Please sort this out.

2020-07-22 Thread Liu Zheng
Hi,

Probably not enough to look at urls.py files only. My guess: Do you use
‘reverse’ function anywhere in covid app? If so, here’s a circular import:

urls.py imports covid urls -> covid urls import covid views -> one covid
view uses reverse -> reverse import urls.py of the project (to look up the
url with the end point name).

A quick fix will be using lazy_reverse instead of reverse.

On Wed, 22 Jul 2020 at 10:22 PM, sandeep kumar 
wrote:

> I have faced this issue atleast 100 times..:)
>
> Her are the steps (sorry, I could not find a better way):
>
> 1. comment urls in urls.py (inside individual app)
> 2. check if you still have issue
> 2a. if you do not have issue, then you probably have not defined views for
> some of the urls
> 2b. if you still see the error, comment 'impot views' statement.
> 3a. if the issue is gone after commenting 'import views' then check
> views.py file, it must have some typos (e.g., misalignment, accidental
> copying of some special character etc.)
> 3b. if the issue is not gone even after commenting 'import views', let me
> know. I am not sure I have reached that stage ever..:)
>
> Hope this helps.
>
> Thanks,
> Sandeep
>
> --
> *Dr. Sandeep Kumar,*
> Postdoctoral Researcher,
> Lunenfeld Tanenbaum Research Institute,
> Mount Sinai Hospital,
> 600 University Ave,
> 
> Toronto, Ontario
> 
> Canada
> 
> http://individual.utoronto.ca/sandeepkumar/
>
>
> On Wed, Jul 22, 2020 at 10:12 AM Chaitanya Sai 
> wrote:
>
>> Hello Django users,
>> Is there not even single person who can solve this issue??
>>
>>
>> On Tue, Jul 21, 2020 at 8:09 PM Sai  wrote:
>>
>>> I am working Django rest framework api project, where I had multiple
>>> apps in the project. I got a circular import error when I am adding the app
>>> URLs to the main URLs. I Tried everything checked spellings, checked app
>>> structure but no use. Its been really frustrating with issue..please help
>>> to solve the problem. The app is working fine when I take off newly added
>>> line `path("covid/", include("Covid.urls")),`
>>>
>>> I am using python3.6, django 3.0.4 and django-rest-framework 3.11.0
>>>
>>> Here is project
>>> **urls.py**
>>>
>>>
>>> from django.contrib import admin
>>> from django.conf.urls import url
>>> from django.urls import path, include
>>> from rest_framework_swagger.views import get_swagger_view
>>>
>>> schema_view = get_swagger_view(title='TmmrwInc API Documentation')
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> # path('', include('django.contrib.auth.urls')),
>>> # path('rest_auth/', include('rest_auth.urls')),
>>> path('api/password_reset/',
>>> include('django_rest_passwordreset.urls',
>>> namespace='password_reset')),
>>> # url(r'^invitations/', include('invitations.urls',
>>> namespace='invitations')),
>>> path('', include('rest_invitations.urls')),
>>> path("", include("UserAuth.urls")),
>>> path("doctors/", include("Administration.urls")),
>>> path("appointments/", include("Appointments.urls")),
>>> path("messaging/", include("messaging.urls")),
>>> path("meet/", include("meet.urls")),
>>> path("api_documentation/", schema_view),
>>> path("covid/", include("Covid.urls")),
>>> ]
>>>
>>> This is app **urls.py** file
>>>
>>> from django.urls import path
>>> from . import views
>>>
>>> app_name = 'Covid'
>>>
>>> urlpatterns = [
>>> path('event/', views.EventBookingView.as_view()),
>>> ]
>>>
>>> **settings.py** installed apps
>>>
>>> ALLOWED_HOSTS = ['*']
>>>
>>>
>>> # Application definition
>>>
>>> INSTALLED_APPS = [
>>> "django.contrib.admin",
>>> "django.contrib.auth",
>>> "django.contrib.sites",
>>> "django.contrib.contenttypes",
>>> "django.contrib.sessions",
>>> "django.contrib.messages",
>>> "django.contrib.staticfiles",
>>> "UserAuth",
>>> "rest_framework",
>>> "corsheaders",
>>> 'rest_framework.authtoken',
>>> 'rest_auth',
>>> 'Appointments',
>>> 'messaging',
>>> 'Administration',
>>> 'channels',
>>> 'invitations',
>>> 'rest_invitations',
>>> 'django_rest_passwordreset',
>>> 'django_celery_beat',
>>> 'meet',
>>> 'rest_framework_swagger',
>>>  'Covid',
>>>
>>> ]
>>>
>>> This is a project structure
>>>
>>> [Project Structure][1]
>>>
>>>
>>>   [1]: https://i.stack.imgur.com/E8qro.jpg
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe 

Re: Import csv file on django view

2020-07-22 Thread Liu Zheng
What i meant was that you can only feed binary data or binary handlers to
chardet. You can decode the binary data according to the detection results
afterward.

On Wed, 22 Jul 2020 at 11:11 PM, Liu Zheng  wrote:

> Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and
> the chardet file handler are binary handlers. Binary handler presents the
> raw data. chardet takes a sequence or raw data and then detect the encoding
> format. With its prediction, if you want to open that puece of data in text
> mode, you can use the .decode() method of bytes object to
> get a python string.
>
> On Wed, 22 Jul 2020 at 11:04 PM, Kovy Jacob  wrote:
>
>> That’s probably not the proper answer, but that’s the best I can do.
>> Sorry :-(
>>
>>
>> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata 
>> wrote:
>>
>> Yes, the problem here is that the files will be loaded by the user, so I
>> don't know what delimiter I will receive. This is not a base command that I
>> am using, it is the logic that I want to incorporate in a view
>>
>> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob ()
>> escribió:
>>
>>> Ah, so is the problem that you don’t always know what the delimiter is
>>> when you read it? If yes, what is the use case for this? You might not need
>>> a universal solution, maybe just put all the info into a csv yourself,
>>> manually.
>>>
>>> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata 
>>> wrote:
>>>
>>> Hi Kovy, I'm using csv module, but I need to handle the delimiters of
>>> the files, sometimes you come separated by "," others by ";" and rarely by
>>> "|"
>>>
>>> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ()
>>> escribió:
>>>
 Could you just use the standard python csv module?

 On Jul 22, 2020, at 10:25 AM, Ronaldo Mata 
 wrote:

 Hi Liu thank for your answer.

 This has been a headache, I am trying to read the file using
 csv.DictReader initially i had an error trying to get the dict keys when
 iterating by rows, and i thought it could be encoding (for this reason i
 wanted to prepare the view to use the correct encoding). for that reason I
 asked my question.

 1) your first approach doesn't work, if i send utf-8 file, chardet
 returns ascii as encoding. it seems request.FILES ['file']. read () returns
 a binary with that encoding.

 2) In the end I realized that the problem was the delimiter of the csv
 but predicting it is another problem.

 Anyway, it was a task that I had to do and that was my limitation. I
 think there must be a library that does all this, uploading a csv file is
 common practice in many web apps.

 El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
 escribió:

> Hi. First of all, I think it's impossible to perfectly detect encoding
> without further information. See the answer in this SO post:
> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>  There
> are many packages and tools to help detect encoding format, but keep in
> mind that they are only giving educated guesses. (Most of the time, the
> guess is correct, but do check the dev page to see whether there are known
> issues related to your problem.)
>
> Now let's say you have decided to use chardet. Check its doc page for
> the usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
> You'll
> have more than one solutions. Here are some examples:
>
> 1. If the files uploaded to your server are all expected to be small
> csv files (less than a few MB and not many users do it concurrently), you
> can do the following:
>
> #in the view to handle the uploaded file: (assume file input name is
> just "file")
> file_content = request.FILES['file'].read()
> chardet.detect(file_content)
>
> 2. Also, chardet seems to support incremental (line-by-line) detection
> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>
> Given this, we can also read from requests.FILES line by line and pass
> each line to chardet
>
> from chardet.universaldetector import UniversalDetector
>
> #somewhere in a view function
> detector = UniversalDetector()
> file_handle = request.FILES['file']
> for line in file_handle:
> detector.feed(line)
> if detector.done: break
> detector.close()
> # result available as a dict at detector.result
>
>
>
>
>
> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>>
>> How to deal with encoding when you try to read a csv file on view.
>>
>> I have a view to upload csv file, in this view I read file and save
>> each row as new record.
>>
>> My bug is when I try to upload a csv file with a differente encoding
>> (not UTF-8)
>>
>> how to handle this on django (using request.FILES) I was researching

Re: Import csv file on django view

2020-07-22 Thread Liu Zheng
Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and
the chardet file handler are binary handlers. Binary handler presents the
raw data. chardet takes a sequence or raw data and then detect the encoding
format. With its prediction, if you want to open that puece of data in text
mode, you can use the .decode() method of bytes object to
get a python string.

On Wed, 22 Jul 2020 at 11:04 PM, Kovy Jacob  wrote:

> That’s probably not the proper answer, but that’s the best I can do. Sorry
> :-(
>
>
> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata 
> wrote:
>
> Yes, the problem here is that the files will be loaded by the user, so I
> don't know what delimiter I will receive. This is not a base command that I
> am using, it is the logic that I want to incorporate in a view
>
> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob ()
> escribió:
>
>> Ah, so is the problem that you don’t always know what the delimiter is
>> when you read it? If yes, what is the use case for this? You might not need
>> a universal solution, maybe just put all the info into a csv yourself,
>> manually.
>>
>> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata 
>> wrote:
>>
>> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the
>> files, sometimes you come separated by "," others by ";" and rarely by "|"
>>
>> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ()
>> escribió:
>>
>>> Could you just use the standard python csv module?
>>>
>>> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata 
>>> wrote:
>>>
>>> Hi Liu thank for your answer.
>>>
>>> This has been a headache, I am trying to read the file using
>>> csv.DictReader initially i had an error trying to get the dict keys when
>>> iterating by rows, and i thought it could be encoding (for this reason i
>>> wanted to prepare the view to use the correct encoding). for that reason I
>>> asked my question.
>>>
>>> 1) your first approach doesn't work, if i send utf-8 file, chardet
>>> returns ascii as encoding. it seems request.FILES ['file']. read () returns
>>> a binary with that encoding.
>>>
>>> 2) In the end I realized that the problem was the delimiter of the csv
>>> but predicting it is another problem.
>>>
>>> Anyway, it was a task that I had to do and that was my limitation. I
>>> think there must be a library that does all this, uploading a csv file is
>>> common practice in many web apps.
>>>
>>> El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
>>> escribió:
>>>
 Hi. First of all, I think it's impossible to perfectly detect encoding
 without further information. See the answer in this SO post:
 https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
  There
 are many packages and tools to help detect encoding format, but keep in
 mind that they are only giving educated guesses. (Most of the time, the
 guess is correct, but do check the dev page to see whether there are known
 issues related to your problem.)

 Now let's say you have decided to use chardet. Check its doc page for
 the usage: https://chardet.readthedocs.io/en/latest/usage.html#usage You'll
 have more than one solutions. Here are some examples:

 1. If the files uploaded to your server are all expected to be small
 csv files (less than a few MB and not many users do it concurrently), you
 can do the following:

 #in the view to handle the uploaded file: (assume file input name is
 just "file")
 file_content = request.FILES['file'].read()
 chardet.detect(file_content)

 2. Also, chardet seems to support incremental (line-by-line) detection
 https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally

 Given this, we can also read from requests.FILES line by line and pass
 each line to chardet

 from chardet.universaldetector import UniversalDetector

 #somewhere in a view function
 detector = UniversalDetector()
 file_handle = request.FILES['file']
 for line in file_handle:
 detector.feed(line)
 if detector.done: break
 detector.close()
 # result available as a dict at detector.result





 On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>
> How to deal with encoding when you try to read a csv file on view.
>
> I have a view to upload csv file, in this view I read file and save
> each row as new record.
>
> My bug is when I try to upload a csv file with a differente encoding
> (not UTF-8)
>
> how to handle this on django (using request.FILES) I was researching
> and I found chardet but I don't know how to pass it a request.FILES. I 
> need
> help please.
>

 --
 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 

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
I’m confused. I don’t know if I can help.

> On Jul 22, 2020, at 11:11 AM, Liu Zheng  wrote:
> 
> Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and the 
> chardet file handler are binary handlers. Binary handler presents the raw 
> data. chardet takes a sequence or raw data and then detect the encoding 
> format. With its prediction, if you want to open that puece of data in text 
> mode, you can use the .decode() method of bytes object to 
> get a python string.
> 
> On Wed, 22 Jul 2020 at 11:04 PM, Kovy Jacob  > wrote:
> That’s probably not the proper answer, but that’s the best I can do. Sorry :-(
> 
> 
>> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata > > wrote:
>> 
>> Yes, the problem here is that the files will be loaded by the user, so I 
>> don't know what delimiter I will receive. This is not a base command that I 
>> am using, it is the logic that I want to incorporate in a view
>> 
>> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob (> >) escribió:
>> Ah, so is the problem that you don’t always know what the delimiter is when 
>> you read it? If yes, what is the use case for this? You might not need a 
>> universal solution, maybe just put all the info into a csv yourself, 
>> manually.
>> 
>>> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata >> > wrote:
>>> 
>>> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the 
>>> files, sometimes you come separated by "," others by ";" and rarely by "|" 
>>> 
>>> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob (>> >) escribió:
>>> Could you just use the standard python csv module?
>>> 
 On Jul 22, 2020, at 10:25 AM, Ronaldo Mata >>> > wrote:
 
 Hi Liu thank for your answer.
 
 This has been a headache, I am trying to read the file using 
 csv.DictReader initially i had an error trying to get the dict keys when 
 iterating by rows, and i thought it could be encoding (for this reason i 
 wanted to prepare the view to use the correct encoding). for that reason I 
 asked my question.
 
 1) your first approach doesn't work, if i send utf-8 file, chardet returns 
 ascii as encoding. it seems request.FILES ['file']. read () returns a 
 binary with that encoding.
 
 2) In the end I realized that the problem was the delimiter of the csv but 
 predicting it is another problem.
 
 Anyway, it was a task that I had to do and that was my limitation. I think 
 there must be a library that does all this, uploading a csv file is common 
 practice in many web apps.
 
 El mar., 21 jul. 2020 a las 13:47, Liu Zheng (>>> >) escribió:
 Hi. First of all, I think it's impossible to perfectly detect encoding 
 without further information. See the answer in this SO post: 
 https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
  
 
  There are many packages and tools to help detect encoding format, but 
 keep in mind that they are only giving educated guesses. (Most of the 
 time, the guess is correct, but do check the dev page to see whether there 
 are known issues related to your problem.)
 
 Now let's say you have decided to use chardet. Check its doc page for the 
 usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
  You'll have 
 more than one solutions. Here are some examples:
 
 1. If the files uploaded to your server are all expected to be small csv 
 files (less than a few MB and not many users do it concurrently), you can 
 do the following:
 
 #in the view to handle the uploaded file: (assume file input name is just 
 "file")
 file_content = request.FILES['file'].read()
 chardet.detect(file_content)
 
 2. Also, chardet seems to support incremental (line-by-line) detection 
 https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
  
 
 
 Given this, we can also read from requests.FILES line by line and pass 
 each line to chardet
 
 from chardet.universaldetector import UniversalDetector
 
 #somewhere in a view function
 detector = UniversalDetector()
 file_handle = request.FILES['file']
 for line in file_handle:
 detector.feed(line)
 if detector.done: break
 detector.close()
 # result available as a dict at detector.result
 
 
 
 
 
 On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
 How to deal with encoding when you 

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
Cool! I’m so happy I was able to help you!! Good luck!

> On Jul 22, 2020, at 11:11 AM, Liu Zheng  wrote:
> 
> Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and the 
> chardet file handler are binary handlers. Binary handler presents the raw 
> data. chardet takes a sequence or raw data and then detect the encoding 
> format. With its prediction, if you want to open that puece of data in text 
> mode, you can use the .decode() method of bytes object to 
> get a python string.
> 
> On Wed, 22 Jul 2020 at 11:04 PM, Kovy Jacob  > wrote:
> That’s probably not the proper answer, but that’s the best I can do. Sorry :-(
> 
> 
>> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata > > wrote:
>> 
>> Yes, the problem here is that the files will be loaded by the user, so I 
>> don't know what delimiter I will receive. This is not a base command that I 
>> am using, it is the logic that I want to incorporate in a view
>> 
>> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob (> >) escribió:
>> Ah, so is the problem that you don’t always know what the delimiter is when 
>> you read it? If yes, what is the use case for this? You might not need a 
>> universal solution, maybe just put all the info into a csv yourself, 
>> manually.
>> 
>>> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata >> > wrote:
>>> 
>>> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the 
>>> files, sometimes you come separated by "," others by ";" and rarely by "|" 
>>> 
>>> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob (>> >) escribió:
>>> Could you just use the standard python csv module?
>>> 
 On Jul 22, 2020, at 10:25 AM, Ronaldo Mata >>> > wrote:
 
 Hi Liu thank for your answer.
 
 This has been a headache, I am trying to read the file using 
 csv.DictReader initially i had an error trying to get the dict keys when 
 iterating by rows, and i thought it could be encoding (for this reason i 
 wanted to prepare the view to use the correct encoding). for that reason I 
 asked my question.
 
 1) your first approach doesn't work, if i send utf-8 file, chardet returns 
 ascii as encoding. it seems request.FILES ['file']. read () returns a 
 binary with that encoding.
 
 2) In the end I realized that the problem was the delimiter of the csv but 
 predicting it is another problem.
 
 Anyway, it was a task that I had to do and that was my limitation. I think 
 there must be a library that does all this, uploading a csv file is common 
 practice in many web apps.
 
 El mar., 21 jul. 2020 a las 13:47, Liu Zheng (>>> >) escribió:
 Hi. First of all, I think it's impossible to perfectly detect encoding 
 without further information. See the answer in this SO post: 
 https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
  
 
  There are many packages and tools to help detect encoding format, but 
 keep in mind that they are only giving educated guesses. (Most of the 
 time, the guess is correct, but do check the dev page to see whether there 
 are known issues related to your problem.)
 
 Now let's say you have decided to use chardet. Check its doc page for the 
 usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
  You'll have 
 more than one solutions. Here are some examples:
 
 1. If the files uploaded to your server are all expected to be small csv 
 files (less than a few MB and not many users do it concurrently), you can 
 do the following:
 
 #in the view to handle the uploaded file: (assume file input name is just 
 "file")
 file_content = request.FILES['file'].read()
 chardet.detect(file_content)
 
 2. Also, chardet seems to support incremental (line-by-line) detection 
 https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
  
 
 
 Given this, we can also read from requests.FILES line by line and pass 
 each line to chardet
 
 from chardet.universaldetector import UniversalDetector
 
 #somewhere in a view function
 detector = UniversalDetector()
 file_handle = request.FILES['file']
 for line in file_handle:
 detector.feed(line)
 if detector.done: break
 detector.close()
 # result available as a dict at detector.result
 
 
 
 
 
 On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
 How to deal with 

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
That’s probably not the proper answer, but that’s the best I can do. Sorry :-(

> On Jul 22, 2020, at 10:46 AM, Ronaldo Mata  wrote:
> 
> Yes, the problem here is that the files will be loaded by the user, so I 
> don't know what delimiter I will receive. This is not a base command that I 
> am using, it is the logic that I want to incorporate in a view
> 
> El mié., 22 jul. 2020 a las 10:43, Kovy Jacob ( >) escribió:
> Ah, so is the problem that you don’t always know what the delimiter is when 
> you read it? If yes, what is the use case for this? You might not need a 
> universal solution, maybe just put all the info into a csv yourself, manually.
> 
>> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata > > wrote:
>> 
>> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the 
>> files, sometimes you come separated by "," others by ";" and rarely by "|" 
>> 
>> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob (> >) escribió:
>> Could you just use the standard python csv module?
>> 
>>> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata >> > wrote:
>>> 
>>> Hi Liu thank for your answer.
>>> 
>>> This has been a headache, I am trying to read the file using csv.DictReader 
>>> initially i had an error trying to get the dict keys when iterating by 
>>> rows, and i thought it could be encoding (for this reason i wanted to 
>>> prepare the view to use the correct encoding). for that reason I asked my 
>>> question.
>>> 
>>> 1) your first approach doesn't work, if i send utf-8 file, chardet returns 
>>> ascii as encoding. it seems request.FILES ['file']. read () returns a 
>>> binary with that encoding.
>>> 
>>> 2) In the end I realized that the problem was the delimiter of the csv but 
>>> predicting it is another problem.
>>> 
>>> Anyway, it was a task that I had to do and that was my limitation. I think 
>>> there must be a library that does all this, uploading a csv file is common 
>>> practice in many web apps.
>>> 
>>> El mar., 21 jul. 2020 a las 13:47, Liu Zheng (>> >) escribió:
>>> Hi. First of all, I think it's impossible to perfectly detect encoding 
>>> without further information. See the answer in this SO post: 
>>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>>>  
>>> 
>>>  There are many packages and tools to help detect encoding format, but keep 
>>> in mind that they are only giving educated guesses. (Most of the time, the 
>>> guess is correct, but do check the dev page to see whether there are known 
>>> issues related to your problem.)
>>> 
>>> Now let's say you have decided to use chardet. Check its doc page for the 
>>> usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
>>>  You'll have 
>>> more than one solutions. Here are some examples:
>>> 
>>> 1. If the files uploaded to your server are all expected to be small csv 
>>> files (less than a few MB and not many users do it concurrently), you can 
>>> do the following:
>>> 
>>> #in the view to handle the uploaded file: (assume file input name is just 
>>> "file")
>>> file_content = request.FILES['file'].read()
>>> chardet.detect(file_content)
>>> 
>>> 2. Also, chardet seems to support incremental (line-by-line) detection 
>>> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>>>  
>>> 
>>> 
>>> Given this, we can also read from requests.FILES line by line and pass each 
>>> line to chardet
>>> 
>>> from chardet.universaldetector import UniversalDetector
>>> 
>>> #somewhere in a view function
>>> detector = UniversalDetector()
>>> file_handle = request.FILES['file']
>>> for line in file_handle:
>>> detector.feed(line)
>>> if detector.done: break
>>> detector.close()
>>> # result available as a dict at detector.result
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>>> How to deal with encoding when you try to read a csv file on view.
>>> 
>>> I have a view to upload csv file, in this view I read file and save each 
>>> row as new record.
>>> 
>>> My bug is when I try to upload a csv file with a differente encoding (not 
>>> UTF-8)
>>> 
>>> how to handle this on django (using request.FILES) I was researching and I 
>>> found chardet but I don't know how to pass it a request.FILES. I need help 
>>> please.
>>> 
>>> -- 
>>> 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 
>>> .
>>> 

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
Maybe first use the standard file.open to save the file to a variable, search 
that variable for the different delimiters using standard string manipulation 
vichulu, and then open it using the corresponding delimiter.

> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata  wrote:
> 
> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the 
> files, sometimes you come separated by "," others by ";" and rarely by "|" 
> 
> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ( >) escribió:
> Could you just use the standard python csv module?
> 
>> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata > > wrote:
>> 
>> Hi Liu thank for your answer.
>> 
>> This has been a headache, I am trying to read the file using csv.DictReader 
>> initially i had an error trying to get the dict keys when iterating by rows, 
>> and i thought it could be encoding (for this reason i wanted to prepare the 
>> view to use the correct encoding). for that reason I asked my question.
>> 
>> 1) your first approach doesn't work, if i send utf-8 file, chardet returns 
>> ascii as encoding. it seems request.FILES ['file']. read () returns a binary 
>> with that encoding.
>> 
>> 2) In the end I realized that the problem was the delimiter of the csv but 
>> predicting it is another problem.
>> 
>> Anyway, it was a task that I had to do and that was my limitation. I think 
>> there must be a library that does all this, uploading a csv file is common 
>> practice in many web apps.
>> 
>> El mar., 21 jul. 2020 a las 13:47, Liu Zheng (> >) escribió:
>> Hi. First of all, I think it's impossible to perfectly detect encoding 
>> without further information. See the answer in this SO post: 
>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>>  
>> 
>>  There are many packages and tools to help detect encoding format, but keep 
>> in mind that they are only giving educated guesses. (Most of the time, the 
>> guess is correct, but do check the dev page to see whether there are known 
>> issues related to your problem.)
>> 
>> Now let's say you have decided to use chardet. Check its doc page for the 
>> usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
>>  You'll have more 
>> than one solutions. Here are some examples:
>> 
>> 1. If the files uploaded to your server are all expected to be small csv 
>> files (less than a few MB and not many users do it concurrently), you can do 
>> the following:
>> 
>> #in the view to handle the uploaded file: (assume file input name is just 
>> "file")
>> file_content = request.FILES['file'].read()
>> chardet.detect(file_content)
>> 
>> 2. Also, chardet seems to support incremental (line-by-line) detection 
>> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>>  
>> 
>> 
>> Given this, we can also read from requests.FILES line by line and pass each 
>> line to chardet
>> 
>> from chardet.universaldetector import UniversalDetector
>> 
>> #somewhere in a view function
>> detector = UniversalDetector()
>> file_handle = request.FILES['file']
>> for line in file_handle:
>> detector.feed(line)
>> if detector.done: break
>> detector.close()
>> # result available as a dict at detector.result
>> 
>> 
>> 
>> 
>> 
>> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>> How to deal with encoding when you try to read a csv file on view.
>> 
>> I have a view to upload csv file, in this view I read file and save each row 
>> as new record.
>> 
>> My bug is when I try to upload a csv file with a differente encoding (not 
>> UTF-8)
>> 
>> how to handle this on django (using request.FILES) I was researching and I 
>> found chardet but I don't know how to pass it a request.FILES. I need help 
>> please.
>> 
>> -- 
>> 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/64307441-0e65-45a2-b917-ece15a4ea729o%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 

Re: Error in manage.py when I do python manage.py runserver

2020-07-22 Thread Jagtar Singh Lakhyan
Use python3 & install if Not installed then run python3 manage.py runserver


On Wed, Jul 22, 2020 at 8:08 PM Kovy Jacob  wrote:

> It gives me a syntax error
>
> Jacob-Mac-mini:TachlisGeredt kovyjacob$ python manage.py runserver
> 0.0.0.0:8000
> File "manage.py", line 16
> ) from exc:
> ^
> SyntaxError: invalid syntax
>
> I didn’t edit manage.py yet, I literally just started the project. I was
> thinking maybe its a) a version error, or b) I know that I get syntax
> errors on code that was written in sublime text or a different IDE when I
> run it on IDLE, so maybe its that.
>
> --
> 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/A7892FFC-BEE5-4DE3-99C1-6C4E8CD98C68%40gmail.com
> .
>


-- 

*jagtar singh*founder & CEO
LinkedIn  
Twitter 

web 1: Network 
web 2: WMS 
web 3: Conference 

Android App 1: Network

Android App 2: WMS

Android App 3: Conference


Instagram 
LinkedIn

LinkedIn2 
Twitter 
*IITIAN'S ADVANCED SCHOOL OF COMPETITION PVT. LTD.
*



-- 
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/CAD1gXQE_YQ17qBC5sk709M4en0yKftkfLvrT3XCMgD35-UDyXg%40mail.gmail.com.


Re: Import csv file on django view

2020-07-22 Thread Ronaldo Mata
Yes, the problem here is that the files will be loaded by the user, so I
don't know what delimiter I will receive. This is not a base command that I
am using, it is the logic that I want to incorporate in a view

El mié., 22 jul. 2020 a las 10:43, Kovy Jacob ()
escribió:

> Ah, so is the problem that you don’t always know what the delimiter is
> when you read it? If yes, what is the use case for this? You might not need
> a universal solution, maybe just put all the info into a csv yourself,
> manually.
>
> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata 
> wrote:
>
> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the
> files, sometimes you come separated by "," others by ";" and rarely by "|"
>
> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ()
> escribió:
>
>> Could you just use the standard python csv module?
>>
>> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata 
>> wrote:
>>
>> Hi Liu thank for your answer.
>>
>> This has been a headache, I am trying to read the file using
>> csv.DictReader initially i had an error trying to get the dict keys when
>> iterating by rows, and i thought it could be encoding (for this reason i
>> wanted to prepare the view to use the correct encoding). for that reason I
>> asked my question.
>>
>> 1) your first approach doesn't work, if i send utf-8 file, chardet
>> returns ascii as encoding. it seems request.FILES ['file']. read () returns
>> a binary with that encoding.
>>
>> 2) In the end I realized that the problem was the delimiter of the csv
>> but predicting it is another problem.
>>
>> Anyway, it was a task that I had to do and that was my limitation. I
>> think there must be a library that does all this, uploading a csv file is
>> common practice in many web apps.
>>
>> El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
>> escribió:
>>
>>> Hi. First of all, I think it's impossible to perfectly detect encoding
>>> without further information. See the answer in this SO post:
>>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>>>  There
>>> are many packages and tools to help detect encoding format, but keep in
>>> mind that they are only giving educated guesses. (Most of the time, the
>>> guess is correct, but do check the dev page to see whether there are known
>>> issues related to your problem.)
>>>
>>> Now let's say you have decided to use chardet. Check its doc page for
>>> the usage: https://chardet.readthedocs.io/en/latest/usage.html#usage You'll
>>> have more than one solutions. Here are some examples:
>>>
>>> 1. If the files uploaded to your server are all expected to be small csv
>>> files (less than a few MB and not many users do it concurrently), you can
>>> do the following:
>>>
>>> #in the view to handle the uploaded file: (assume file input name is
>>> just "file")
>>> file_content = request.FILES['file'].read()
>>> chardet.detect(file_content)
>>>
>>> 2. Also, chardet seems to support incremental (line-by-line) detection
>>> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>>>
>>> Given this, we can also read from requests.FILES line by line and pass
>>> each line to chardet
>>>
>>> from chardet.universaldetector import UniversalDetector
>>>
>>> #somewhere in a view function
>>> detector = UniversalDetector()
>>> file_handle = request.FILES['file']
>>> for line in file_handle:
>>> detector.feed(line)
>>> if detector.done: break
>>> detector.close()
>>> # result available as a dict at detector.result
>>>
>>>
>>>
>>>
>>>
>>> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:

 How to deal with encoding when you try to read a csv file on view.

 I have a view to upload csv file, in this view I read file and save
 each row as new record.

 My bug is when I try to upload a csv file with a differente encoding
 (not UTF-8)

 how to handle this on django (using request.FILES) I was researching
 and I found chardet but I don't know how to pass it a request.FILES. I need
 help please.

>>>
>>> --
>>> 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/64307441-0e65-45a2-b917-ece15a4ea729o%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
>> 

Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
Ah, so is the problem that you don’t always know what the delimiter is when you 
read it? If yes, what is the use case for this? You might not need a universal 
solution, maybe just put all the info into a csv yourself, manually.

> On Jul 22, 2020, at 10:39 AM, Ronaldo Mata  wrote:
> 
> Hi Kovy, I'm using csv module, but I need to handle the delimiters of the 
> files, sometimes you come separated by "," others by ";" and rarely by "|" 
> 
> El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ( >) escribió:
> Could you just use the standard python csv module?
> 
>> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata > > wrote:
>> 
>> Hi Liu thank for your answer.
>> 
>> This has been a headache, I am trying to read the file using csv.DictReader 
>> initially i had an error trying to get the dict keys when iterating by rows, 
>> and i thought it could be encoding (for this reason i wanted to prepare the 
>> view to use the correct encoding). for that reason I asked my question.
>> 
>> 1) your first approach doesn't work, if i send utf-8 file, chardet returns 
>> ascii as encoding. it seems request.FILES ['file']. read () returns a binary 
>> with that encoding.
>> 
>> 2) In the end I realized that the problem was the delimiter of the csv but 
>> predicting it is another problem.
>> 
>> Anyway, it was a task that I had to do and that was my limitation. I think 
>> there must be a library that does all this, uploading a csv file is common 
>> practice in many web apps.
>> 
>> El mar., 21 jul. 2020 a las 13:47, Liu Zheng (> >) escribió:
>> Hi. First of all, I think it's impossible to perfectly detect encoding 
>> without further information. See the answer in this SO post: 
>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>>  
>> 
>>  There are many packages and tools to help detect encoding format, but keep 
>> in mind that they are only giving educated guesses. (Most of the time, the 
>> guess is correct, but do check the dev page to see whether there are known 
>> issues related to your problem.)
>> 
>> Now let's say you have decided to use chardet. Check its doc page for the 
>> usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
>>  You'll have more 
>> than one solutions. Here are some examples:
>> 
>> 1. If the files uploaded to your server are all expected to be small csv 
>> files (less than a few MB and not many users do it concurrently), you can do 
>> the following:
>> 
>> #in the view to handle the uploaded file: (assume file input name is just 
>> "file")
>> file_content = request.FILES['file'].read()
>> chardet.detect(file_content)
>> 
>> 2. Also, chardet seems to support incremental (line-by-line) detection 
>> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>>  
>> 
>> 
>> Given this, we can also read from requests.FILES line by line and pass each 
>> line to chardet
>> 
>> from chardet.universaldetector import UniversalDetector
>> 
>> #somewhere in a view function
>> detector = UniversalDetector()
>> file_handle = request.FILES['file']
>> for line in file_handle:
>> detector.feed(line)
>> if detector.done: break
>> detector.close()
>> # result available as a dict at detector.result
>> 
>> 
>> 
>> 
>> 
>> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>> How to deal with encoding when you try to read a csv file on view.
>> 
>> I have a view to upload csv file, in this view I read file and save each row 
>> as new record.
>> 
>> My bug is when I try to upload a csv file with a differente encoding (not 
>> UTF-8)
>> 
>> how to handle this on django (using request.FILES) I was researching and I 
>> found chardet but I don't know how to pass it a request.FILES. I need help 
>> please.
>> 
>> -- 
>> 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/64307441-0e65-45a2-b917-ece15a4ea729o%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 
>> .

Re: Import csv file on django view

2020-07-22 Thread Ronaldo Mata
Hi Kovy, I'm using csv module, but I need to handle the delimiters of the
files, sometimes you come separated by "," others by ";" and rarely by "|"

El mié., 22 jul. 2020 a las 10:28, Kovy Jacob ()
escribió:

> Could you just use the standard python csv module?
>
> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata 
> wrote:
>
> Hi Liu thank for your answer.
>
> This has been a headache, I am trying to read the file using
> csv.DictReader initially i had an error trying to get the dict keys when
> iterating by rows, and i thought it could be encoding (for this reason i
> wanted to prepare the view to use the correct encoding). for that reason I
> asked my question.
>
> 1) your first approach doesn't work, if i send utf-8 file, chardet returns
> ascii as encoding. it seems request.FILES ['file']. read () returns a
> binary with that encoding.
>
> 2) In the end I realized that the problem was the delimiter of the csv but
> predicting it is another problem.
>
> Anyway, it was a task that I had to do and that was my limitation. I think
> there must be a library that does all this, uploading a csv file is common
> practice in many web apps.
>
> El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
> escribió:
>
>> Hi. First of all, I think it's impossible to perfectly detect encoding
>> without further information. See the answer in this SO post:
>> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>>  There
>> are many packages and tools to help detect encoding format, but keep in
>> mind that they are only giving educated guesses. (Most of the time, the
>> guess is correct, but do check the dev page to see whether there are known
>> issues related to your problem.)
>>
>> Now let's say you have decided to use chardet. Check its doc page for the
>> usage: https://chardet.readthedocs.io/en/latest/usage.html#usage You'll
>> have more than one solutions. Here are some examples:
>>
>> 1. If the files uploaded to your server are all expected to be small csv
>> files (less than a few MB and not many users do it concurrently), you can
>> do the following:
>>
>> #in the view to handle the uploaded file: (assume file input name is just
>> "file")
>> file_content = request.FILES['file'].read()
>> chardet.detect(file_content)
>>
>> 2. Also, chardet seems to support incremental (line-by-line) detection
>> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>>
>> Given this, we can also read from requests.FILES line by line and pass
>> each line to chardet
>>
>> from chardet.universaldetector import UniversalDetector
>>
>> #somewhere in a view function
>> detector = UniversalDetector()
>> file_handle = request.FILES['file']
>> for line in file_handle:
>> detector.feed(line)
>> if detector.done: break
>> detector.close()
>> # result available as a dict at detector.result
>>
>>
>>
>>
>>
>> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>>>
>>> How to deal with encoding when you try to read a csv file on view.
>>>
>>> I have a view to upload csv file, in this view I read file and save each
>>> row as new record.
>>>
>>> My bug is when I try to upload a csv file with a differente encoding
>>> (not UTF-8)
>>>
>>> how to handle this on django (using request.FILES) I was researching and
>>> I found chardet but I don't know how to pass it a request.FILES. I need
>>> help please.
>>>
>>
>> --
>> 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/64307441-0e65-45a2-b917-ece15a4ea729o%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/CAP%3DoziQuZyb74Wsk%2BnjngUpSccOKCYRM_C%3D7KgGX%2BgV5wRzHwQ%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/91E9FE01-4701-478C-B575-2BD5BA5DCE86%40gmail.com
> 

Error in manage.py when I do python manage.py runserver

2020-07-22 Thread Kovy Jacob
It gives me a syntax error

Jacob-Mac-mini:TachlisGeredt kovyjacob$ python manage.py runserver 0.0.0.0:8000
File "manage.py", line 16
) from exc:
^
SyntaxError: invalid syntax

I didn’t edit manage.py yet, I literally just started the project. I was 
thinking maybe its a) a version error, or b) I know that I get syntax errors on 
code that was written in sublime text or a different IDE when I run it on IDLE, 
so maybe its that.

-- 
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/A7892FFC-BEE5-4DE3-99C1-6C4E8CD98C68%40gmail.com.


Re: Import csv file on django view

2020-07-22 Thread Kovy Jacob
Could you just use the standard python csv module?

> On Jul 22, 2020, at 10:25 AM, Ronaldo Mata  wrote:
> 
> Hi Liu thank for your answer.
> 
> This has been a headache, I am trying to read the file using csv.DictReader 
> initially i had an error trying to get the dict keys when iterating by rows, 
> and i thought it could be encoding (for this reason i wanted to prepare the 
> view to use the correct encoding). for that reason I asked my question.
> 
> 1) your first approach doesn't work, if i send utf-8 file, chardet returns 
> ascii as encoding. it seems request.FILES ['file']. read () returns a binary 
> with that encoding.
> 
> 2) In the end I realized that the problem was the delimiter of the csv but 
> predicting it is another problem.
> 
> Anyway, it was a task that I had to do and that was my limitation. I think 
> there must be a library that does all this, uploading a csv file is common 
> practice in many web apps.
> 
> El mar., 21 jul. 2020 a las 13:47, Liu Zheng ( >) escribió:
> Hi. First of all, I think it's impossible to perfectly detect encoding 
> without further information. See the answer in this SO post: 
> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>  
> 
>  There are many packages and tools to help detect encoding format, but keep 
> in mind that they are only giving educated guesses. (Most of the time, the 
> guess is correct, but do check the dev page to see whether there are known 
> issues related to your problem.)
> 
> Now let's say you have decided to use chardet. Check its doc page for the 
> usage: https://chardet.readthedocs.io/en/latest/usage.html#usage 
>  You'll have more 
> than one solutions. Here are some examples:
> 
> 1. If the files uploaded to your server are all expected to be small csv 
> files (less than a few MB and not many users do it concurrently), you can do 
> the following:
> 
> #in the view to handle the uploaded file: (assume file input name is just 
> "file")
> file_content = request.FILES['file'].read()
> chardet.detect(file_content)
> 
> 2. Also, chardet seems to support incremental (line-by-line) detection 
> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>  
> 
> 
> Given this, we can also read from requests.FILES line by line and pass each 
> line to chardet
> 
> from chardet.universaldetector import UniversalDetector
> 
> #somewhere in a view function
> detector = UniversalDetector()
> file_handle = request.FILES['file']
> for line in file_handle:
> detector.feed(line)
> if detector.done: break
> detector.close()
> # result available as a dict at detector.result
> 
> 
> 
> 
> 
> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
> How to deal with encoding when you try to read a csv file on view.
> 
> I have a view to upload csv file, in this view I read file and save each row 
> as new record.
> 
> My bug is when I try to upload a csv file with a differente encoding (not 
> UTF-8)
> 
> how to handle this on django (using request.FILES) I was researching and I 
> found chardet but I don't know how to pass it a request.FILES. I need help 
> please.
> 
> -- 
> 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/64307441-0e65-45a2-b917-ece15a4ea729o%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/CAP%3DoziQuZyb74Wsk%2BnjngUpSccOKCYRM_C%3D7KgGX%2BgV5wRzHwQ%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 

Re: Import csv file on django view

2020-07-22 Thread Ronaldo Mata
Hi Liu thank for your answer.

This has been a headache, I am trying to read the file using
csv.DictReader initially i had an error trying to get the dict keys when
iterating by rows, and i thought it could be encoding (for this reason i
wanted to prepare the view to use the correct encoding). for that reason I
asked my question.

1) your first approach doesn't work, if i send utf-8 file, chardet returns
ascii as encoding. it seems request.FILES ['file']. read () returns a
binary with that encoding.

2) In the end I realized that the problem was the delimiter of the csv but
predicting it is another problem.

Anyway, it was a task that I had to do and that was my limitation. I think
there must be a library that does all this, uploading a csv file is common
practice in many web apps.

El mar., 21 jul. 2020 a las 13:47, Liu Zheng ()
escribió:

> Hi. First of all, I think it's impossible to perfectly detect encoding
> without further information. See the answer in this SO post:
> https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
>  There
> are many packages and tools to help detect encoding format, but keep in
> mind that they are only giving educated guesses. (Most of the time, the
> guess is correct, but do check the dev page to see whether there are known
> issues related to your problem.)
>
> Now let's say you have decided to use chardet. Check its doc page for the
> usage: https://chardet.readthedocs.io/en/latest/usage.html#usage You'll
> have more than one solutions. Here are some examples:
>
> 1. If the files uploaded to your server are all expected to be small csv
> files (less than a few MB and not many users do it concurrently), you can
> do the following:
>
> #in the view to handle the uploaded file: (assume file input name is just
> "file")
> file_content = request.FILES['file'].read()
> chardet.detect(file_content)
>
> 2. Also, chardet seems to support incremental (line-by-line) detection
> https://chardet.readthedocs.io/en/latest/usage.html#example-detecting-encoding-incrementally
>
> Given this, we can also read from requests.FILES line by line and pass
> each line to chardet
>
> from chardet.universaldetector import UniversalDetector
>
> #somewhere in a view function
> detector = UniversalDetector()
> file_handle = request.FILES['file']
> for line in file_handle:
> detector.feed(line)
> if detector.done: break
> detector.close()
> # result available as a dict at detector.result
>
>
>
>
>
> On Tuesday, July 21, 2020 at 7:09:35 AM UTC+8, Ronaldo Mata wrote:
>>
>> How to deal with encoding when you try to read a csv file on view.
>>
>> I have a view to upload csv file, in this view I read file and save each
>> row as new record.
>>
>> My bug is when I try to upload a csv file with a differente encoding (not
>> UTF-8)
>>
>> how to handle this on django (using request.FILES) I was researching and
>> I found chardet but I don't know how to pass it a request.FILES. I need
>> help please.
>>
> --
> 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/64307441-0e65-45a2-b917-ece15a4ea729o%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/CAP%3DoziQuZyb74Wsk%2BnjngUpSccOKCYRM_C%3D7KgGX%2BgV5wRzHwQ%40mail.gmail.com.


Re: How to trace circular import error Django never solved!! Please sort this out.

2020-07-22 Thread sandeep kumar
I have faced this issue atleast 100 times..:)

Her are the steps (sorry, I could not find a better way):

1. comment urls in urls.py (inside individual app)
2. check if you still have issue
2a. if you do not have issue, then you probably have not defined views for
some of the urls
2b. if you still see the error, comment 'impot views' statement.
3a. if the issue is gone after commenting 'import views' then check
views.py file, it must have some typos (e.g., misalignment, accidental
copying of some special character etc.)
3b. if the issue is not gone even after commenting 'import views', let me
know. I am not sure I have reached that stage ever..:)

Hope this helps.

Thanks,
Sandeep

-- 
*Dr. Sandeep Kumar,*
Postdoctoral Researcher,
Lunenfeld Tanenbaum Research Institute,
Mount Sinai Hospital,
600 University Ave,
Toronto, Ontario
Canada
http://individual.utoronto.ca/sandeepkumar/


On Wed, Jul 22, 2020 at 10:12 AM Chaitanya Sai 
wrote:

> Hello Django users,
> Is there not even single person who can solve this issue??
>
>
> On Tue, Jul 21, 2020 at 8:09 PM Sai  wrote:
>
>> I am working Django rest framework api project, where I had multiple apps
>> in the project. I got a circular import error when I am adding the app URLs
>> to the main URLs. I Tried everything checked spellings, checked app
>> structure but no use. Its been really frustrating with issue..please help
>> to solve the problem. The app is working fine when I take off newly added
>> line `path("covid/", include("Covid.urls")),`
>>
>> I am using python3.6, django 3.0.4 and django-rest-framework 3.11.0
>>
>> Here is project
>> **urls.py**
>>
>>
>> from django.contrib import admin
>> from django.conf.urls import url
>> from django.urls import path, include
>> from rest_framework_swagger.views import get_swagger_view
>>
>> schema_view = get_swagger_view(title='TmmrwInc API Documentation')
>>
>> urlpatterns = [
>> path('admin/', admin.site.urls),
>> # path('', include('django.contrib.auth.urls')),
>> # path('rest_auth/', include('rest_auth.urls')),
>> path('api/password_reset/',
>> include('django_rest_passwordreset.urls',
>> namespace='password_reset')),
>> # url(r'^invitations/', include('invitations.urls',
>> namespace='invitations')),
>> path('', include('rest_invitations.urls')),
>> path("", include("UserAuth.urls")),
>> path("doctors/", include("Administration.urls")),
>> path("appointments/", include("Appointments.urls")),
>> path("messaging/", include("messaging.urls")),
>> path("meet/", include("meet.urls")),
>> path("api_documentation/", schema_view),
>> path("covid/", include("Covid.urls")),
>> ]
>>
>> This is app **urls.py** file
>>
>> from django.urls import path
>> from . import views
>>
>> app_name = 'Covid'
>>
>> urlpatterns = [
>> path('event/', views.EventBookingView.as_view()),
>> ]
>>
>> **settings.py** installed apps
>>
>> ALLOWED_HOSTS = ['*']
>>
>>
>> # Application definition
>>
>> INSTALLED_APPS = [
>> "django.contrib.admin",
>> "django.contrib.auth",
>> "django.contrib.sites",
>> "django.contrib.contenttypes",
>> "django.contrib.sessions",
>> "django.contrib.messages",
>> "django.contrib.staticfiles",
>> "UserAuth",
>> "rest_framework",
>> "corsheaders",
>> 'rest_framework.authtoken',
>> 'rest_auth',
>> 'Appointments',
>> 'messaging',
>> 'Administration',
>> 'channels',
>> 'invitations',
>> 'rest_invitations',
>> 'django_rest_passwordreset',
>> 'django_celery_beat',
>> 'meet',
>> 'rest_framework_swagger',
>>  'Covid',
>>
>> ]
>>
>> This is a project structure
>>
>> [Project Structure][1]
>>
>>
>>   [1]: https://i.stack.imgur.com/E8qro.jpg
>>
>> --
>> 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/90296ccf-c893-4cf1-b57a-2da47396a2bbo%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/CAPcTzRYQztSpyh5AD%3DYo9%3DYMvRHfYcFBXdfq6rrK956ZqdcAcQ%40mail.gmail.com
> 

Re: How to trace circular import error Django never solved!! Please sort this out.

2020-07-22 Thread Chaitanya Sai
Hello Django users,
Is there not even single person who can solve this issue??


On Tue, Jul 21, 2020 at 8:09 PM Sai  wrote:

> I am working Django rest framework api project, where I had multiple apps
> in the project. I got a circular import error when I am adding the app URLs
> to the main URLs. I Tried everything checked spellings, checked app
> structure but no use. Its been really frustrating with issue..please help
> to solve the problem. The app is working fine when I take off newly added
> line `path("covid/", include("Covid.urls")),`
>
> I am using python3.6, django 3.0.4 and django-rest-framework 3.11.0
>
> Here is project
> **urls.py**
>
>
> from django.contrib import admin
> from django.conf.urls import url
> from django.urls import path, include
> from rest_framework_swagger.views import get_swagger_view
>
> schema_view = get_swagger_view(title='TmmrwInc API Documentation')
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> # path('', include('django.contrib.auth.urls')),
> # path('rest_auth/', include('rest_auth.urls')),
> path('api/password_reset/',
> include('django_rest_passwordreset.urls',
> namespace='password_reset')),
> # url(r'^invitations/', include('invitations.urls',
> namespace='invitations')),
> path('', include('rest_invitations.urls')),
> path("", include("UserAuth.urls")),
> path("doctors/", include("Administration.urls")),
> path("appointments/", include("Appointments.urls")),
> path("messaging/", include("messaging.urls")),
> path("meet/", include("meet.urls")),
> path("api_documentation/", schema_view),
> path("covid/", include("Covid.urls")),
> ]
>
> This is app **urls.py** file
>
> from django.urls import path
> from . import views
>
> app_name = 'Covid'
>
> urlpatterns = [
> path('event/', views.EventBookingView.as_view()),
> ]
>
> **settings.py** installed apps
>
> ALLOWED_HOSTS = ['*']
>
>
> # Application definition
>
> INSTALLED_APPS = [
> "django.contrib.admin",
> "django.contrib.auth",
> "django.contrib.sites",
> "django.contrib.contenttypes",
> "django.contrib.sessions",
> "django.contrib.messages",
> "django.contrib.staticfiles",
> "UserAuth",
> "rest_framework",
> "corsheaders",
> 'rest_framework.authtoken',
> 'rest_auth',
> 'Appointments',
> 'messaging',
> 'Administration',
> 'channels',
> 'invitations',
> 'rest_invitations',
> 'django_rest_passwordreset',
> 'django_celery_beat',
> 'meet',
> 'rest_framework_swagger',
>  'Covid',
>
> ]
>
> This is a project structure
>
> [Project Structure][1]
>
>
>   [1]: https://i.stack.imgur.com/E8qro.jpg
>
> --
> 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/90296ccf-c893-4cf1-b57a-2da47396a2bbo%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/CAPcTzRYQztSpyh5AD%3DYo9%3DYMvRHfYcFBXdfq6rrK956ZqdcAcQ%40mail.gmail.com.


Re: New Comer Alert !!!

2020-07-22 Thread kyenshak david
Thanks sir for the recommendation

On Wed, 22 Jul 2020, 05:34 Mike Dewhirst,  wrote:

> Old comer alert!
>
> There are those among us who will never have anything to do with facebook.
>
> Here is where to look ...
>
> https://www.djangoproject.com/community/
>
>
>
>
> On 22/07/2020 1:29 pm, Exactly musty wrote:
> > this is the reason am active on facebook, i get to get my problem
> > solved than i do in
> > stackoverflow https://web.facebook.com/groups/python.django
> >
> > On Wednesday, July 22, 2020 at 2:07:28 AM UTC+1, David Kyenshak wrote:
> >
> > Hello everyone, my name is David. I'm new to django. I've been
> > doing django for Four months now and i must say I've enjoyed every
> > bit of it.
> > Though i encountered challenges errors along the way, but its all
> > worth it. once again i'm glad to be here and am happy to meet you
> > guys.
> > and please if there's a Whatsapp group or any social media
> > platform you guys recommend, i'd be happy to join
> >
> > 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/89473571-00af-4ab7-9e15-e659d6293ac5o%40googlegroups.com
> > <
> https://groups.google.com/d/msgid/django-users/89473571-00af-4ab7-9e15-e659d6293ac5o%40googlegroups.com?utm_medium=email_source=footer
> >.
>
>
> --
> Signed email is the only defence against phishing I know. This email
> is signed with my private key using GPG. Because my public key could
> be used to sign messages addressed to me I will reveal my public key
> only to trusted correspondents. I trust you so please ask and I will
> send it with a "howto" on making signed email work for you too.
>
>
> --
> 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/758bf5ef-9840-2871-46a2-d233df8992ef%40dewhirst.com.au
> .
>

-- 
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/CAJ9188RP5g6zwFpJApFOVRSWPvqmb779CCAESiOSHhhk5b46AA%40mail.gmail.com.


Django Rest Framework

2020-07-22 Thread mishra39076
Can anyone suggest me resources to learn django rest framework.

-- 
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/a6d9b2a5-2088-4af1-b65c-273aa5a8fd12n%40googlegroups.com.


Re: Python-django project

2020-07-22 Thread Muhammad Faraz
Interested.

On Tue, Jul 21, 2020 at 08:10 learn code  wrote:

> Hi everyone,
>
> I am learning python and django, like to work on the projects to improve
> more.If any one interested to join with me to work on the projects,plz send
> me a email.
>
> --
> 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/e7116e9b-9458-4f49-a638-135c4b5874e0o%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/CANu5hbtZAkXdEWSkXm7sW%2Bt1UgQ_Q3E32_e7jzo%2BVsZ%2BUxkFJg%40mail.gmail.com.


Re: Get Personal and maching Horoscope

2020-07-22 Thread Tobi DEGNON
This is not really Django related, you will better off doing a Google
search.

Le mer. 22 juill. 2020 11 h 13, Ashutosh Mishra 
a écrit :

> I want to create api's to get personal horoscope and the matching
> horoscope by providing
> date of birth for girl and boy,some one plz guide how  can we do this
>
> --
> 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/76f166af-28e2-4c9e-b847-528773f55e31n%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/CACeK5bmywn54wB8JdBgo%2Bt03mTb5kU3SxbX3EvOzOzPu3i_S9Q%40mail.gmail.com.


Get Personal and maching Horoscope

2020-07-22 Thread Ashutosh Mishra
I want to create api's to get personal horoscope and the matching horoscope 
by providing
date of birth for girl and boy,some one plz guide how  can we do this 

-- 
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/76f166af-28e2-4c9e-b847-528773f55e31n%40googlegroups.com.