Re: design decision tree survey using django admin interface

2015-07-14 Thread Luis Zárate
I know it is not the answer of your question but for your survey design it is important that you see this links. https://github.com/chrisglass/django_polymorphic https://github.com/django-mptt/django-mptt/ I know that because I did a survey app years ago, but unfortunately it is not free and it i

Re: How to debug? -- DoesNotExist at /admin/login/

2015-07-14 Thread Sergiy Khohlov
Looks like you have missed char. Admi/login is requested not admin. I hope it is typo 14 лип. 2015 00:13 "elim" пише: > I got error when I did > $ python manage.py runserver > Performing system checks... > > System check identified no issues (0 silenced). > July 13, 2015 - 20:42:02 > Django versi

Re:

2015-07-14 Thread James Schneider
Check your regex syntax in your URL conf. You aren't capturing the named group correctly. You have (?https://docs.djangoproject.com/en/1.8/topics/http/urls/#named-groups -James On Jul 14, 2015 3:32 PM, "monoBOT" wrote: > > ​I want to test some views in DRF project. > > The problem comes when i t

Re: How to render a grouped list to a template

2015-07-14 Thread abnerpc
You need to use regroup: https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#regroup On Sun, Jul 12, 2015 at 8:44 PM, Andrea wrote: > Hello. I'm new to both django and python. > > This in an example code i made up to illustrate my problem: > # Models > class Book(models.Model): > s

design decision tree survey using django admin interface

2015-07-14 Thread anc
I need to build a survey tool which provides an interface to the survey administrator to add/edit/delete questions. I understand we can do it through the admin interface. But can we modify the admin interface to provide branched/skip logic feature so that the administrator can design a survey w

Re: Playing with API- DjangoProject Part 1

2015-07-14 Thread James Schneider
> When I run the shell, I keep getting errors. Also, I have created the > question three times now so when I type q.id , I get a return value of 3. > How can I delete them. Easy enough. q.delete() You may have to perform a query to gather up the other questions that you've already created and p

[no subject]

2015-07-14 Thread monoBOT
​I want to test some views in DRF project. The problem comes when i try to check views that have arguments in the urls. urls.py url(r'^(? ​<​ Pcompany_hash>[\d\w]+)/(? ​<​ Ptimestamp>[\.\d]*)/employees/$', EmployeeList.as_view(), name='employeelist'), views.py class EmployeeL

Re: Playing with API- DjangoProject Part 1

2015-07-14 Thread Néstor
This worked for me in ubuntu: python manage.py shell Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) *>>> from polls.models import Question, Choice* *>>> from django.utils import timezone

preserve data when migrating ForeignKey to ManyToManyField

2015-07-14 Thread A Lee
I'd like to change a ForeignKey field into a ManyToManyField, preserving existing data by creating entries in the many-to-many through table. Running makemigrations after changing the model class creates a migration that executes a RemoveField on the existing ForeignKey field and then an AddFie

Re: Where to put wsgi code in Apache in Ubuntu?

2015-07-14 Thread Christian Kleineidam
I have create a new file named dj.conf and put it into /etc/apache2/sites-available/. The text of the file is: __ WSGIScriptAlias / /root/konnekt/pro/konsite/konsite/wsgi.py WSGIPythonPath /root/konnekt/pro/konsite/konsite Require all granted _ When I run a2ensite

Playing with API- DjangoProject Part 1

2015-07-14 Thread Auj Snow
When I run the shell, I keep getting errors. Also, I have created the question three times now so when I type q.id , I get a return value of 3. How can I delete them. Also when I ask the question text (q.question_text) I get "" instead of the "Whats up". Any help would be greatly appreciated.

Re: Celery to process task and modify the model fields

2015-07-14 Thread Robin Lery
Yes. That time you were the one to guide me. I was looking at other projects after that. I am just confused on how to get the video.mp4_720 to be the converted video. Will you please help. Thank you. On Wed, Jul 15, 2015 at 1:15 AM, Vijay Khemlani wrote: > I remember this question from... febr

Re: python manage.py makemigrations polls

2015-07-14 Thread Auj Snow
Thanks for the help. I figured it out. I wasn't in the right directory! On Monday, July 13, 2015 at 10:56:52 PM UTC-4, Auj Snow wrote: > > When I try to run "python manage.py makemigrations polls" in my terminal, > I get an error "No changes detected in app 'polls' " > > I have saved the 'polls'

Re: Celery to process task and modify the model fields

2015-07-14 Thread Vijay Khemlani
I remember this question from... february I think, what's changed since then? On Tue, Jul 14, 2015 at 3:29 PM, Robin Lery wrote: > I would like to convert video into mp4 using ffmpeg and celery for the > asynchronous task. When user uploads a video, it will be for the > original_video and save i

Re: Opening Django File

