Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
AttributeError: Manager isn't available; 'auth.User' has been swapped for 'main.CustomUser'
I am trying to add new users who signup to a group called user but i am facing this error. AttributeError: Manager isn't available; 'auth.User' has been swapped for 'main.CustomUser' this is my models.py file class CustomUser(AbstractUser): point = models.IntegerField(default=0) class App(models.Model): appname = models.CharField(max_length=255) link = models.CharField(max_length=100) category= models.CharField(max_length=100) subcategory = models.CharField(max_length=100) points = models.IntegerField() created_at = models.DateTimeField(auto_now_add=True, null=True) appicon = models.ImageField(upload_to='icon/') def __str__(self): return self.appname this is my signup view def sign_up(request): if request.method == "POST": form = RegisterForm(request.POST) if form.is_valid(): user = form.save() user_group, created = Group.objects.get_or_create(name='user') user.groups.add(user_group) login(request, user) return redirect('/app') else: form = RegisterForm() return render(request,'registration/signup.html', {'form':form}) i have also added this to my settings.py file AUTH_USER_MODEL = 'main.CustomUser all iam trying todo is add new users to a group please help. i tried this code in apps.py file but didnt help. class MainConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'main' def ready(self): from django.contrib.auth.models import Group from django.db.models.signals import post_save def add_to_default_group(sender, **kwargs): user = kwargs["instance"] if kwargs['created']: group, ok = Group.objects.get_or_create(name="default") group.user_set.add(user) post_save.connect(add_to_default_group, sender=settings.AUTH_USER_MODEL) -
Firebase Auth Issue through React JS and Django Templates
I'm using React JS to create the login page. For the I used Firebase 10.7.1 npm module to create the authentication. Here is my quick code for Auth: const provider = new GoogleAuthProvider(); signInWithPopup(auth, provider) .then((result) => { // Get the ID token directly from the result object const idToken = result._tokenResponse.idToken; // Updated this line // Send the token to your backend sendTokenToBackend(idToken); // Updated this line }) .catch((error) => { console.error("Error during Google Sign In: ", error); }); Authentication works fine in react JS and when i run the build and paste the files to render them through the django templates. I can see the react code rendered perfectly. However, now when I try to sign in, halfway of the execution I get the below error doesn't matter if I allow all domains for CORS in Django: It had the same behaviour when I was creating the same code in the native Java script for signInWithPopUp. I've tried multiple browsers: Chrome, Firefox, Edge -
Building an Error-Prone OpenAI API Wrapper with Rate Limiting for Asynchronous Tasks in Python
StackOverflow community! I'm working on a Django project where I need to build a robust and efficient wrapper around the OpenAI API for asynchronous tasks. My main goals are: API Wrapper Design: To create classes that effectively wrap the OpenAI API, enabling model selection and prompt generation. Rate Limiting: Implementations to handle rate limits, specifically for both tokens per minute and requests per minute. Asynchronous Task Management: Utilize asynchronous tasks, possibly with Celery, to manage API calls without exceeding the rate limits. Here's what I've conceptualized so far: Wrapper Class: A class that handles the connection to the OpenAI API, including methods for selecting models and sending prompts. Prompt Generation: Classes or methods dedicated to constructing and managing prompt structures. Rate Limiting: Implementing a system to track and control the rate of API requests, possibly integrating with the Celery task queue. (Using Redis as Token Bucket? I have the feeling my implementation sometimes does not work correctly if somehow several worker block and write the same tokenbucket at the same time). (Celery Worker Concurrency is 1, but still I am getting on a different API "Too Many Requests" even if my TokenBucket has the right amount of it). My questions … -
Django throws an invalid input syntax error when I use foreign key
I have been setting up admin page to upload images based on different categories. I referenced categories as foreign key in the gallery model but as I submit or save the admin upload form it throws the error " invalid input syntax for type integer". screenshot before saving error screenshot models.py class Category(models.Model): name = models.CharField(max_length=100, null=False, primary_key=True) objects = models.Manager() class Gallery(models.Model): id = models.AutoField(primary_key=True) category = models.ForeignKey('Category', on_delete=models.SET_NULL, null=True) title = models.CharField(max_length=100, null=False) image = models.ImageField(upload_to='images/') by the way I'm using postgreSQL. -
auto add variable in template
I added mydata in setup function of the BaseView. class BaseView(View): def setup(self, request, *args, **kwargs): super().setup(request, *args, **kwargs) self.mydata = table.objects.all() When I print it in the get function of child class, the value is correct but I'd like this variable be added in template file automatically. def get(self, request, pk=''): print('self.active_apps in plan') print(self.active_apps) user_info = request.session.get('user_info') context = {'user_info':user_info} if pk != '': item = get_object_or_404(self.model_class, pk=pk) form = self.form_class(instance=item) context['form'] = form context['pk'] = pk else: form = self.form_class() context['form'] = form return render(request, self.template_name, context) -
Accordion through loop in Django templates
Working with Django templates. I tried to make an accordion with checkboxes inside. Now it is displayed, but since it was made through a cycle, when you click on one of the sections of the accordion, all the others open, and when you click on the checkboxes, the very first one is checked. <div class="accordion" id="accordionPanelsStayOpenExample"> {% for category, vaccines in category_vaccines.items %} <div class="accordion-item"> <h2 class="accordion-header" id="panelsStayOpen-heading{{ loop.index }}"> <button class="accordion-button" type="button" data-bs-toggle="collapse{{ loop.index }}" data-bs-target="#panelsStayOpen-collapse{{ loop.index }}" aria-expanded="true" aria-controls="panelsStayOpen-collapse{{ loop.index }}"> {{ category }} </button> </h2> {% for vaccine in vaccines %} <div id="panelsStayOpen-collapse{{ loop.index }}" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-heading{{ loop.index }}"> <div class="accordion-body"> <div> <input id="html{{ loop.index }}" type="checkbox"> <label for="html{{ loop.index }}">{{ vaccine.name }}</label> </div> </div> </div> {% endfor %} </div> {% endfor %} </div> I tried to make the elements have unique ids using loop.index, it still works the same. Tell me, what am I doing wrong? -
Django admin image upload error "submitted file is empty"
I was trying to upload an image with the ImageField and one I select the image and click save it is throwing an error that the submitted file is empty. error screenshot models.py class Gallery(models.Model): id = models.AutoField(primary_key=True) category = models.ForeignKey(Category, on_delete=models.SET_NULL, null=True) title = models.CharField(max_length=100, null=False) image = models.ImageField(upload_to='images') urls.py if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root= settings.MEDIA_ROOT) Also it has not created a media directory. is it because that I have a directory named media inside my static? media directory i created inside static MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') Checked google for quick fixes. -
How to have a master detail datatableview in django using MultipleDatatableView
I'd like to have a master-detail datatableview in my app. I've used MultipleDatatableView according to the document. I'm confused How to edit the front and add a GET parameter hint (exp: ?datatable=master) . Without using MultipleDatatableView, my code works correctly but when I change it to multiple, it doen't work because of this error: django.utils.datastructures.MultiValueDictKeyError: 'datatable' I tried to add datatable=master in the option of datatable, but this doesn't work. -
Database columns not being created from base class
I am trying to run migrations from a Django 5.0 project, with the default SQLite database connected. The contents of my models.py file are as follows class CustomBaseModel(models.Model): InsertedBy = models.BigIntegerField(blank=False), InsertedDateTime = models.DateTimeField(blank=False, auto_now_add=True), UpdatedBy = models.BigIntegerField(blank=False), UpdatedDateTime = models.DateTimeField(blank=False, auto_now_add=True), class Meta: abstract = True class ExcelColumnDataType(CustomBaseModel): DataTypeName = models.CharField(max_length=100, blank=False) class Meta(CustomBaseModel.Meta): db_table = "ExcelColumnDataTypes" However, when I run the commands for migration, only "id" and "DataTypeName" columns are being created in the table ExcelColumnDataTypes. The columns specified in the base class are not being created. The contents of the auto-generated migration file is given below class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ExcelColumnDataType', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('DataTypeName', models.CharField(max_length=100)), ], options={ 'db_table': 'ExcelColumnDataTypes', 'abstract': False, }, ), ] I have also tried removing all tables in the SQLite database file and removing the .py migration files in "migrations" folder. Even then, the same result occurs. Can you please tell me what I am doing wrong? -
createin branches on django website for each admin user
i want to create a branch for each new admin that is register on my e-commerce website based on location of my shops and along with the staff and every transaction and sell done in each branch will only show on that branch -
Someone could help me I have problems with the environment [duplicate]
(entorno) PS C:\\Users\\maner\\OneDrive\\Escritorio\\Secoed\\secoed-develop\> python manage.py createsuperuser Traceback (most recent call last): File "manage.py", line 22, in \<module\> main() File "manage.py", line 18, in main execute_from_command_line(sys.argv) File "C:\\Users\\maner\\OneDrive\\Escritorio\\Secoed\\entorno\\lib\\site-packages\\django\\core\\management\__init_\_.py", line 442, in execute_from_command_line utility.execute() File "C:\\Users\\maner\\OneDrive\\Escritorio\\Secoed\\entorno\\lib\\site-packages\\django\\core\\management\__init_\_.py", line 416, in execute django.setup() File "C:\\Users\\maner\\OneDrive\\Escritorio\\Secoed\\entorno\\lib\\site-packages\\django\__init_\_.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\\Users\\maner\\OneDrive\\Escritorio\\Secoed\\entorno\\lib\\site-packages\\django\\apps\\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\\Users\\maner\\OneDrive\\Escritorio\\Secoed\\entorno\\lib\\site-packages\\django\\apps\\config.py", line 193, in create import_module(entry) File "C:\\Users\\maner\\AppData\\Local\\Programs\\Python\\Python38\\lib\\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 973, in \_find_and_load_unlocked ModuleNotFoundError: No module named 'channels' python manage.py createsuperuser -
Django Forms with multiple models
I am trying to have a several part form that includes property(address) upload date, inspector, and inspectee. There is an add area button that adds a name of an area(backyard,etc) and notes to go along with that area. lastly there is a picture that lets you upload a picture. enter image description here When i add an area that seems to be working to me. it adds the inputs. the problem is when i click upload i get these errors. enter image description here. The problem is that I have seperate models for the property, inspection, areas, and area images. The idea is that one property should have an inspection, many areas, and each area could have one or more images. Im sure the view is wrong, but I don't know what to do. Maybe its because the inspection form hasnt been submitted so lines in the views like this dont work area.property = inspection.property # Set the property field Although im not sure why i wouldnt get a serverside error when submitting then Here are my models from django.db import models from django.contrib.auth.models import User class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) # Add any additional fields here def __str__(self): … -
Unable to access Google Cloud Secrets from Django application
I am able to access an item stored in Google Cloud secrets from the command line or python console - gcloud secrets versions access 1 --secret=sql-db-pass But if I try to access it from a Django application it throws the following error. I have already set the gcloud project and provided auth-default login as below gcloud config set project my-test-project gcloud auth application-default login CODE: secret_parent = f"projects/{my-test-project}" response = secret_client.access_secret_version(request={"name": sql-db-pass}) payload = response.payload.data.decode("UTF-8") print(f"Plaintext: {payload}") ERROR: google.api_core.exceptions.PermissionDenied: 403 Permission denied on resource project sql-db-pass. [links { description: "Google developers console" url: "https://console.developers.google.com" } , reason: "CONSUMER_INVALID" domain: "googleapis.com" metadata { key: "service" value: "secretmanager.googleapis.com" } metadata { key: "consumer" value: "projects/sql-db-pass " } ] I'm stumped - any suggestions are appreciated -
Is this the best way to handle storage of uploaded files in Django?
I'm not sure if I should use something like fs.save() or another method, such as chunking, to handle file uploads in Django. So far this is my method: def handle_uploaded_file(uploaded_file): filename = uploaded_file.name filepath = os.path.join(settings.MEDIA_ROOT, filename) with open(uploaded_file.name, 'wb') as destination: for chunk in uploaded_file.chunks(): destination.write(chunk) return filepath @csrf_protect def transcribeSubmit(request): if request.method == 'POST': form = UploadFileForm(request.POST, request.FILES) if form.is_valid(): print('valid') uploaded_file = handle_uploaded_file(request.FILES['file']) The purpose of this view is to handle video and audio uploads if this is relevant. I haven't been ablto find any good, simple documentation on this. -
Django Error : No property found matching the query
So I am building a site with Django where a Property has an agent who lists it, in the AgentDetailView I am rendering all the agent's information but I also want to render the agent's listed properties in the same page. So I was trying the Property.objects.filter method but to no success. How can I make my code work? Thanks in advance! My models.py: class Property(models.Model): price = models.IntegerField() address = models.CharField(max_length = 10000) state = models.CharField(max_length = 1000) country = models.CharField(max_length = 1000) description = models.TextField() image1 = models.ImageField(upload_to = 'Images/') image2 = models.ImageField(upload_to = 'Images/') image3 = models.ImageField(upload_to = 'Images/') agent = models.ForeignKey(Agent, on_delete=models.CASCADE) agent_description = models.TextField() is_featured = models.BooleanField(default = False) bedrooms = models.IntegerField() bathrooms = models.IntegerField() date_posted = models.DateTimeField(default=timezone.now) slug = models.SlugField(default='') My views.py: class AgentDetailView(DetailView): model = Agent template_name = 'blog/agent_detail.html' slug_field = 'slug' def get_queryset(self): return Property.objects.filter(agent=self.kwargs.get('agent')) -
splitting Django monolithic
Let's say I've a big Django monolithic e-commerce I've product, orders and webhooks apps I want to split them to make sure that when a service is down, the others stays up when I do some changes in a model, I don't want to keep redoing the changes in the others any ideas on better approaches? -
Integrate Stripe with Django app to give the user a Group
I am trying to integrate Stripe with my Django app. My plan : Someone register for free into my site. If this people want to buy an extra service, the Already Logged user get into a group/role called "Paid Users" (that i've already created), only that. Almost everything works well, including the Stripe Webhook. But I cant! Look my code @csrf_exempt def webhookStripe(request): payload = request.body sig_header = request.META['HTTP_STRIPE_SIGNATURE'] event = None try: event = stripe.Webhook.construct_event( payload, sig_header, settings.STRIPE_WEBHOOK_SECRET ) except ValueError as e: # Invalid payload return HttpResponse(status=400) except stripe.error.SignatureVerificationError as e: # Invalid signature return HttpResponse(status=400) # Handle the checkout.session.completed event if event['type'] == 'checkout.session.completed': #This session print WORKS session = event['data']['object'] print(session) #Problem Starts Here - Only trying to print the user ID for me print("Compra feita com sucesso por") print (get_user(request).id) # Passed signature verification return HttpResponse(status=200) Every time i need to see the ID, or username, or anything about the current user, it shows me: enter image description here "None" Apparently, when the payment is OK, it loses temporarily everything about my user. Tried request.user.username too, but didnt work. Someone can help me? I only need to keep the user informations everytime. Or even better, … -
HTML GET with and without ID in Django View Based Classes
Hello Stranger reading this, Im currently learning Django at work, and we want out project to use View Based Classes instead of using the classic views.py :) The problem Im having is when i try to GET Request my website with ID and without ID in the same class Basically im trying to read my entire DB with: .../sample And only read ID specific entries with ID: .../sample/ Basically what you do in this tutorial, but with View Based Classes: https://www.bezkoder.com/django-rest-api/ I tried the solution suggested for this problem, but i think they differ a little too much: Multiple get methods in same class in Django views So first i tried: path(Sample, SampleClass.asView()), path(Sample/int:id, SampleClass.asView({'get': 'get_id'}) I thought this would reroute the route of the GET with id to use get_id instead of the normal get. Then i tried using the action decorator of the rest_framework: def get(self, request): ... @action(methods=['get], detail=False, url_path='int:id') def get_id(self, request, id): ... And the routing part in the urls.py Seems like a very generic problem, but sadly i wasnt able to solve it myself :( I hope the paraphrasing of the problem is enough, but i can try to describe it further if so … -
Initial value in Django forms
When I try to setup initial value in Django I encounter a problem with sending that value to the database. User should not be able to change the username while posting a review. The field should be populated with username (initial value) that was given during the registration (this part works as per first screenshot) and then input rating (mandatory field) and body (optional field) should be filled by the user. The problem is, when I press "add review" I am encountering below problem. The field 'user' gets erased, the form does not save data into the database (because the form is not valid) and does not allow to move forward until field is populated (which cannot be as the field is disable on purpose). views.py: @require_POST def post_review(request, bookid): book = get_object_or_404(Book, bookid=bookid) if request.user.is_authenticated: form = ReviewForm(data=request.POST) form.fields["user"].initial = request.user.username if form.is_valid(): review = form.save(commit=False) review.book = book review.user = request.user review.save() return redirect(review.book.get_absolute_url()) else: form = ReviewForm(data=request.POST) return render(request, "book/review.html", {"book": book, "form": form}) forms.py: class ReviewForm(forms.ModelForm): def __init__(self, *args, **kwargs): user = kwargs.pop("user", None) super(ReviewForm, self).__init__(*args, **kwargs) self.fields["user"].initial = user class Meta: model = Review fields = ("user", "rating", "body") widgets = { 'user': forms.TextInput(attrs={"readonly": "readonly", … -
jwt token is not working with custom user
Hi I want to implement jwt login method in django rest framework. Below are the libraries I use. asgiref 3.7.2 Django 5.0 django-debug-toolbar 4.2.0 djangorestframework 3.14.0 djangorestframework-simplejwt 5.3.1 pip 23.3.1 PyJWT 2.8.0 pytz 2023.3.post1 setuptools 68.2.2 sqlparse 0.4.4 Python Version is 3.11.6 Below are the settings I made. settings.py INSTALLED_APPS = [ ... 'rest_framework', 'rest_framework_simplejwt', 'debug_toolbar', ''' ] AUTH_USER_MODEL = 'accounts.User' REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework_simplejwt.authentication.JWTAuthentication', ), } REST_USE_JWT = True User Model Custom from django.db import models from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, PermissionsMixin class UserManager(BaseUserManager): def create_user(self, username, password, **kwargs): if not username: raise ValueError('Users must have an username') user = self.model( username=username, ) user.set_password(password) user.save(using=self._db) return user def create_superuser(self, username=None, password=None, **extra_fields): superuser = self.create_user( username=username, password=password, ) superuser.is_staff = True superuser.is_superuser = True superuser.is_active = True superuser.save(using=self._db) return superuser from django.db import models from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin from django.utils.translation import gettext_lazy as _ from accounts.managers import UserManager class User(AbstractBaseUser, PermissionsMixin): username = models.CharField(max_length=30, unique=True, null=False, blank=False) is_superuser = models.BooleanField(default=False) is_active = models.BooleanField(default=True) is_staff = models.BooleanField(default=False) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) # 헬퍼 클래스 사용 objects = UserManager() USERNAME_FIELD = 'username' Signup, Login class RegisterAPIView(APIView): def post(self, request): serializer = UserSerializer(data=request.data) if serializer.is_valid(): user = … -
Updating user's API call based on user premium status using Djagno custom throttle
I'm trying to write a custom throttle that checks a user's account premium status when making an API call. Looking at the docs I believe I wrote the custom throttle correctly updated my settings. I'm building a translation website where a user clicks a button on a piece of text and provides translation returned from a translator API. Django Settings REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.TokenAuthentication', ], 'DEFAULT_THROTTLE_CLASSES': [ 'rest_framework.throttling.ScopedRateThrottle' ], 'DEFAULT_THROTTLE_RATES': { 'premium': '5/day', 'user': "1/day", } } throttles.py from rest_framework.throttling import UserRateThrottle class UserType(UserRateThrottle): def allow_request(self, request, view): user_type = getattr(request.user, 'premium_account', None) if user_type == False: request.scope = 'user' else: request.scope = 'premium' return super().allow_request(request,view) How I'm passing my UserType into my API. class Translator(APIView): throttle_classes = [UserType] def get(self, request, *args, **kwargs): I tried writing a custom DEFAULT_THROTTLE_CLASES item and it was counting any interaction with my website (like logging in) against the throttle rate. -
Django subclass that has a reference to instance of parent class
I'm trying to make a subclass that has a foreignkey to another instance of its parent class, for example for up-sampling. I want to do this so that I can get a dropdown in a form that has a list of all the classes, regardless of whether it is based on another instance. class ImageResolution(models.Model): image_depth = models.IntegerField(default=3) image_width = models.IntegerField(default=1920) image_height = models.IntegerField(default=1080) class DerivedImageResolution(ImageResolution): base_resolution = models.ForeignKey(ImageResolution, on_delete=models.DO_NOTHING, related_name='base_resolution') This throws an error: imageapp.DerivedImageResolution.base_resolution: (models.E006) The field 'base_resolution' clashes with the field 'base_resolution' from model 'imageapp.imageresolution'. Is it possible to do this? If so, how can it be done? -
Why I can't install django in my virtual enviroment?
Well, basically i'm trying to install django through this code: pipenv install django and the result is:[] then I have an ERROR: Couldn't install package:... thousand of things I can't even show here I tried to download the new python version and the new django version but keeps asking for python >=3.7 and I can't understand why I have no idea about what to do because as I stopped backend to study datascience I let django and python on the corner and now I don't even know what happened. I tried to download python 3.12 and Django 5.0 but didn't work MAYBE as I just deleted some folders from my computer related to django as I wasn't working with it there can be something faulting. When I uninstall django and install again, there is some requirements already installed on my computer and it can be the error. -
Adding custom rich text format to Wagtail
I need to use underline for a certain project and I discovered it was frowned upon by the developers. While respectfully disagreeing with the opinion, Wagtail has enough documentation to make it possible to spin my own feature to try to add it back. I succeeded in showing an underline feature in the editor but the frontend doesn't render a <u> tag. @hooks.register("register_rich_text_features") def register_underline_feature(features): """ Registering the `underline` feature, which uses the `UNDERLINE` Draft.js inline style type, and is stored as HTML with a `<u>` tag. """ feature_name = "underline" type_ = "UNDERLINE" tag = "u" control = { "type": type_, # for all intents and purposes this should have worked but the actual icon is missing. Deliberate? # "icon": "underline", "label": "U͟", "description": "Underline", "style": {"textDecoration": "underline"}, } features.register_editor_plugin("draftail", feature_name, draftail_features.InlineStyleFeature(control)) db_conversion = { "from_database_format": {tag: InlineStyleElementHandler(type_)}, "to_database_format": {"style_map": {type_: tag}}, } features.register_converter_rule("contentstate", feature_name, db_conversion) features.default_features.append("underline") My suspicion is in db_conversion. I was looking into turning the tag into a <u> or a <span> with an inline text-decoration style in the frontend but it doesn't. What am I missing? -
Don't get linkify=True working within Django-Tables2 Column
I want to display two tables a single page/view (using MultiTableMixin). Within each row there should be links to the instance (display), modification and deletion. Classical access to (c)RUD operations through extra columns compared to the actual model. I also saw a similar question already. But it didn't work as expected. I wanted to simplify/ clean up my code using linkify instead of LinkColumn. Unfortunately, I already struggle with the display part. The following old style works: columns.LinkColumn( "matching:search", args=[A("pk")], verbose_name="", text="display", orderable=False, ) As stated by the docs, using linkify=True should call the get_absolute_url method of the underlying model instance. The method clearly is present and tested. Hence, I added to the table `display = tables.Column(orderable=False, verbose_name="", linkify=True). But all I get is "--" within the now created display column instead of the wanted link. Looking at the source code I see a needed accessor attribute for the linkify to take effect. Am I understanding something wrong? Any help to clearify would be appreciated.