Genemator
what good plugins for django are there?(pycharm)
Complex_101
Is heroku dyno pricing calculated hourly?
~~~
how to prevent duplicate file upload in django?
Macurrent
Today i just accidentally deleted my code and i don't have any idea on how i can recover it back, Is there a way to recover it ?? i was using vscodium?? And again i learned git recently about local repo, will using git help me solve this kind of problem in future??
Bwaks
Hello am getting this error AttributeError: module 'django.db.models' has no attribute 'DateTimeRange' ......... after i have imported like.... from django.contrib.postgres.fields import DateTimeRangeField........and used it like event_date = models.DateTimeRange()
Mirco
you are importing it from contrib and not from django.db.models
Bwaks
Mirco
i have but got this error
from django.contrib.postgres.fields import DateTimeRangeField event = DateTimeRangeField(...)
Mirco
and not models.DateTimeRange()
Mirco
study a bit more Python before Django, it's highly recommended
Artem
Request — cur.execute("INSERT INTO passage_enter (enter_status, turnstile_id, user_id) VALUES (?,?,?)", (enter, turnstile_id, user_id)) Model field — datetime = models.DateTimeField(auto_now=True, editable=False) Why am I getting error sqlite3.IntegrityError: NOT NULL constraint failed: passage_enter.datetime while there is auto_now=True in the Model?
Artem
use the ORM instead of raw sql
Do you think it is the problem of getting this error?
Mirco
Do you think it is the problem of getting this error?
no I think you should avoid raw SQL in Django when you can
Jeff
I have an error here and I still haven't found a way to find out where it happens. When I run makemigrations, ok, but if I run it a second time, I'll aways get Traceback (most recent call last): File "manage.py", line 11, in <module> execute_from_command_line(sys.argv) ... for name, instance in state.models[app_label, self.model_name_lower].fields: KeyError: ('accounts', 'group')
Jeff
It doesn't matter if I pick a single app
Adam
▼ Local vars Variable Value context Error in formatting: OperationalError: no such table: tasks_tasks request <WSGIRequest: GET '/'> tasks Error in formatting: OperationalError: no such table: tasks_tasks
Adam
django.template.exceptions.TemplateDoesNotExist: tasks/list.html
Tech
Can any one help me how to add a licensed key to python code
Tech
So that license should be renewed
Shahar
Django and DataTables I have some Datatables built-in element, and I want to append to it a form POST which contains some inputs. So I'm appending this element via Jquery. My problem is, csrf token must be added to this form, and in Django it is done with {% csrf_token %}. But when I'm adding it with the Jquery, it is added as plaintext, and is not identified by Django's templating engine. Does someone know how to overcome this issue?
*Docker deployment question* I'm rather new to Docker and containerization stuff, so I'd be glad if you can guide me on how to accomplish something. I have a simple Django project which uses a static SQLite DB to display its data on the webpage. I want to assemble a docker which: 1. Running a Django project. 2. Mount the directories from which we run the Django project with docker, where each of these mounted directories will contain a static SQLite DB file. 3. I want the user who runs the Django docker to be able to give as an argument a name of one of the mounted directories, such that the Django application will use its static SQLite file to display the data.
Sumit
How can I create subdomain for each user in django?
Sumit
Let's say there are two user with username1 and username2 and my domain is domain.com , so I want there profile should be opened as username1.domain.com and user2.domain.com
Sumit
Like as website opens in GitHub or wix and lot more
Anonymous
Can any one help me,last login based how to sent missing notification
🐤
Can someone help me to solve my problem with django filters? https://stackoverflow.com/questions/68017203/i-have-troubles-while-filtering-by-year-and-month-in-django
Firdaus
For import/export of CSV I'm using django-import-export extension. So far no problem to import/export using built-in django admin. But how do I integrate it with django-rest-framework which I'm using for API endpoints? Currently I already have and endpoint like /api/v1/student/ for CRUD. I would like to have: - GET /api/v1/student/csv/ = to download CSV - POST /api/v1/student/csv/ = to upload CSV All of my existing endpoints are created using ModelViewSet Reference: https://www.django-rest-framework.org/api-guide/viewsets/#modelviewset https://django-import-export.readthedocs.io/en/latest/
cr
How to Set value of intial number of form in inline model of django admin using js?? I tried changing value of total forms but it doesn't open the forms
Vinay
How to logout user after x minutes of inactivity? I tried setting up SESSION_COOKIE_AGE = 10 in setting.py file but doesn't expired after 10 seconds of inactivity?
ajith
Any one have simple django documentation for beginners?
ma
Is there anyone use autho ldap
ma
I need help
ma
Plz
V
Vj: Simple task for initial practice On click of button, name and age fields get populated from mongo db data model with 3 samples records already in place UI webpage with name,age,button already in place Just what sever , should I use, needed to decided I wish to do 3cases, atleast 1 or 2 or 3 1case , browser to server to db 2case, browser to server 3case, only at browser level Population of name, age vales on click of button Case2, and case3 hard-coded values are returned back to browser, as such there's no db interaction
Firdaus
Any one have simple django documentation for beginners?
- https://docs.djangoproject.com/en/3.2/intro/tutorial01/ - https://tutorial.djangogirls.org/ - https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django
Jaime
Hey what have to do to align this HTML some plugin to visual code. ?? Look this..
Jaime
Can't send photo sorry.
Doragonsureiyā
Is there anyone use autho ldap
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Ashri
Hii guys I am new to django
Ashri
Here I have done few things in replit.com Can any one help me to practice some app like stuff in that
Ashri
I will share screenshots here if any one is ok with me
Ashri
Hello Please help me
Ghorz
Hello Please help me
It's time #please #help #me get redirected to pythonoftopic
Ashri
What
Ashri
Ok
Anonymous
many thanks
Somesh
After I logout I am losing my session key 'cart' and data as well.. Any idea how to fix this.. I after log out i want see my all cart data...
Jaime
hey There is how I solve this
Jaime
class ActualizarWeb(ModuleMixin,UpdateView): model: Web form_class= WebForm template_name='ActualizarWeb.html' def get_queryset(self, *args, **kwargs): return Web.objects.filter(id=1)
Jaime
i put it class ActualizarWeb(ModuleMixin,UpdateView): model: Web form_class= WebForm template_name='ActualizarWeb.html' success_url = reverse_lazy("inicio") def get_queryset(self, *args, **kwargs): return Web.objects.filter(id=1)
Jaime
AttributeError at /web/update/1 'dict' object has no attribute 'dict'
Jaime
show that error
Emc
Hi, there ! Can someone explain me how to redirect to a home page instead of rendering 404 page in Django? Thank you!
Emc
Just some clue would be nice)
A⃠r⃠a⃠v⃠i⃠n⃠d⃠
Guys is there any good django open source projects repos(Good Means leading by experienced developers or community ). Because i want to know the coding style and structure of some real time projects. So.
A⃠r⃠a⃠v⃠i⃠n⃠d⃠
Clearly i want to know how is the coding approach (coding style, app structuring etc)in real time django projects. I doesn't work any real time django projects yet.
Kissanth
Netflix clone using django
Shivam
How to delete a username in django auth user
𝕯aniel
How to delete a username in django auth user
What you meaning when u said delete username in django auth user?
𝕯aniel
You want delete a user?
Shivam
Yes
sunita sharma
Is it mandatory to use default User Model for login , authentication features ? Can we make our own separte model to fo this ?? Whts the difference in both the ways ??
Isaac
Is it mandatory to use default User Model for login , authentication features ? Can we make our own separte model to fo this ?? Whts the difference in both the ways ??
Nope it is not mandatory. You can make an AbstractUser Model to use. Read more here https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
Isaac
https://docs.djangoproject.com/en/3.2/topics/auth/customizing/
Abdulaziz
how to upload multiple files in createview? class ClaimCreateView(LoginRequiredMixin, CreateView): model = Claim form_class = ClaimForm template_name = "claim/claim_create.html" def get_success_url(self): return reverse('claim_table') def form_valid(self, form): form.instance.author = self.request.user return super(ClaimCreateView, self).form_valid(form) media = models.FileField(upload_to='media/Driver_Statement/', null=True, blank=True)
Macurrent
Is there any book that will help me to just learn django generic views??