Data dodania Pytanie
2016-12-27 07:12 Making dictionary from two lists »
I have two lists l1 = ['cat','dog'] l2= [1,2] Now I want to make a dictionary like this: dict { {'name':cat,'id'=1}{'name':dog,'id'=2}} I am us...
(2) odpowiedzi
2016-12-26 15:12 How to Hash Django user password in Django Rest Framework? »
I'm trying to create an API for my user registration using Django Rest Framework. I created a serializer by following the step from the api-guide cla...
(1) odpowiedzi
2016-12-26 11:12 How to recognise text file from my linux pc via django code without checking its extension and also its file size? »
Most of the time when we create a new text file with gedit in linux then the file is not saved with an extension of .txt for text file.So how will I r...
(2) odpowiedzi
2016-12-26 10:12 Django REST: Show details and list on 1 url »
There is a Django project that uses a REST API. Most of the url-patterns follow the same paradigm: /foo_config/1 Basically /list-view/details-view...
(1) odpowiedzi
2016-12-26 03:12 How to reference User foreign key in template? »
I can't seem to grasp this very well. So I have an Album model, which is using a class based view and I'm giving it the context with all objects: cla...
(2) odpowiedzi
2016-12-25 22:12 Sending an SMS to each group based on form selection(s) »
So I have an SMS app working perfectly with a Django form. I have an sqlite table "Employees" and each employee has one relationship of either "dcare...
(1) odpowiedzi
2016-12-25 22:12 Why 'model' object is not iterable? »
I'm trying to add a radioselect in my admin panel only. I use a many to many field in order to connect objects of another model (Background). What I...
(1) odpowiedzi
2016-12-25 00:12 How to create a single file executable with celery tasks »
I've successfully learned some basics of Celery, but I've found no simple way to create single file executable (with no need to run celerybeat as a se...
(1) odpowiedzi
2016-12-24 11:12 Django Rest Framework POST nested objects »
I'm facing a little problem right now with Django Rest Framework. I'm trying to post an object with nested objects in it. Here are my serializers.py ...
(1) odpowiedzi
2016-12-24 06:12 How to deal with this StaleElementReferenceException in Selenium? »
I'm currently going through an intro to Django/TDD book and I've hit a StaleElementReferenceException and got stuck. I've been googling around and se...
(1) odpowiedzi
2016-12-24 03:12 Automatically detect test coupling »
We have a large test codebase with more than 1500 tests for a Python/Django application. Most of the tests use factory-boy for generating data for the...
(1) odpowiedzi
2016-12-23 13:12 Should I reverse order a queryset before slicing the first N records, or count it to slice the last N records? »
Let's say I want to get the last 50 records of a query that returns around 10k records, in a table with 1M records. I could do (at the computational c...
(1) odpowiedzi
2016-12-23 10:12 cannot pass json in django context »
I have some code like this. def foobar(): foo = [" 1", " 2", " 3"] context['json'] = json.dumps(foo) print context['json'] return re...
(1) odpowiedzi
2016-12-23 09:12 Django url reverse error »
I have a url configuration of this sort urlpatterns = [ url(r'webhook/', include('foward_bot.telegram_API.urls', namespace='api_webhook'), name='...
(1) odpowiedzi
2016-12-22 14:12 error while installing mysql using pip (python) »
i'm new boy in python, recently i am starting to understand Django, for some basic functonality i have to use pip, while i try to install some package...
(1) odpowiedzi
2016-12-22 13:12 function inside function is not working in django »
i have written a function inside a function for getting image height and width. but when i hit url all code works except get_image_size function this ...
(1) odpowiedzi
2016-12-22 12:12 Datatables Ajax works when reading JSON from file, but not from variable (Django) »
I've been stuck with this problem for a few days now. I'm trying to feed JSON data to DataTables, but it only works if I use static file as source (se...
(1) odpowiedzi
2016-12-22 08:12 Should django templates name for each app be unique? »
I'm developing a django app. It has three apps in it, each with it's own template directory and index.html file. But when I call view from the second ...
(1) odpowiedzi
2016-12-21 16:12 Does Django 1.10 still need South to manage migrations? »
I am following online instructions on starting a Django project the right way. The instructions are based on an earlier version of Django. From my (a...
(1) odpowiedzi
2016-12-21 15:12 Django ForeignKey filter issue »
Is there anyway to add filter on django foreignkey field. class Product(models.Model): name = models.CharField(max_length=100) category = mod...
(1) odpowiedzi
2016-12-21 00:12 Django: Update multiple objects attributes »
Is there a more efficient way of do this maybe with F expressions? Some how to reducing hitting the DB? # 1st way hits DB twice per object def someth...
(2) odpowiedzi
2016-12-20 23:12 Django filter using select_related() »
I have the following query which works perfectly: campaignFixtures = UserSelection.objects.select_related().filter(user=currentUserID,campaignno=...
(2) odpowiedzi
2016-12-20 12:12 Django admin form fields attributes override »
Django 1.8. I've got model: class Location(models.Model): address = models.CharField(max_length=65) annotation = models.CharField( ma...
(1) odpowiedzi
2016-12-20 11:12 Can celery,celerybeat and django-celery-beat dynamically add/remove tasks in runtime without restart celerybeat? »
I tried everything I can found including: stackoverflow How to dynamically add / remove periodic tasks to Celery (celerybeat) Can celery celerybeat...
(1) odpowiedzi
2016-12-19 23:12 Heroku push failed with weird error message »
I've had a Django app running on Heroku for a while now. Couldn't find this error online when it came up: $ git push heroku master ... remote: -----...
(1) odpowiedzi
2016-12-19 22:12 csrf cookie not set django rest »
When working on REST browsable API the responses work fine but when I started working on postman to integrate with front end on the other side the res...
(0) odpowiedzi
2016-12-19 19:12 django DisallowedHost in the new version of django »
Up until now I was using Django==1.9.6 in my vagrant machine inside a virtualenv. However I made a new virtual environment to test out the new django ...
(2) odpowiedzi
2016-12-19 02:12 Reverse for 'password_change_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] »
I am getting the following error in Django. Reverse for 'password_change_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) ...
(2) odpowiedzi
2016-12-18 21:12 using GET variables with django »
I'm just trying to get a minimum working example of GET variable usage in django. Apologies, I'm very very new to django. At the moment, urls.py loo...
(1) odpowiedzi
2016-12-18 17:12 upload image using filerImageField »
I got simple form. I want to save image and than render it in template. Form is working Ok. All values are stored and rendered. When i click on "choos...
(1) odpowiedzi
2016-12-18 11:12 Django 1.10 redirect view not working »
My redirect to another view is not working in django 1.10 Views.py from django.shortcuts import render, redirect # Create your views here. from for...
(2) odpowiedzi
2016-12-18 01:12 Rewrite PostgreSQL to Django ORM »
if this possible to rewrite this PostgreSQL query to Django ORM with no raw SQL, i tried it by myself but i haven't succeeded. Here is Fund's model ...
(1) odpowiedzi
2016-12-17 21:12 PostgreSQL . Models.py is not transformed into database scheme »
There were two issues. First was due to Django converting model class name with app name prefix, and as far as that part was solved 'Relation does...
(2) odpowiedzi
2016-12-17 16:12 Why app/admin in debug mode false give me Server Error 500 »
I changed my server settings.py from Debug = True to Debug = False. I can get httpResponses from my other app urls but I can't access the /admin url ...
(2) odpowiedzi
2016-12-17 15:12 'Relation does not exist' error after transferring to PostgreSQL »
I have transfered my project from MySQL to PostgreSQL and tried to drop the column as result of previous issue, because after I removed the problemati...
(1) odpowiedzi