2015-07-14 Thread Nikolas Stevenson-Molnar
Yes, PyCharm is great. Also have a look at Sublime Text: https://www.sublimetext.com/ And for free, check out GitHub's Atom: https://atom.io/ _Nik On 7/14/2015 11:58 AM, Sadaf Noor wrote: There is a thing called IDE: https://en.wikipedia.org/wiki/Integrated_development_environment PyCharm (

Re: Opening Django File

2015-07-14 Thread Sadaf Noor
There is a thing called IDE: https://en.wikipedia.org/wiki/Integrated_development_environment PyCharm (https://www.jetbrains.com/pycharm/) is my personal fevorite, Cheers! 2015-07-14 20:23 GMT+06:00 Great Avenger Singh : > On Tue, Jul 14, 2015 at 2:45 PM, Chaitanaya Sethi > wrote: > > > I have

Re: How to save base64 string in Python django

2015-07-14 Thread Sadaf Noor
If you can avoid saving images to database then the solution would look like following where you are serving base64 url of image to reduce your website data bandwidth: 1. from django.db import models 2. class Photo( models.Model ): 3. title = models.CharField( max_length=255 ) 4. imag

Celery to process task and modify the model fields

2015-07-14 Thread Robin Lery
I would like to convert video into mp4 using ffmpeg and celery for the asynchronous task. When user uploads a video, it will be for the original_video and save it. After that I want celery to convert it into a different version for the mp4_720 field. However I am confused on how to apply that logic

Re: Match multiple URLs to the same pattern

2015-07-14 Thread Bill Freeman
You will want a routing view, or a fallback cascade. In either case, make that urlpattern r'^([\w-]+)$'. You don't need to escape the - because it's the last char in the class. You don want to restrict the urls to those in which the entire url matches (^ and $), and the parentheses capture the s

Re: How to save base64 string in Python django

2015-07-14 Thread Bill Freeman
You don't show where the 'Image' object comes from (in Image.open), so I can't be specific, but here are some generalities: "Incorrect padding" is probably a message from the base 64 decoder. Capture your request.POST[photo] to play with separately. If you are doing this under the development ser

Re: Opening Django File

2015-07-14 Thread Great Avenger Singh
On Tue, Jul 14, 2015 at 2:45 PM, Chaitanaya Sethi wrote: > I have created a django file. > How to open it, the place where code can be edited? Question seems very vague. Django files are mostly Python Files with .py extension, So you can use any editor. or be more specific to your question. --

Re: Help me develop a Job Tracker (?)

2015-07-14 Thread Softeisbieger
First: one cannot use get_cleaned_data_for_step(*step*) inside get_form_initial() (see: here

Re: Match multiple URLs to the same pattern

2015-07-14 Thread Avraham Serour
What do you mean by flat URL structure? In any case you may have a controller called by the URL dispatcher that decides which view to use to process the request. No need to complicate on writing you own dispatcher replacement On Tue, Jul 14, 2015, 4:20 PM Mathew Byrne wrote: > I have an applic

Match multiple URLs to the same pattern

2015-07-14 Thread Mathew Byrne
I have an application that requires a flat URL structure for multiple different views. The single route r"^[\w\-]+" should start by looking at slugs for one Model class, and move onto a Category Model class if no match is found, then a Vendor model class, and lastly down to the flatpages app.

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-14 Thread Tim Graham
Please try adding the super() calls. On Tuesday, July 14, 2015 at 5:44:09 AM UTC-4, tom.sz...@eporta.com wrote: > > Hi, yes. Some of my test classes do use setUpClass() without calling > super(). > > On Monday, July 13, 2015 at 5:44:03 PM UTC+1, Tim Graham wrote: >> >> Do your test classes use se

Opening Django File

2015-07-14 Thread Chaitanaya Sethi
I have created a django file. How to open it, the place where code can be edited? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@google

Re: 1.7 to 1.8 upgrade: test suite failing

2015-07-14 Thread tom . szpytman
Hi, yes. Some of my test classes do use setUpClass() without calling super(). On Monday, July 13, 2015 at 5:44:03 PM UTC+1, Tim Graham wrote: > > Do your test classes use setUpClass() and/or tearDownClass()? If so, are > you missing super() calls in those methods? > > On Monday, July 13, 2015 at

Re: Help me develop a Job Tracker (?)

2015-07-14 Thread Softeisbieger
The FormWizard seems to be a good hint, since my input process consists of to steps: First create a Project and specify the Workflow to use. Second, show the Tasks for the Project (as indicated by the chosen Workflow / Step) and allow the user to tweak the Tasks (change assignee, deadline). I c

Re: Unable to reverse URL

2015-07-14 Thread James Schneider
That particular syntax works in Django 1.4, did you do an upgrade? -James On Jul 13, 2015 11:52 PM, "Vincent" wrote: > Hi James, > > substance_list is indeed the name of the view. I've now applied > namespaces, and added quotes around each URL statement, and it works! > thanks! > > What I do not