Data dodania Pytanie
2017-11-15 22:11 Django Isolated Subdomains »
Let's say we have a model called Event with a slug name. I'm looking to configure my Django app to basically isolate all my other models into separate...
(2) odpowiedzi
2017-11-15 15:11 Render Foreign Key in template as Checkboxes instead of Select in Django »
Say we have this Model: class Event(models.Model): name = models.CharField('Nome do evento', max_length=50) code = models.CharField('Código ...
(1) odpowiedzi
2017-11-15 15:11 Django-Rest-Framework APIView returning a model object and an image »
suppose that I want to return in a APIView.get a (non model) object conatining 2 properties, one of them is a model object, and the other is a binary ...
(3) odpowiedzi
2017-11-14 19:11 Django - How can I prevent access to other users' objects? »
Let's assume that I have such URL users/{id}/objects and I am authenticated as a User with ID equals 1. At the moment I can access objects of users wi...
(2) odpowiedzi
2017-11-14 15:11 How I can change render to return json in view Django »
I have function in view from django.shortcuts import render from .models import myModel def articleTheme(request): if request.method == 'POST': ...
(2) odpowiedzi
2017-11-14 05:11 How to dynamically add EC2 ip addresses to Django ALLOWED_HOSTS »
We've recently changed our deployment strategy to use AWS auto scaling group. One problem we have in production is with the newly created EC2s. Our ...
(2) odpowiedzi
2017-11-13 17:11 Best practices for storing references to AWS S3 objects in a database? »
We store files in Amazon AWS S3, and want to keep references to those files in a Document table in Postgres. I am looking for best practices. We use...
(0) odpowiedzi
2017-11-13 08:11 Django error templates in custom path »
I have dir template with all templates, and I have dir errors, with all templates with errors 404.html. I found the following old solution: In urls....
(1) odpowiedzi
2017-11-13 08:11 'if' VS `while` to a `functools.partial.func` »
In Django documentation django.conf.urls | Django documentation | Django There's such codes: class RegexURLPattern(LocaleRegexProvider): ... ...
(2) odpowiedzi
2017-11-12 16:11 from django templating to full rest? »
I want to make my django/html/css website completely in REST (json). The site was developed using django templating to render and send answers to the...
(1) odpowiedzi
2017-11-12 05:11 cannot integrate third party markdown extension into django-wiki markdown »
I'm trying to use this extension: https://github.com/aleray/mdx_semanticdata with django-wiki's markdown but I am unable to get it to work (though it ...
(1) odpowiedzi
2017-11-12 00:11 Using Django Login Required Mixin »
I have a class based view which I would like to make accessible only when a user is logged in, and I would like to redirect unauthenticated users back...
(1) odpowiedzi
2017-11-11 23:11 parameterize testing with django settings »
Am working on a django reusable package that am planning to use with multiple project. I've used pytest to build test suite, I've used parametrized he...
(2) odpowiedzi
2017-11-11 17:11 Extending the Django 1.11 User Model »
I am attempting to work out how to extend the Django user model to add information to a user. I can't seem to get it to work. What am I doing wrong?...
(1) odpowiedzi
2017-11-11 06:11 Django allauth facebook login failed to redirect back when in an in-app-browser »
Problem When in an in-app-browser, like Google Hangout, Telegram or LINE messenger, the user won't be redirected back to my website after a success l...
(1) odpowiedzi
2017-11-11 01:11 AJAX function is not getting the id »
I am trying to fix this problem for about 3 days and can not do it. I need to take the id from which is auto incremented in the Django. Can you guys h...
(1) odpowiedzi
2017-11-11 00:11 How to find Postgres version from Django? »
I want to know version of the default Postgres database. How to find it using Django? ...
(1) odpowiedzi
2017-11-10 17:11 Setting regex pattern for mongoengine 0.9.0 StringField »
I use python 2.7.12 with pymongo 2.8.1, django 1.11.7, mongoengine 0.9.0 and mongodb 3.4.10. I am creating a custom user model which inserts documents...
(1) odpowiedzi
2017-11-10 10:11 What to return to django admin if user has not username or something else »
In short i am doing online store and in django admin i display authenticated users 'username' but there are users which didn't authenticated So if au...
(2) odpowiedzi
2017-11-10 09:11 Django - Deserializing JSONField in DRF »
I've a JSONField in model, lets say x. I'm using DRF to save the model instance. Serializer:- class ABCSerializer(serializers.ModelSerializer): ...
(1) odpowiedzi
2017-11-09 14:11 Django:Getting List of values from query set »
I have the following query country=employees.objects.filter(manager_id__emp_id=111).values('emp_loc').distinct() I get Output as <QuerySet [{'em...
(1) odpowiedzi
2017-11-09 11:11 At which point in UpdateView is the data saved? »
I was wondering when the data given to an UpdateView was saved. I have the following situation: I update a model object via a form. I would expect t...
(3) odpowiedzi
2017-11-09 00:11 Django: Best way to retrieve object »
Lets assume that I have a class Person with a field email. I want to get a single record based on queryset and assign it to variable person. Sadly I c...
(3) odpowiedzi
2017-11-08 17:11 Check if user is authenticated with django TokenAuthentication »
I'm trying to develop a REST API with DRF that uses TokenAuthentication. This will be used in an android app. I was able to authenticate a user and r...
(0) odpowiedzi
2017-11-08 15:11 Dynamic filter in Django »
In my app, I have a form. Depending of the form, one or many filters could be configured by the user. In my view, I have for exemple : query = Test....
(1) odpowiedzi
2017-11-08 15:11 How to Use get_absolute_url() with a foreign key object in Django template »
Am relatively new to django and I have searched for this problem but couldn't find a solution. Forgive me if the solution is obvious but I just can't ...
(1) odpowiedzi
2017-11-07 18:11 Django admin display filter depending on other filters »
Here is an example of models: class Books(models.Model): ... class Chapter(models.Model): ... book = models.ForeignKey('Books') class ...
(2) odpowiedzi
2017-11-07 12:11 TypeError: array(['cycling'], dtype=object) is not JSON serializable »
hi I've made an text classification classifier which i've used in this it is returning me an array and I want to return jsonresponse but the last line...
(1) odpowiedzi
2017-11-07 03:11 What is the best way to increment an integer at a certain rate over time using a Django powered site and SQLite? »
I am trying to display a number that will increment over time that is called from a very, very simple Django database. It will be called using jinja2 ...
(3) odpowiedzi
2017-11-06 14:11 Django: ForeignKey Filter Selected Data Query in Form »
I am working with automated result system app.I have five models class in models.py file. class Student(models.Model): std_name=models.CharField(...
(2) odpowiedzi
2017-11-06 13:11 Single model dynamic database settings in Django »
For example assume that I have 100 clients who uses WordPress and I have to write a service in Django which should return list of posts from WordPress...
(2) odpowiedzi
2017-11-06 10:11 How to filter csv file? »
I have a csv file containing random data but I want to filter the data from the file. I want to filter all rows that have contents starting with $ and...
(1) odpowiedzi
2017-11-05 15:11 Django Firebase »
I am trying to connect my Django website with Firebase. There is not enough material for that, luckily I got this https://github.com/thisbejim/Pyrebas...
(1) odpowiedzi
2017-11-05 09:11 Django ManytoManyField and widgets »
I have two models, Product and Category and ManytoMany field in Product. The Category appear as key on ProductCreate View. I need to customize the wi...
(1) odpowiedzi
2017-11-05 09:11 Django passing variables into string »
I'm trying to pass: >img src="{% static '/static_dirs/images/itcg/01_{{ card_id }}.jpg' %}" alt="{{ card_id }}"> to load image with file name...
(1) odpowiedzi