Watzon | watzon@mas.to
Finally attempting to use django for the first time
Watzon | watzon@mas.to
God help me
Watzon | watzon@mas.to
Haha I've already got everything up and running. Right now I'm just trying to figure out how to bake Telethon into a django app.
Watzon | watzon@mas.to
Apparently putting the code inside of __init__.py in the app isn't going to fly
cj
nop
cj
I guess it's not gonna be that easy...
Watzon | watzon@mas.to
Any ideas? I basically want to attempt to use an app as a userbot, and use django for the ORM and admin front end.
Suresh
Any know about popup page
Watzon | watzon@mas.to
I have the models set up, and I got the admin side all configured, now I just need to figure out how to make it run Telethon in the background when the app starts up.
cj
Watzon | watzon@mas.to
I've used pewee before. It's pretty decent.
cj
but if you want to use Django's admin site for your Telethon's DB .... 🤔 I guess it might work
cj
if you want to have both apps to start at the same time, maybe write an script to boot them both
Watzon | watzon@mas.to
That would work I suppose. Apparently django also has a hook that fires when the app starts. I might be able to use that to create a child process.
Suresh
Sorry
meet
how to make attendence system using barcode with django any reference aur video there?
Yuvi
Invalid literally for inter() with base 10 solution
Yuvi
How to slove this error
Amit
What if I deleted manage.py file
Amit
Will my application work if not then is their any alternative
Yuvraj
Anonymous
Anonymous
Why tf would you delete it........
Anonymous
Generate a new one and reconfigure..........
Amit
Ok thanks, basically it tells us that setting.py file of project
__init__
In a DRF ModelViewSet how to get list of books added by request.user?
Hamidreza
hi, what is best way or place to run telegram bot in django app? like view.py ?
Vedant
Is there a way to pass data from a webpage to views.py as an argument
Hello world
hello guys,
I made website using DRF and Vue.js now i want deploy this website, where should i deploy aws EC2 or Elastic beanstalk?
Any other suggestions welcome
Alex
hi, what is best way or place to run telegram bot in django app? like view.py ?
I'm assuming you have some django website/service and want to "forward" it into telegram. Then the best way will be to make the bot as a separate microservice connect to the django by rest api or message queue. Or if you really want to keep them coupled, then move the bot's part into a separate django app (like those you list in INSTALLED_APP) . You can use telegram's feature of webhooks. That way you can simply define your bot as a pack of simple views with predefined routing
Zulfikar
Where is the best way to do this?
Make a new app with one model. Or make a app with contains some model?
Hamidreza
Alex
Hamidreza
Alex
how can i add bot in installed apps ?
I already told you - create an app and place your bot's handlers in the app's views. Then setup your project to get telegram updates by webhooks.
Gk
Hello guys
I have a created a student detail form and storing it in a table in MySQL
What my question is I have another form which have some common and extra field from students detail form
What I want to do is to create a button an on click of the button get the common fields in the form in disable mode and rest the user will fill
Can you tell me how can I approach this process
Darya
Is django_comments_dab package good for commenting system in project???
Alex
Gk
??
pi
How to install WordPress in Django project??
Mirco
Mirco
Django-CMS, Wagtail etc
Mirco
Doragonsureiyā
Alex
How to install WordPress in Django project??
How do you even imagine this? At best you can have a django app and, say, wordpress powered blog. Then you could host them from the same domain with special path for that WP blog.
Alex
So that way it will be 2 separate projects sharing the same domain.
pi
Vedant
Unknown
A Django Powered blog is consuming more RAM as compared to a wordpress blog maybe because I am also using celery IDK.
bikrant
How Can I use permissionsmixin on a profile class with one-to-one relationship to user class?
Unknown
Khumoyun
Hello, project: Django Rest Framework
I need add Apple ID based auth for my api, but I can not find any solution without any plugin and libs
Question: Can I add Apple ID, Facebook, Google based auth without any additional libs?
bikrant
What is the problem exactly?
I was using user.is_authenticated in templates ,but now I've custom userprofile model so it's not working now
atkisai
how write python command with long options in terminal?))
Mirco
zoi
Hi help please
Anonymous
zoi
Hi help please
My problem is.... That the categories are repeating themselves
Alex
Doragonsureiyā
My problem is.... That the categories are repeating themselves
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:
- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)
and more details, that way your chances to get help will increase
zoi
!explain
I'm showing the categories of a blog, but the same categories load the same amount as there are blogs
Hasan
Hi there.
I have legacy code with written unit tests (pytest) . Want to refactor and use this tests. In migrations some fields renamed, so pytest can't handle it. Who had similar problem? There is any solution of it?
cj
Hasan
cj
cj
if you're gonna add/remove fields from models, you should add/remove them from tests too
Hasan
pytest can't create temporary database
Hasan
but, all migrations works
cj
what error do you see when you run pytest?
Hasan
what error do you see when you run pytest?
ERROR tests/media/admin/test_music_admin.py::TestStoriesSetAdmin::test_class_registered - django.db.utils.ProgrammingError: column "code" of relation "core_locale" does not exist
django.db.utils.ProgrammingError: column "code" of relation "core_locale" does not exist - on every failed test