Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Fetching proper data in flutter app from djano-rest
Here I'm creating a moblie app with flutter. Also I've created the back-end with django rest framework. And now I want to use the informations on my back-end in the flutter. For Registration, I can post my user info from flutter to django rest, It works proberly. But when some of inputs are incorrect I don't know how to reflect the problem form back-end into the flutter app. For example here, the email address is incorrect: enter image description here And this is my code for fetching and getting data: void _postmessage( {@required var username, @required var email, @required var password1, @required var password2}) async { var url = 'url'; var data = { "username": username, "email": email, "password1": password1, "password2": password2 }; HttpClient httpClient = new HttpClient(); IOClient ioClient = new IOClient(httpClient); ioClient.post(url, body: data); _fetchdata(); } _fetchdata() async { List list = List(); final response = await http.get('url'); if (response.statusCode == 200) { list = json.decode(response.body) as List; print(list); } else { // list = json.decode(response.body) as List; print(json.decode(response.body)); } } As the result I get this in the output: enter image description here It's printing this on the output: flutter: {detail: Method "GET" not allowed.} Thank you … -
Renaming user model
I'm following the guide provided in this answer, but I've run into an issue. I'm renaming myauth.MyUser to myauth.User. I created my first set of migrations from other apps, converting every ForeignKey to an IntegerField. The migrations were created fine. I then changed the name or my User model and created a migration, this was also fine. I created my third set of migrations changing the fields back to ForeignKeys to the new model. These migrations also created fine. I then manually added dependencies to the migration files, so that the FK -> Int migrations required the previous version of the user app, and the Int -> FK migrations required the latest, renaming migration. All seems fine, however when I try to run manage.py migrate, I get the following error (a lot of times - for each FK): The field otherapp.Model.user was declared with a lazy reference to 'myauth.user', but app 'myauth' doesn't provide model 'user'. What is going on? Is there a way out of this situation? -
Django. Integrate modelformset_factory in template
Im trying to integrate modelformset_factory in my template like this: <div class="create_steps_item" data-step="3"> <form method="POST" id="path_form"> {% csrf_token %} <div class="form_title">3. Выбрать папки</div> <div class="form_folders"> <div class="form_folder"> <div class="ftp_form_item"> <div class="ftp_form_item_add"></div> <div class="ftp_f_long ftp_f_long_i"> <div class="input-effect"> {{ ftppath.path }} <label>Путь на сервере</label> <span class="focus-border"></span> </div> </div> <div class="ftp_form_s ftp_form_s_i"> <div class="checkbox_box"> {{ ftppath.recursive }} <label for="check"> <span> <!-- This span is needed to create the "checkbox" element --> </span> Рекурсивно </label> </div> </div> </div> <div class="ftp_form_item ftp_form_item_type"> <div class="select_wrapper"> {{ ftppath.period }} <div class="select_wrapper_val"></div> <span class="select_wrapper_label">Период</span> <div class="select_list"> <div class="select_list_item">Раз в сутки</div> <div class="select_list_item">Раз в неделю</div> <div class="select_list_item">Раз в 2 недели</div> </div> </div> </div> </div> </div> <div class="form_button form_button_ftp"> <button class="btn" type="submit" name='done'> <span>Готово!</span> </button> <div class="form_button_message form_button_message_red"> <span class="form_message_bad"></span> <div class="form_message_text"> <b>Ошибка : </b> Такой папки не существует! </div> </div> </div> </form> But if i use {{ ftppath.period }} for example, it doesnt have any effect, i have just empty space. If i put in template {{ ftppath.as_p }}, form is rendering, but structure is not correct for me. How can i put my form field in places where i need? My form: class FtpPathForm(forms.ModelForm): path = forms.CharField(widget=forms.TextInput(attrs={'type':'text','class':'effect-16'}), required=False) recursive = forms.BooleanField(widget=forms.CheckboxInput(attrs={'id':'check'}), required=False) period = forms.CharField(widget=forms.TextInput(attrs={'type':'text','style':'display:none'}), required=False) class Meta: … -
How to inherit from a template that is in another app on Django?
I have set up a base.html file in /common/templates/ that the apps in my project should inherit from. I have set up my buil paths like so: BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) COMMON_TEMP_DIR = os.path.join(BASE_DIR, 'common') my templates like this: TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [COMMON_TEMP_DIR], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], 'debug': DEBUG, }, }, ] and have listed the apps using base.html in settings.py. However, the contents of the inheriting HTML files are not showing up when base.html is loaded. What am I doing wrong here? -
django.core.exceptions.ImproperlyConfigured: WSGI application 'btre.wsgi.application' could not be loaded; Error importing module
I am trying to learn django framework and getting this error when trying to run the server. Can anybody please point me to the right direction. Things were working fine, before I ran the python manage.py collectstatic and then created the templates. Seems like I am getting an error importing module error but I am not sure what to look into. Django settings for btre project. Generated by 'django-admin startproject' using Django 2.1.3. For more information on this file, see https://docs.djangoproject.com/en/2.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.1/ref/settings/ """ import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/2.1/howto/deployment/checklist/ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'pages.apps.PagesConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewnoMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'btre.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(BASE_DIR, 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'btre.wsgi.application' # Database # https://docs.djangoproject.com/en/2.1/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': … -
Djanog middleware process view after done with return render template continue to regular page
I created a custom django middleware, class CustomMiddleware(object): def process_view(self, request, view_func, *view_args, **view_kwargs): ... ... return render(request, 'accounts/xyz_form.html', {}) Now in xyz_form.html there is a form which on submit action goes to url which call the view and view save the form data. Now after the form data is saved how can that form disappear after the view complete its execution and continue with its normal execution. So what url should I pass in urls.py to call that view and on calling view the middleware gets exit. -
Is using jquery parseHTML to remove script tags enough to prevent XSS attacks?
We are using a WYSWIG Editor(Froala Editor) and storing raw HTML that is created by the user. Thus, escaping the string is not an option. I am intending to store the HTML string in a variable or a data-attribute enclosed within quotes. Then, read that HTML string and remove script tags using jquery's parseHTML as well as keep only certain attributes before loading the HTML into the editor. Is this approach enough to prevent all XSS attacks? -
Enumerate number in django template
It's a question by curiosity : So i have 4 types of choice for field of a model. class Thing(models.Model): Cat_One = (("b", "Big"), ("s", "Small"),("a","very small"),("x","xtra small")) dateCreation = models.DateTimeField(null=True, blank=True) url = models.CharField(null=True, blank=True, max_length=800) name = models.CharField(blank=True, null=True, max_length=200) catOne = models.CharField(max_length=1, choices=Cat_One, blank=True, null=True) so i can pass the choice to the django template : {% for choice in cat_One %} ... And iterate. But i would like to know , how to iterate from 1 to 4 without passing something to the django template ? Is there a way to do : {% for number in [1,2,3,4] %} or something with a forloop counter ? regards -
Storing and running user defined functions from a database in Django
This is a rather weird use-case, however, a project we are developing needs a way for it to store user-defined functions and run them within views. The function code will be stored in a TextField in a model. The functions themselves would be ideally very simple, mostly involving arithmetic operations, if-else blocks, and loops. The functions can also be in any language, as long as Python is able to run them somehow. The obvious problem is the possible security issues, since it is always best to assume the code will come from untrusted sources. Anyway, we have thought about these possible solutions: Storing Python functions as strings, and running them using eval(). Storing Javascript functions as strings, and running them using Js2Py. Creating a simple programming language, a subset of Python, which removes all the methods and operators which could possible cause security issues. The function would therefore be written in this new language. What is my best option? Obviously, the first two options are very insecure, while the third one is hard to implement. Is there a better way to do this? -
Showing the list of pull_requests on the homepage
% extends "base.html" %} {% load static %} {% block body %} <div class="container"> {% if pullrequests %} {% for field in pullrequests %} <table> <tr> <th>{{ field.pr_project }}</th> <th>{{ field.pr_id }} </th> <th>{{ field.nd_comments }} </th> <th>{{ field.nb_added_lines_code }}</th> <th>{{ field.nb_deleted_lines_code }}</th> <th>{{ field.nb_commits }}</th> <th>{{ field.nb_changed_fies }}</th> <th>{{ field.Closed_status }}</th> <th>{{ field.reputation }}</th> <th>{{ field.Label }}</th> </tr> </table> {% endfor %} {% else %} <strong> There is no pull request in the database. </strong> {% endif %} </div> {% endblock %} def get_queryset(self, request): pull_requestsList=Pull_Requests.objects.all() pullRequest_dict={'pull_requests': pull_requestsList} #print(pull_requests) #args={'form': Pull_Requests,'pull':pull_requests } return render(request, 'templates/home.html', pullRequest_dict) I have a model Pull_Requests in my database that's containing data and I want to display this data into an HTML table on my homepage. So I created the view and home template as they are below but I'm getting nothing when I run the app. As I am new in this area, I'm not able to detect what could be the issue. Thanks in advence for your help. -
How do I get Django to display what, I want in database
Thanks for helping I'm sorry I'm poor in programming Ok I trying to take data out my database (SQLlites3) and display all at once this my code for views def index(request): tank = tank_system.objects.all() args = {'tank':tank} return render(request,'FrounterWeb/includes.html',args) and here are my HTML that place {% block content %} <div class ="table-responsive-sm"> <!-- tables tiles --> <table class ="table table-bordered table-responsive-sm"> <tr> <th>Time</th> <th>EC</th> <th>pH</th> <th>Tank level</th> <th>room temptures</th> <th>Water temptrure</th> </tr> {% for tank_system in tank %} <tr> <td>time</td> <td>{{tank.EC}}</td> <td>{{tank.PH}}</td> <td>{{tank.WaterLevel}} lites</td> <td>{{tank.TempRoom}} C</td> <td>{{tank.TempWater}} C</td> </tr> {%endfor%} </table> </div> {% endblock %} the end result objects.all() result but if i would to modified to with objects.get(id=x) here modified views; def index(request): tank = tank_system.objects.get(id=1) args = {'tank':tank} return render(request,'FrounterWeb/includes.html',args) and adjustment made in HTML; {% block content %} <div class ="table-responsive-sm"> <!-- tables tiles --> <table class ="table table-bordered table-responsive-sm"> <tr> <th>Time</th> <th>EC</th> <th>pH</th> <th>Tank level</th> <th>room temptures</th> <th>Water temptrure</th> </tr> <tr> <td>time</td> <td>{{tank.EC}}</td> <td>{{tank.PH}}</td> <td>{{tank.WaterLevel}} lites</td> <td>{{tank.TempRoom}} C</td> <td>{{tank.TempWater}} C</td> </tr> </table> </div> {% endblock %} and end result for this is objects.get(id=) result I grantnee that the database pass jqury data/object into my html, but now i'm stump on how fix this? please help … -
Django REST - How count view hits / counts for specific DRF view action?
I'm trying to find a proper solution to count object views. In particular, I have a model called Content which contains a media/video file and meta-data (title, keywords, etc.). I would like to track when the user has access to it, I was thinking to use django-hitcount to track retrieve action on my ContentViewSet: https://django-hitcount.readthedocs.io/en/latest/installation.html?highlight=view How I can use it with DRF? My DRF viewset: class ContentViewSet(ModelViewSet): """ Viewset for retrieving, listing, creating, updating, and destroying `Content` instances. """ permission_classes = (permissions.IsAuthenticated,) queryset = Content.objects.all() serializer_class = ContentSerializer # Doc: http://djangorestframework.readthedocs.io/en/latest/api-guide/filtering/ filter_backends = [SearchFilter, DjangoFilterBackend, OrderingFilter] pagination_class = DefaultPageNumberPagination ordering = ['-id'] ordering_fields = [ 'id', 'title', ] def get_serializer_context(self, *args, **kwargs): return {"request": self.request} def perform_create(self, serializer): serializer.save(owner=self.request.user) -
How to manipulate data between views and template in Django?
I'm working on a project called emotion detection from voice . I've to upload an audio file and extract its features, and classify it on basis of emotion , the project has been completed in Python. I'm having trouble integrating it with Django , after uploading the file in Django , I don't know how to pass it to the views for feature extraction and classification . How can I pass data between my template and views , and vice versa? -
How to use the parallel flag in django test calls when using psycopg2 for postgresql calls inside of the tests
When we use ./manage.py test ... all is well. Once we add --parallel 8 (as we have quad core machines with HT), we get "connection already closed" errors from psycopg2. This answer seems to suggest that the issue lies in the fact that django creates a connection and then starts branching off from the main thread --> all threads really share the connection. Now if one of them closes the connection, all their connections are closed and the DB starts refusing transactions on that conn. How do we go ahead and allow testing our codebase without having to mock all DB calls now? Personally, I'd like to mock the DB but (according to project mgmt) it will be an enormous overhead to fix several hundred tests for this. So: Is there A) a nice drop in DB mock that might keep all records in memory for tests or B) a way to allow several threads to work with psycopg2? -
DJANGO MULTIPLE IMAGES UPLOAD FOR A POST
Please help me. I am new to Django, cannot undertsand the following. I have subclass of CreateView for creating a post. I'm creating a rental site project where people can post their apart and attach files (images) to it. One should have possibility to attach as many images as he wants to ONE form. I have found in Internet a decision that I need to use 2 models - 1 model for post + 1 separate model for images. Is it so? Post form is created and handled in my views.py by sublass of CreateView. Now how to connect new separate model for images with my CreateView ? And save all images to the current Post Form? Thanks in advance models.py class Post(models.Model): post_author = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE) post_title = models.CharField(_('Title'),max_length=200, null=True, blank=False) post_type = models.CharField(_('Type'),max_length=18, choices=post_type_list, default='appart') post_content = models.TextField(_('Your post description'),blank=True) post_created_date = models.DateTimeField(default=timezone.now, help_text=_('Post creation date and time.'),) post_published_date = models.DateTimeField(null=True, blank=True, help_text=_('Post publication date and time.'),) def get_absolute_url(self): return reverse("posts:post_details", kwargs={'pk':self.pk,'post_type':self.post_type}) class Post_Gallery(models.Model): post = models.ForeignKey(Post, on_delete=models.CASCADE) current_hour = datetime.datetime.now() images = models.ImageField(_('Upload some pictures'),upload_to='uploads/%Y/%m/%d/{}'.format(current_hour.hour), max_length=100, null=True, blank=True) def __unicode__(self): return self.images.url forms.py class NewPostForm(forms.ModelForm): class Meta: model = Post fields = [ 'post_title','post_type','post_content', ] class GalleryForm(forms.ModelForm): … -
Can anyone told me how to prevent to store blank input field of multiple input in Django Models
In my form there are multiple input field means there are two fieldset in which same input fields are available and i want to store both that input into models in different ids. It is working but when i filled only one input field and click on submit button then the second one is also stored blank but i want to prevent it. It's means that i only want to store filled input field into model and blank one will not not stored. My Form.html <form class="well form-horizontal" method="post" action="{% url 'fixed_doclist' %}"> {% csrf_token %} <fieldset> <div class="form-group"> <label class="col-md-4 control-label">Document Name</label> <div class="col-md-6 inputGroupContainer"> <div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span><input id="fullName" name="dname" placeholder="Full Name" class="form-control" value="" type="text"></div> </div> </div> <div class="form-group"> <label class="col-md-4 control-label">Exp Date</label> <div class="col-md-6 inputGroupContainer"> <div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span><input id="postcode" name="exp" placeholder="Postal Code/ZIP" class="form-control" value="" type="text"></div> </div> </div> <div class="form-group"> <label class="col-md-4 control-label">Renewal Date</label> <div class="col-md-6 inputGroupContainer"> <div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span><input id="postcode" name="renewdt" placeholder="Postal Code/ZIP" class="form-control" value="" type="text"></div> </div> </div> <div class="form-group"> <label class="col-md-4 control-label">Purpose</label> <div class="col-md-6 inputGroupContainer"> <div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span><input id="state" name="purpose" placeholder="State/Province/Region" class="form-control" value="" type="text"></div> </div> </div> <div class="form-group"> <label class="col-md-4 control-label">Remarks</label> <div class="col-md-6 inputGroupContainer"> <div class="input-group"><span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span><input … -
Is it possible to get 0 count for group by queries when there are no rows for that particular group by
For eg: We have two tables Note -------------------- id | text | label_id 1 | abcs | 1 2 | accs | 2 3 | abts | 1 Label --------- id | name 1 | pro 2 | foo 3 | bar Now the data I want is Label Name | Note Count ------------------------ pro | 2 foo | 1 bar | 0 Now if I do this: Note.objects.all().values('label__name').annotate(count=Count('id', distinct=True)) I wont get the 3rd row, which is (bar, 0). Is there any way to get this information? Condition being it has to be done in a single query and the query should be on Notes model and not start from the Label model -
How to auto initialize fields in a Django model?
I have the following model in Django and basically I need to to auto initialize 3 out of 5 fields once the user has inserted some data, i.e., Models.py class Assignment(models.Model): assignment = models.CharField(max_length=60) comments = models.CharField(max_length=60) starting_date = models.DateField() points = models.IntegerField() STATUS = (('A', 'Active'), ('C', 'Cancelled'), ('D', 'Done')) status = models.CharField(max_length=1, choices=STATUS) Forms.py from django import forms from .models import Task class TaskForm(forms.ModelForm): class Meta: model = Task starting_date = datetime.now() fields = ['task_description', 'task_comments', 'starting_date', 'priority', 'points'] Input form <!-- Input form to request to values--> <div class="panel-heading">Add a new assignment </div> <form id ="insert_new_assign" class="form-horizontal" method="POST"> {% csrf_token %} <div class="panel-body"> <div class="input-group"> <input class="form-control" name="insert_new_assign_field" type="text" placeholder="Insert your new assignment here" /> <input class="form-control" name="insert_new_comment_field" type="text" placeholder="Any comment you want to add?" /> <button class="btn btn-primary" type="submit">Add</button> </div> </form> </div> See the JS fiddle for quick reference Basically when the user enters a new assignment and comment, I want Django to save these two fields and auto initialize the other fields with the current time, 0 points and A status. Whenever I try to to save a new record, I get the error The view engine.views.home didn't return an HttpResponse object which is normal … -
in Djanog rest FRamework sendign json reqeust but i want to extra key value json response
i have this json formate { "hashofblock": "abcd21", "blockid": 1, "nooftxn": 2, "hashprev": "defg234", "txn": [ [ "3", "F", "H", "Xdffscdgf" ], [ "5", "a", "f", "xdfvfdgf" ], [ "4", "a", "f", "xdfvfdgf" ] ] } but after sendig the request of that json. i want that jon become one other pair of key and value and extra header i.e is hash of the request json value lik this { header:'uueouworw9780udfihhgnnweirwurw' body:{ { "hashofblock": "abcd21", "blockid": 1, "nooftxn": 2, "hashprev": "defg234", "txn": [ [ "3", "F", "H", "Xdffscdgf" ], [ "5", "a", "f", "xdfvfdgf" ], [ "4", "a", "f", "xdfvfdgf" ] ] } } jsondata=Json_data=json.load(request.body.decode("utf-8")) header = hashlib.sha256(jsondata.encode('utf-8')).hexdigest() response_data={'Header' : header,'Body' : jsondata} -
How do I upgrade bootstrap in my mezzanine's project?
Environments pc: mac os 10.13.1 Versions python: 3.6.2 mezzanine: 4.3.1 django: 1.11.16 bootstrap: 3.3.5 (confirmed in /{my_name}/anaconda3/lib/python3.6/site-packages/mezzanine/core/static/css/bootstrap.css) Here, my mezzanine project has base.html for site interface. There is the code to get the css-code(design). That is bootstrap.css. But the bootstrap.css relies to bootstrap3(3.3.5), and I have to use bootstrap4(4.0.0). (This is my boss's order.) Then, I wanna get(download) bootstrap4, put it to right directory and change bootstrap dependency by linking to the directory which I put earlier. How should I achieve it? -
Django: How to config default Media path is in server, not Local
I want to config default media path in Django, which when uploading a image from Localhost, it will be stored in server path, instead of stored in localhost path. I want all photo will be uploaded in server abc.com. Now my settings.py is: import os DEBUG = True # Application definition INSTALLED_APPS = [ ... ] # Config Diretories BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) PROJECT_DIR = Path(__file__).parent PROJECT_LOCAL_URL = PROJECT_DIR.parent STATIC_ROOT = PROJECT_DIR.parent.child('static') STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'staticfiles'), ) BASEDIR = os.path.abspath(os.path.dirname(__file__)) MEDIA_ROOT = PROJECT_DIR.parent.child('media') MEDIA_URL = '/media/' My model upload: class Photo(models.Model): user = models.ForeignKey(User, related_name='user_photos', on_delete=models.CASCADE) image = models.ImageField("Uploaded image", upload_to=photo_path) -
Different links within a div using django
I have a list item with a mouse over edit button. I want the list item box to redirect to the item url and the edit button to redirect to the edit page. <a class="list-group-item" href = '{{ the_url }}'> <div class="list-content" > <span class="list-text">{{group_child}}</span> <div class="item-actions"> <span class="btn btn-pure btn-icon" onclick="location.href = '{% url 'mod:editgroup' group_child.id %}'"> <i class="icon wb-edit" aria-hidden="true"></i> </span> </div> </div> </a> The issue with the above code clicking the edit icon also redirects to list item url. How do I make the edit icon link work -
How do I track a request and its corresponding model changes in Django?
Whenever a request is made I'd like to make a unique a tracking number. Within request_started signal, I'm assuming to find out the authenticated user to track with the unique number. If there is any database change, it would store the change set with the tracking number. post_save, post_delete and m2m_changed signals should be ok. My questions are: How do I make (or get if there is any) a unique tracking number for each request? How do I get the authenticated user in request_started signal, like we do request.user in views? How can I get the unique tracking number within post_save, post_delete and m2m_changed signals. I'm on Django2.1 and python3.6. -
Some classess of my CSS file are not rendering into Django templates (most classess render without problems)
I'm starting with Django, I've been throught this several hours, please help me! on my *.html file I have this code (and more): {% load static %} <link rel="stylesheet" href="{% static 'css/style.css' %}"> and since I added that static file, my page has style.. but some classes don't render, for example this div: <div class="nav-profile-image"> If I delete the class .nav-profile-image from style.css, the page still the same, that image has no container, it's very strange. I uploaded all the app on branch "problems": https://github.com/franchodl/robohome/tree/problems view trying to render: home url for home: http://127.0.0.1:8000/propietario/ template: ./own/templates/own/home.html static files: ./static Maybe the problem it's another thing, not the css, i downloaded the frontend from: https://github.com/BootstrapDash/PurpleAdmin-Free-Admin-Template When I open it from index.html, the page works good, the problem is from Django. Any ideas??? I have no idea what else to check. THANKS!!! -
Django How to Timescale With PostgreSQL?
I want to implementation timescale, and I use Django, Is there have any advice about those ?