Skip to content
Advertisement

Tag: django-views

Storing images in sqlite – Django

I’m new to Django and databases. Django used the sqlite database as it’s default database. Is it possible to store images in the sqlite database and display it on my webpage? I can’t find any documentation on the official Django website for it. Answer Django’s ImageField and FileField are both just links to the location where the file is actually

Why am I getting a Django NoReverseMatch error?

I am trying to send an activation email to users when signing up, but I keep getting a NoReverseMatch error when trying to render the URL in the template. The error I get is: urls.py template.txt Answer The pattern for the token variable is: THis thus means that there are two sequence of [0-9A-Za-z] characters: one with one to thirteen

Django Rest Framework: Access to passed arguments from views in serializers

Before asking this question, I have seen the following links but they don’t help me at all: pass extra arguments to serializer pass request context to serializer from viewset pass context from one serializer to another I have an author model that has foreign key to default django user model: apps/author/models.py Post model has a foreign key to Author. apps/posts/models.py

Advertisement