Ronald
That listens for messages
Ronald
And saves to db
Ronald
Via api
Михаил
Does it recuire activation via mobile?
Ronald
Does it recuire activation via mobile?
https://github.com/python-telegram-bot/python-telegram-bot
Михаил
Thank you Ronald
Михаил
It'll take some time to checkout
inchidi
The template is located in the folder
make sure your template dir registered also
Luke
inchidi
It'll take some time to checkout
if you want to retrieve the messages from telegram user instead telegram bot, you can also checkout telethon
Ronald
Thank you Ronald
No probs. It's a very nice library. Great documentation too
Xyz
Hi @Inchidi @iFlare3G , what directory structure do you use for your django production apps
Mirco
Hi @Inchidi @iFlare3G , what directory structure do you use for your django production apps
I usually follow the structure suggested inside Two Scoops of Django book
Xyz
cookiecutter ?
Xyz
alright thanks! I'll try that then
inchidi
the indentations removed there, this one better https://dpaste.de/c1a2
Xyz
mehn cookiecutter looks too verbose... I can barely find my way around
Guillermo
mehn cookiecutter looks too verbose... I can barely find my way around
same. i use a two scoops inspired structure, but much simpler than cookiecutter
Xyz
Thanks @Inchidi and @iFlare3G !
inchidi
the indentations removed there, this one better https://dpaste.de/c1a2
btw if you found empty dir there, prolly it only contain .gitkeep file, like /root_static for example
Anonymous
Hii.. Any document for studying REST Api ?? Beginner tutorial.
8 € ∆ $ "|"
anyone here use postgres
inchidi
Hii.. Any document for studying REST Api ?? Beginner tutorial.
i would recommend you to just learn the implementation (using DRF) for example, instead reading ebook just about how it works
inchidi
anyone here use postgres
just ask what you want to ask tho
8 € ∆ $ "|"
just ask what you want to ask tho
i am unable to setup postgres sql on windows i have tried all solution available on google and utube
Mohit
Should I use " through " when using django many to many relationship just to use "unique together"
the dark
can any one tell me how can i run my django website on any server like a2 hosting
Xyz
You guys should checkout tableplus.io, it's a pretty neat tool for managing your databases
cj
You guys should checkout tableplus.io, it's a pretty neat tool for managing your databases
thanks, but no thanks... there are some FLOSS tools to do the same and multi-OS, that 👆 is closed to only 2 OSes 🤷🏻‍♂️
Xyz
thanks, but no thanks... there are some FLOSS tools to do the same and multi-OS, that 👆 is closed to only 2 OSes 🤷🏻‍♂️
Asides the OS issue, I think it's pretty cools..... Can you recommend other tools that does the same function
cj
also DataGrip if you want to pay for a multi-platform tool
Xyz
DBeaver 🤷🏻‍♂️
Nice.... Just checked it out
inchidi
You guys should checkout tableplus.io, it's a pretty neat tool for managing your databases
i prefer db manager from my IDE https://i.imgur.com/YyqjukEl.png
cj
i prefer db manager from my IDE https://i.imgur.com/YyqjukEl.png
most JetBrain IDEs have DataGrip integrated, I also use it 😄
Mike
Hi, everyone. I need a help. I posted on stackowerflow, but my problem doesn't resolve. If you can help me, would be nice https://stackoverflow.com/questions/54522323/i-cannot-save-a-picture-link-from-a-facebook-account/54523465#54523465
Anonymous
Hi guys i can't send imahe here?
Mirco
Hi guys i can't send imahe here?
Use an image sharing service
Paritosh
Hey everyone, I'm building a web app that takes an image from a client , upload it to the server. After that i want this image to be processed by an OCR written in python. And return the text to the html file. Can anyone tell me how to pass this image to my python program? I'm a beginner.
Paritosh
do you know how to upload images to Django or not ?
They are being stored in media directory
Paritosh
I'm confused about the second part(processing image and return text)
Paritosh
Also my ocr program is worling perfectly
Mirco
good, so do you have a model with image field ? or an image model ?
Paritosh
Yes i have ... It has one image field and one title field
Paritosh
I try to pass all the obects as context .. like - imgs=img.objects.all() Then in html i try to access them as - {% for img in imgs %} <Img src="{{ img.image.url }}> Ending for loop
Paritosh
But i don't get anything in my webpage
Mirco
share your code with pastebin or similar, so it's easier to help ya :)
Paritosh
Okay .... I'll when I'm back at office.
Mirco
Okay .... I'll when I'm back at office.
anyway, u just need to get your image and pass it to your OCR what does your OCR excpect as input ? image path ?
Paritosh
Yes
Mirco
Yes
Ook so u have to get image path from your model
Paritosh
class img(models.Model): title = models.CharField(max_length=50, blank=True) image = models.ImageField(upload_to='documents/') uploaded_at = models.DateTimeField(auto_now_add=True)
Paritosh
this is my model
Paritosh
and this is the function in my views.py _
Paritosh
def fileget(request): if request.method == 'GET': imgs = img.objects.all() return render(request,"textdetect/view.html", {'imgs':imgs})
Mirco
use code sharing service pls, it's easier to read and edit
Paritosh
use code sharing service pls, it's easier to read and edit
i'm unable to share code .. it says you're not allowed to send such files.. i'm trying to send the .py file downloaded from pastebin
Paritosh
so you wanna have all uploaded images in your view ?
yes for now i want to display all my images in a page
Paritosh
https://pastebin.com/d5VCaz64
Mirco
yes for now i want to display all my images in a page
ook, so what kind of errors do you get ?
Mirco
and try to follow PEP standard, class names should be start with capitalized letter
Paritosh
https://pastebin.com/f9H9jRp4
Paritosh
this is my template
Paritosh
it shows nothing..
Mirco
have you already checked out in a django shell what your query returns ?
Paritosh
i guess something is wrong... all the title and images are stored in database table but i deleted them from my documents folder so it returns NOT FOUND
Paritosh
I this i should clear my DB and start again
Mirco
if u have deleted them, path stored in your table is pointing to the vaacum