Idk
I am struggling with making a ajax POST request in django for weeks. Even though the ajax request is POST, it is making a GET request by adding the csrftoken and the form field calue to the url. Any help would be appreciated.
3li
Hey, I need someone works with graphql and django to ask him a question plz
Place
Hello everyone, i am using pre_save signal to change the path of the files that saved into my database, and i am having a problem : here is my code if someone have an idea on how to fix it.i worked soo much on it but i am blocking please some help... https://del.dog/hiwowyning the error i got is : can't set attribute
Place
I will explain my problem, maybe there is a simple solution than doing it with 2 signals haha! my problem is that i save my medias on the media/... folder i defined on the settings by MEDIA_URL = '/media/' , so everytime my Imagefield save a new picture it stores it to media/path_specified_in_Imagefield, but i would like to save the data on my database with directly the true path to my pictures and by that i mean media/path_to_picture
Beyond Dark
Hello guys, can I use sockets in django?
The Guy
How can this help
It's the question, if someone here can please answer that.
Purple
django or djangorest framework??
Doragonsureiyā
django or djangorest framework??
What are you talking about?
Purple
What are you talking about?
I was asking which one is better
Shanks
What's the use of function in Django orm
Shanks
?
cj
I was asking which one is better
do you know what you're talking about? do you know what Django is and what Django-rest-framework is?
Purple
i was learning django and i come across django rest framework
Purple
i know react is used as front-end in rest framework, but I haven't learn react, so I was kind of curious if it is easier for front-end if I use rest
Zey
What's the use of function in Django orm
We use orm instead of SQL for database e.g for crud operations
Shanks
But there are also function defined in those classes
Shanks
https://github.com/justdjango/django-ecommerce/blob/master/core/models.py What's the use of function defined in these classes when this is only used for database thing?
Rushabh
Any one work on how to send email automatically before user expired plans in django. How to do this...
Rajeev
What is the best way to capture location coordinates using django api end points on photo click
Rushabh
What is the best way to capture location coordinates using django api end points on photo click
For my opinion you use javascript for that...after send data to backed and store the information..
Zey
It is Persian language
Dev
Any one work on how to send email automatically before user expired plans in django. How to do this...
You can use a celery beat tasks for this and have a field in your models to store a datetime you want to send the emails
Shanks
I'm making a website that provides services Shall I create different model for different type of service available
Rushabh
You can use a celery beat tasks for this and have a field in your models to store a datetime you want to send the emails
Celery do this like I will buy 20$ mobile recharge plan before expired 2 days ago user get the email for expiration mail... something like that it is possible in celery...?
Rushabh
Like...1 month recharge plans...
Shanks
I have created a service models Then applied polimorphism for different categories is it good
Dev
Just keep it simple, store user details and and a date when you want to send the emails
Anonymous
I am using django-rest-passwordreset(pypi.org/project/django-rest-passwordreset/) in my django rest project which automatically sends a response like {'status':ok} when an email is provided, i want to overide that response, can somebody help?
AceT0ne
I want to do addition in a specific database so how to get that specific database in django
Anonymous
How to add tow custom domains in single aws hosting?
Anonymous
can anyone help ?? i have to give editable api for android
Doragonsureiyā
can anyone help ?? i have to give editable api for android
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~90,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
SLVR
Hi! Is there jinja2 filter that can render jinja template itself in a current context? My case is the following: one of my templates creates j2 template dynamically on a runtime at an inner level, so I’d like to process this as template on an out level.
SLVR
Something like {{ this_is_variable_with_jinja_template | template_processor }}
SLVR
First thing I need is ability to capture some part of the template into a variable
Alina
Hi! I have some issue with access to admin in django - server error 500. In debug mode - attempt to write a readonly database. Somebody dealed with something like this?
Alina
Attempt to write readonly database
Anonymous
Attempt to write readonly database
you cant save to database
Anonymous
reload server
Anonymous
this have to help
SLVR
Attempt to write readonly database
https://stackoverflow.com/questions/21054245/attempt-to-write-a-readonly-database-django-w-selinux-error
SLVR
What what?
Editing Name
Hello, how resolve this error in install boto3 in Django App using python 3.8 virtualenv? ModuleNotFoundError: No module named 'boto3'
Dev
pip install boto3
Dev
Something like {{ this_is_variable_with_jinja_template | template_processor }}
you need to create a custom filter https://docs.djangoproject.com/en/3.1/howto/custom-template-tags/
Ebenezer
Hello, how resolve this error in install boto3 in Django App using python 3.8 virtualenv? ModuleNotFoundError: No module named 'boto3'
Make sure the module was installed successfully. If it were, confirm that you are working in the virtual env within which the module was installed
Editing Name
Make sure the module was installed successfully. If it were, confirm that you are working in the virtual env within which the module was installed
Exception in thread django-main-thread: Traceback (most recent call last): File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "/usr/local/lib/python3.8/threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.8/site-packages/django/utils/autoreload.py", line 54, in wrapper fn(*args, **kwargs) File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/runserver.py", line 117, in inner_run self.check(display_num_errors=True) File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 387, in check all_issues = self._run_checks( File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 377, in _run_checks return checks.run_checks(**kwargs) File "/usr/local/lib/python3.8/site-packages/django/core/checks/registry.py", line 72, in run_checks new_errors = check(app_configs=app_configs) File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique all_namespaces = _load_all_namespaces(resolver) File "/usr/local/lib/python3.8/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces url_patterns = getattr(resolver, 'url_patterns', []) File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 80, in get res = instance.dict[self.name] = self.func(instance) File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 584, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python3.8/site-packages/django/utils/functional.py", line 80, in get res = instance.dict[self.name] = self.func(instance) File "/usr/local/lib/python3.8/site-packages/django/urls/resolvers.py", line 577, in urlconf_module return import_module(self.urlconf_name) File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/code/teste/urls.py", line 4, in <module> from users.api.viewsets import CreateUserViewSet, AdminUsersViewSet, UpdateUserViewSet, SendEmailView File "/code/users/api/viewsets.py", line 1, in <module> import boto3 ModuleNotFoundError: No module named 'boto3'
Anonymous
I created a serializer for my model But when I write api for update It showing Serializer has no objects
Editing Name
@rapotair my requirements.txt: boto3==1.17.39 botocore==1.20.39
Ebenezer
@rapotair my requirements.txt: boto3==1.17.39 botocore==1.20.39
Yeah and I am saying that make sure that the python interpreter you are using is set to the virtual env within which you installed the module
V
I have a model which has some contents in it.. so once delete every content in model using objects.all.delete() command, it deletes everything but when in enter new content, its corresponding id not starting from 1,its id is an increment of previous content id which i deleted. How can i start the id from 1 again once i delete every entry? Am using mysql as db
Ebenezer
How do I do that?
Please what editor are you using?
Editing Name
and i'm usingo docker-compose
Ebenezer
pycharm
On the bottom right corner, you’ll see the current interpreter. If it is not set to your virtual env, kindly change it
Ebenezer
Yeah, what’s the name of your virtual env?
Ebenezer
Yeah, what’s the name of your virtual env?
Change the interpreter to the virtual env within which you installed the boto3 module. It should correct the error.
Ebenezer
Change the interpreter to the virtual env within which you installed the boto3 module. It should correct the error.
Just click on the python3.8 and browse to select your virtual env interpreter
Editing Name