Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django Password-Reset Custom Template not working
I want to use Django's built-in PasswordChangeView to let users reset their passwords. My PasswordResetView and my PasswordResetDoneView are working. Django always give me the error: NoReverseMatch at /reset Reverse for 'password_reset_confirm' with keyword arguments '{'uidb64': 'MTM', 'token': '549-1f211ad25c6d91e420a4'}' not found. 1 pattern(s) tried: ['password_change/$'] I already tried to add: path('password_change/', auth_views.PasswordResetConfirmView, {"template_name": "authenticate/reset/password_change.html"}, name="password_reset_confirm"), but that didn't change anything. My urlpatterns: path('reset', auth_views.PasswordResetView.as_view(template_name='authenticate/reset/reset.html'), { 'template_name': 'email/test.html', 'html_email_template_name': 'email/test.html', 'email_template_name': 'email/test.txt', 'subject_template_name': 'email/test.txt', }, name='password_reset'), path('reset/done', auth_views.PasswordResetDoneView.as_view(template_name='authenticate/reset/reset_done.html'), name='password_reset_done'), path('password_change/', auth_views.PasswordChangeView, {"template_name": "authenticate/reset/password_change.html"}, name="password_change"), path('password_change/', auth_views.PasswordResetConfirmView, {"template_name": "authenticate/reset/password_change.html"}, name="password_reset_confirm"), my password_change.html: {% extends 'base.html' %} {% load staticfiles %} {% block headAddition %} <link rel="stylesheet" href="{% static 'authenticate/authenticate.css' %}"> {% endblock %} {% block content %} <section style="color:#000;"> <div class="wrapper"> <form method="post"> {% csrf_token %} <fieldset> <h1>Passwort resetten</h1> <p class="info">Gib dein Passwort zweimal ein, um sicherzustellen das du dich nicht vertippt hast.</p> {{ form.as_p }} </fieldset> <fieldset> <button type="submit" class="green next">Passwort resetten</button> </fieldset> </form> </div> </section> <script> $("form #{{ form.password.id_for_label }}").bind("cut copy paste", function(e){ e.preventDefault(); }); </script> {% endblock %} -
how to filter foreign key in django django filter
i want to get the username using the field user (foreignkey) i dont know how get the username in the view I appreciate any help model.py class Publication(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) filters.py class PublicationFilter(django_filters.FilterSet): user = django_filters.CharFilter(lookup_expr='exact') class Meta: model = Publication fields = ['user'] views.py def publication_list(request): f = PublicationFilter(request.GET, queryset=Publication.objects.all()) return render(request, 'info/filter.html', {'filter':f}) html <h2>Lista de sus informes</h2> <p class="profile-data"> <div class="col-md-4 mt-2 mb-3 "> <div class="row p-1"> <div class="col-md-12"> <form action="" method="get" > <b> {{ filter.form.as_p }} </b><br> <button type="submit">Search</button> </form> <ul> <b>{% for profile in filter.qs %} </b><br> <b>{{ profile.nombre }} </b><br> <b>{{ profile.user }} </b><br> <a href="{% url 'profiles:detail' profile.user %}">Ver perfil</a><br> {% endfor %} -
ExecutorCallAdapterFactory$ExecutorCallbackCall@5063
Response = null & req = null & Bad request 400 when i use localhost public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String mob="09143612440"; resiveWordnet(mob); } public void resiveWordnet(String mobile){ Gson gson = new GsonBuilder() .setLenient() .create(); Retrofit retrofit = new Retrofit.Builder() .baseUrl("http://10.0.2.2:8000/book/") .addConverterFactory(GsonConverterFactory.create()) .build(); Apiconfig apiconfig = retrofit.create(Apiconfig.class); Call<List<Object>> call = apiconfig.sendMobile(); call.enqueue(new Callback<List<Object>>() { @Override public void onResponse(Call<List<Object>> call, Response<List<Object>> response) { List<Object> req = response.body(); int x = 10; } @Override public void onFailure(Call<List<Object>> call, Throwable t) { } }); } } ApiConfig is interface //interface public interface Apiconfig { //@FormUrlEncoded @POST("wordnet/good") Call> sendMobile(); } what is problem?please help me -
My view is takiing me to the same page over and over
Hey guys I made a model that can upload some files and then i made two views upload_list.html and upload_detail.html the list pages contains the links to the actual detail page but while clicking on the links it takes me to the same page again Here,s the models.py class Upload(models.Model): image = models.ImageField(upload_to = 'images',) file = models.FileField(upload_to = 'images/%Y/%M/%d/') name = models.CharField(max_length = 200) def __str__(self): return self.name def get_absolute_url(self): return self.pk{} Here,s the views.py def upload_list(request): upload_list = Upload.objects.all() return render(request,'app/upload_list.html',{'upload_list':upload_list}) def upload_detail(request,pk): upload_detail = get_object_or_404(Upload,pk = pk) return render(request,'app/upload_detail.html',{'upload_detail':upload_detail}) Hers, the urls.py url(r'^upload/',views.upload_list,name = 'upload_list'), url(r'^upload/(?P<pk>[-\w]+)/$',views.upload_detail,name = 'upload_detail'), Hers, the upload_list.html {% extends 'app/base.html' %} {% block content %} {% load static %} {% for i in upload_list %} <div class="jumbotron"> <a href="{% url 'upload_detail' i.pk %}">{{i.name}}</a> <br> </div> {% endfor %} {% include 'app/index_js.html' %} {% endblock content %} Here,s the upload_Detail.html {% extends 'app/base.html' %} {% block content %} {% load static %} <div class="jumbotron"> <h1>{{upload_detail.name}}</h1> <img src="{{upload_detail.name}}" alt="'Image for you,r betterment "></img> {{upload_detail.file}} </div> {% include 'app/index_js.html' %} {% endblock conten`t %}` -
Override default text label from any external Packages Modules at Django admin
It's the classic way to describe Modules in Django Admin, and It's works great! at bookshelf/apps.py from django.apps import AppConfig class BOOKConfig(AppConfig): name = 'bookshelf' verbose_name = "Your Book" at bookshelf/__init__.py default_app_config = 'bookshelf.apps.BOOKConfig' BUT when you are thinking to override external title modules (E.G. like packeges we found here https://djangopackages.org/ ) what's the right way to overscript the default name at this sections and the itens inside that? -
Passing Data to Template
I have following data I want to pass to Django Template. ______________________________________ |Server | Info Events | Error Events | |_______|_____________|______________| |servera| 30 | 12 | |_______|_____________|______________| |serverb| 5 | 22 | |_______|_____________|______________| |serverc| 10 | 18 | |_______|_____________|______________| |serverd| 20 | 02 | |_______|_____________|______________| |servere| 38 | 23 | |_______|_____________|______________| I want to pass this data over to template using return render (request, 'serverdata':serverdata) but I need help to know how can we do this for rows containing more than one column if it contained only 1 column , I can store it as a Dictionary, but what in case of more than one columns of information ? -
Queryset return response customize
I'm pretty new to Django restframework, what i'm trying now is to return object with foreignkey. I'm using def get_queryset(self): def get_queryset(self): """ Optionally restricts the returned purchases to a given user, by filtering against a `username` query parameter in the URL. """ userid = self.request.query_params.get('user_id', None) userExist = User.objects.filter(id=userid) if userExist.exists(): queryset = LocationData.objects.filter(user__id=userid).order_by('-source_id')[:1] return queryset Right now the result is [ { "id": 31, "source_id": "55", "latitude": "24654", "longitude": "454654", "date_created": "2019-02-08T17:10:09.318644Z", "date_modiefied": "2019-02-08T17:10:09.318714Z", "area": "54546", "user": { "id": 1, "name": "Dormy", "date_created": "1992-01-18T03:29:53.388000Z", "date_modiefied": "2018-02-19T05:17:00.164000Z", "serverTime": "", "fcmTokenId": "" } } ] But i want that queryset to return as below one, since i can read those key-pair values in android { "collection": { "data": { "id": 31, "source_id": "55", "latitude": "24654", "longitude": "454654", "date_created": "2019-02-08T17:10:09.318644Z", "date_modiefied": "2019-02-08T17:10:09.318714Z", "area": "54546", "user": { "id": 1, "name": "Dormy", "date_created": "1992-01-18T03:29:53.388000Z", "date_modiefied": "2018-02-19T05:17:00.164000Z", "serverTime": "", "fcmTokenId": "" } }, "statusCode": 200, "version": "1.0" } Is there any way to include custom key in queryset or modify ? Thanks! -
Include python console in Django application to interact with dataset
How can I include a Python terminal / console in a Django application that users can execute python code against? For example, df.column_b * df.column_a if the example data is: column_a, column_b 1, 2 2, 4 3, 8 My use case is that it is easy for me to get data into my Django application. However, a common use case is for users to copy and paste the data into a spreadsheet and start doing some work / computation with the data. It would be nice if they didn't have to leave the page and could just do the computations directly in Python. An example website is LearnPython.org. After inspecting the website a little bit, it looks like it uses CodeMirror.js. I have taken a look at the CodeMirror docs and the div for LearnPython.org's Run button, but it is not clear to me how I'd take the leap from registering an onClick event to: Sending the code to the Django server Executing the code Sending the results back Or could I do this all client side? Any pointers in the right direction is greatly appreciated. -
BPMN dynamic workflow for Django
I want to build a Django solution which workflow can be defined and changed on the fly, hopefully by updating a BPMN diagram without having to change the source code and redeploy. Despite such a feature has been around for quite a while in Java (i.e. Camunda and Bizagi), in the context of Django it seems to have not sparked the same interest since the usual places where I searched did not provide any satisfactory answers. The answers to a similar question from 2011 revealed that the term "workflow" is so wide that could mean many things. However, after some scrutiny it seems to boil down to two approaches: Django-based workflows and BPMN engines. The problem with Django-based workflows listed in Github and Django packages is that the most popular/stable (for example Viewflow or ActivFlow) provide some kind of framework to ease the implementation of your states and transitions but, at the end of the day, you need to code changes by hand each time that the stakeholders change their mind about the process flow. The most promising option found at the awesome Django list was django-river which at least stores the states and transitions of the workflow as Django … -
Issues displaying a GeoJSON map with Mapbox
I am trying to display some local GeoJSON file on a map using Mapbox. In my HTML file, running the line <div class="show_data">{{ data }}</div> displays some GeoJSON file contents. For example, {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"}}, {"type": "Feature", "geometry": {"type": "LineString", "coordinates": [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]]}, "properties": {"prop0": "value0", "prop1": 0.0}}, {"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]}, "properties": {"prop0": "value0", "prop1": {"this": "that"}}}]} Using geojson.io I have verified this is correctly formatted GeoJSON. Now, if I run: map.on('load', function () { map.addLayer({ 'id': 'sourceid', 'type': 'fill', 'source': { 'type': 'geojson', 'data': {{ data }} } }); }); The map DOES NOT load. However if I copy-paste the exact contents of {{ data }} to the same code, ie. map.on('load', function () { map.addLayer({ 'id': 'sourceid', 'type': 'fill', 'source': { 'type': 'geojson', 'data': {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Point", "coordinates": [102.0, 0.5]}, "properties": {"prop0": "value0"}}, {"type": "Feature", "geometry": {"type": "LineString", "coordinates": [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]]}, "properties": {"prop0": "value0", "prop1": 0.0}}, {"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, … -
Contained Javascript in fetched django template with ajax does not get evaluated?
This is a follow-up question after my previous one (Load several templates into a base template in django on buttonclick). See there for a js-example of what I am trying to mimic with django templates. I have a number of apps (app1.html, app2.html, etc.) which I want the user to be able to choose which ones to load. They all extend empty_app.html which looks like this: <div class="window"> <div class="window-head"> {% block header %} // This is the header of the app. {% endblock %} </div> <div id="module-content" class="window-content"> {% block content %} // This is the content of the app. {% endblock %} </div> </div> {% block resources %} //Here come app-specific javascripts {% endblock %} And my base.html that has 4 placeholders where such an app could land: {% load staticfiles %} <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="{% static 'some.css' %}"> <title>Cool Apps</title> </head> <body> <div id="viewer-content"> <div id="module-1" class="droparea-empty"> </div> <div id="module-2" class="droparea-empty"> </div> <div id="module-3" class="droparea-empty"> </div> <div id="module-4" class="droparea-empty"> </div> </div> <script src="{% static 'assets/js/jquery.min.js' %}"> //Some js... </script> </body> </html> I was told to use ajax to dynamically fetch django-templates. So now … -
Django - Keep track of comments
I am building a web app, where each product has its own "Profile". I need to add to the model some kind of field where i can add "Comments", with date and text, for keeping track of info such as change in formula, change of provider, change in price, etc. Any ideas? -
How to update multiple instance fields within a DRF Serializer?
In the DRF docs: https://www.django-rest-framework.org/tutorial/1-serialization/#creating-a-serializer-class It is shown how to update an existing instance using the update method. But the code that is shown is highly repetitive and has a DRY problem if the model is updated. How can the validated_data be passed into the instance once before then calling save? def update(self, instance, validated_data): """ Update and return an existing `Snippet` instance, given the validated data. """ instance.title = validated_data.get('title', instance.title) instance.code = validated_data.get('code', instance.code) instance.linenos = validated_data.get('linenos', instance.linenos) instance.language = validated_data.get('language', instance.language) instance.style = validated_data.get('style', instance.style) instance.save() return instance -
Django bound form is invalid but not ValidationError raised
I have a problem in my Django form. When I click the submit button in my form, no data is saved to the database. I found that the data was bound but it did not pass through the form.is_valid() function. Below is the code for forms.py, views.py, urls.py and new-event.html respectively: forms.py from django import forms class EventForm(forms.Form): name = forms.CharField(label='event-name', max_length=50, widget=forms.TextInput(attrs={'class': 'form-control', 'id': 'event-name', 'name': 'event-name'})) start_datetime = forms.DateTimeField( widget=forms.DateTimeInput(attrs={'class': 'form-control', 'id': 'start-datetime', 'name': 'start-datetime', 'type': 'datetime-local'})) end_datetime = forms.DateTimeField( widget=forms.DateTimeInput(attrs={'class': 'form-control', 'id': 'end-datetime', 'name': 'end-datetime', 'type': 'datetime-local'})) event_category = forms.ChoiceField(widget=forms.Select(attrs={'class': 'custom-select', 'id': 'event-type'}), choices=((None, 'Please select an option'), ('Daily Life', 'Daily Life'), ('Study', 'Study'), ('Social', 'Social'), ('Work', 'Work'))) description = forms.CharField(max_length=250, widget=forms.Textarea(attrs={'class': 'form-control', 'id': 'description', 'name': 'description'}), required=False) views.py from django.shortcuts import render, redirect from .models import Entry from .forms import EventForm from django.views.decorators.http import require_POST # request is required that represents HttpResponse # return value can be response, JSON or template def index(request): entries = Entry.objects.order_by('-date_added') context = {'entries': entries} return render(request, 'event/list-events.html', context) def new_event(request): form = EventForm() context = {'form': form} return render(request, 'event/new-event.html', context) @require_POST def add_event(request): if request.method == 'POST': form = EventForm(request.POST) if form.is_bound: print('form is bound') else: print('form is unbound') … -
no file on upload to django rest framework
Using django rest framework I'm trying to upload a pdf file but the request comes in and there is no file. I am trying to upload the file from Postman. The get request works. Any help very much appreciated. Here is my view @api_view(['PUT','GET']) def upload_pdf(request): if request.method == 'PUT': myfile = request.POST.get('file') print("myfile === {}".format(myfile)) if request.method == 'GET': return Response({"message": "Hey there at least this works!"}) Output: myfile === None -
Error Importing Module. ModuleNotFoundError No module named 'users'
I created a directory and installed virtual environment to the directory. Next, i installed django while the virtualenv was on. To begin my django project, created a directory for my project inside the same directory as my virtualenv. i then navigated to that directory with my virtualenv on and started a django project. django created for me a folder with same project name and a file 'manage.py' inside the same folder. i created 2 apps in my project folder. but when i tried to import one of those apps called 'users', i got a ModuleNotFoundError. i found similar question here but the guy's apps was not within the same folder as manage.py but in my case, my apps lie in the same directory(the same level) with manage.py. my problem is when i open the project, i will see the project, my apps and manage.py but when i run tree command, i will only see the project, the apps and no manage.py. see the structure on pycharm in the image.the directory structure what may be wrong with my installation. Please I need suggestion from installing virtualenv down to creating an app. -
MySQL view turns SUM of an INT column into a decimal type
I have a MySQL view like this: VIEW `qty_sold_view` AS SELECT `t2`.`upc` AS `upc`, SUM(`t2`.`qty`) AS `qty_sold` FROM (`inventory_orders` `t1` JOIN `inventory_sales` `t2` ON ((`t2`.`order_id` = `t1`.`id`))) WHERE (`t1`.`date_placed` > (CURDATE() - INTERVAL 42 DAY)) GROUP BY `t2`.`upc` And I run a query for this view using a Django raw query: sql = 'SELECT `upc`, `qty_sold` FROM `qty_sold_view` WHERE `upc` = 1001 OR `upc`= 1002 ...' with connection.cursor() as con: con.execute(sql) Note that I have a Django model for both the inventory_orders table and inventory_sales table, but not the view itself. The results from this query look like this: ((1001, Decimal('1')), (1002, Decimal('4')), ...) Both the qty column and upc column of inventory_sales is type INT, so I don't understand why this is happening. The problem is that when I try to json.dumps the results of this query, I get this: TypeError: Object of type Decimal is not JSON serializable I could address this issue using various answers I found online to actually json serialize decimals, but it seems silly to do that when they shouldn't be decimals in the first place. What can I do to force MySQL to treat them as INTs? -
Get username in a middleware from Django Rest Framework SIMPLE JWT token (3rd party)
I am using Django Rest Framework and I've included a 3rd party package called REST framework simple JWT Auth which is the new framework referenced, and this one, REST framework JWT Auth, which is the old one (I Imagine), since there was no update on github since a long time and maybe not supported for newer versions. And I'm looking for a way, like this link on stackoverflow-3rd answer, via middlewares, to get the user information for each request in order to apply/save it, in needed, the user object in my models by using django signals. I checked in documentation and on internet, but I didn't find anything. So, if you already had that case, I will appreciate your help. Thank you -
Django: how to get url path?
I've read something about reverse function but I don't get it. Two of my urls are calling the same view. In this view I need to decide the context based on the url. urls.py: urlpatterns = [ path('view/', my_view), path('edit/', my_view), ] views.py: def my_view(request): #some code if(my_url_path == 'view/'): #just taking a look context = { 'task': 'view' } elif(my_url_path == 'edit/'): #can edit context = { 'task': 'edit' } I don't use two different views for these paths because its code is very extensive and I can save many repeated lines (DRY). They do something very similar and I can adjust these small differences in the template based on the context. How can I do what I showed in the view? Thanks! -
Concat QuerySets from different models
My models: class BaseModel(models.Model): my_field = models.CharField(max_length=250) class Meta: abstract = True class ModelA(BaseModel): a_field = models.CharField(max_length=250) class ModelB(BaseModel): def some_function(self): return 'some result' Now i want to perform filtering on queryset, where queryset consists of ModelA.objects.all() and ModelB.objects.all(). I tried: queryset = chain(ModelA.objects.all(), ModelB.objects.all()) And then: queryset.filter(my_field='some_string') But i receive following error: 'itertools.chain' object has no attribute 'filter' How can i concatenate QuerySets of these two models into one and perform filtering? -
Can't change CSS classes in AuthenticationForm with LoginView
Trying to add Bootstrap CSS classes to the AuthenticationForm, but when adding authentication_form to the urls.py nothing changes? It finds the template and I can login, with custom user model. urls.py from django.urls import path from user.forms import AuthForm from django.contrib.auth import views as auth_views urlpatterns = [ path('auth/', auth_views.LoginView.as_view( authentication_form=AuthForm, template_name='user/login.html',), name='login'), ] forms.py from django import forms from django.contrib.auth.forms import AuthenticationForm from django.forms.widgets import PasswordInput, EmailInput class AuthForm(AuthenticationForm): class Meta: widgets = { 'username':forms.EmailInput(attrs={'class':'form-control form-control-sm'}), 'password':forms.PasswordInput(attrs={'class':'form-control form-control-sm'}), } -
Order list with nested values in ordering using Django/Python
I cannot find a good standard way to order the following lists: {'list1': {['id': 1, 'start': '1-1-2018', 'end': '12-1-2018'], ['id': 2, 'start': '12-31-2018', 'end': '1-15-2019'], ['id': 3, 'start': '3-6-2019', 'end': '3-13-2019'], ['id': 4, 'start': '2-12-2019', 'end': '8-9-2019']}, 'list2': {['id': 1, 'start': '4-1-2019', 'end': '4-12-2019'], ['id': 2, 'start': '2-1-2019', 'end': '9-1-2019']}} 'list3': {['id': 1, 'start': '4-1-2019', 'end': '9-12-2019'], ['id': 2, 'start': '4-1-2019', 'end': '9-1-2019'], ['id': 3, 'start': '2-1-2019', 'end': '12-1-2019'}} The order should be the earliest start first, latest end last, and nest any dates that fit in between those. Literally, that would look like: list1 = [1,2,4,3], list2 = [2,1], list3 = [3,2,1] Do I just have to loop through every pair of every date to determine where they rank? -
How to do Websocket binding in a django model that has a field of ForeignKey type?
Suppose I have a model whose one field is of ForeignKey type. class House(models.Model): house_name = models.CharField(max_length=120) tenant = models.ForeignKey('Tenant',on_delete=models.CASCADE) class Tenant(models.Model): name = models.charField(max_length=120) married = models.BooleanField(default=False) phone = models.CharField(max_length=10) I want to bind events of model House using WebsocketBinding.So i have written down the following class HouseBinding(WebsocketBinding): model = House stream= "houseStream" fields = ["__all__"] @classmethod def group_names(cls, *args, **kwargs): return ["binding.values"] def has_permission(self, user, action, pk): return True Now whenever an object of House model will be created or updated or deleted the payload will be sent to the connecting client.I have added the Demultiplexer route in routing.py .Now suppose i am creating, updating and deleting objects of House model at server end using form having fields like house_name,tenant_name,tenant_married_status and tenant_phone_number. I am listening these events at client side using the following code. var webSocketBridge = new channels.WebSocketBridge(); webSocketBridge.connect(ws_path); webSocketBridge.listen(); webSocketBridge.demultiplex('houseStream', function(payload, streamName) { console.log(payload.data.house_name); #I am getting correct value for this. console.log(payload.data.tenant.name); #getting 'undefined' for this console.log(payload.data.tenant.married); #getting 'undefined' for this console.log(payload.data.tenant.phone); #getting 'undefined' for this } Could you please tell me why am i getting 'undefined' whenever i try to fetch any value that is stored in 'Tenant' model. If i am doing something wrong … -
Django REST Framework: List of file paths in serializer
I have a serializer and one of the fields is a list of filepaths. See below class ProductSerializer(serializers.ModelSerializer): ... temp_image_paths = serializers.ListField( child=serializers.FilePathField( path=os.path.join(settings.MEDIA_ROOT, 'tmp'), ), write_only=True, min_length=1 ) The payload I'm sending to the endpoint is as follows { ... "temp_image_paths": ["0ffefb78-e1e1-402a-887b-785cc55c0bf3.jpg"] } I can confirm that file exists in path However, the response I'm getting from the server is { "temp_image_paths": { "0": [ "\"0ffefb78-e1e1-402a-887b-785cc55c0bf3.jpg\" is not a valid path choice." ] } } Not sure what I'm missing. -
Django_tenants: What's the reason for the string of digits appended to schema name?
I'm using django_tenants. When I created a tenant as "mrr", the schema name ended up as "mrr_1550117967". I can't find where that schema name is being generated. Can someone tell me the purpose of the additional digits? Is there a way to disable that naming format? We will be ensuring that all tenants/schemas in our site are unique.