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
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
Bwaks
Mirco
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?
Mirco
Li
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
Mirco
Tech
Can any one help me how to add a licensed key to python code
Tech
So that license should be renewed
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
Mirco
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
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
Ashri
What
Mirco
Ashri
Ok
Anonymous
many thanks
Morteza
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)
Morteza
Morteza
Jaime
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
Shivam
𝕯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
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??