Category "django"

Override save method of Django Admin

Well, I want to save any instance of a model without taking care about DDBB structure. So I decide to override def save in every model´s class. Kind of:

Took too long to shut down and was killed

WARNING Application instance <Task pending coro=<__call__() running at /home/developer/projects/tabcon/tabcon_env/lib/python3.5/site-packages/channels/h

How to automatically login a user after registration in django

This is what I am currently using for registration: def register(request): if request.method == 'POST': form = UserCreationForm(request.POST)

How do I install an old version of Django on virtualenv?

I want to install some specific version of a package (in this case Django) inside the virtual environment. I can't figure it out. I'm on Windows XP, and I creat

django: invalid syntax path('details/<int:id>/', views.details, name='details')

views.py file def details(request, id): post = Posts.objects.get(id=id) context = { 'post': post } return render(request, 'posts/details.html', context)

How to take a zipfile as a File object in django?

I have a folder named 'src' of which I create a zip file named zf. I want to pass zf as a FileField object to newobj.fd. import zipfile from django.core.files i

How to take a zipfile as a File object in django?

I have a folder named 'src' of which I create a zip file named zf. I want to pass zf as a FileField object to newobj.fd. import zipfile from django.core.files i

python: can't open file 'manage.py': [Errno 2] No such file or directory

I have created a Django project "post_blog" in which I have created an app "blogs". C:Users/arpchauh/PycharmProjects/post_blog/blogs>python manage.py runser

Django models | get specific columns

Is there a way to filter and get only specific columns? For example, get all entries with the column first_name.

Django models | get specific columns

Is there a way to filter and get only specific columns? For example, get all entries with the column first_name.

Django models | get specific columns

Is there a way to filter and get only specific columns? For example, get all entries with the column first_name.

Django models | get specific columns

Is there a way to filter and get only specific columns? For example, get all entries with the column first_name.

Django models | get specific columns

Is there a way to filter and get only specific columns? For example, get all entries with the column first_name.