RE: How to create a Dynamic Hierarchical Form

2013-04-22 Thread Babatunde Akinyanmi
Hi Cody, I think you should try another approach, something simple as what you have coded is at best wrong. make_quiz_form_class and _QuizForm try to get variables that are not available. make_quiz_form_class doesn't take any arguments as per your definition but you are supplying it with

How to create a temporary table in Django use ORM

2013-04-22 Thread teddy wang
CREATE TEMPORARY TABLE TEMP (SELECT * FROM TABLE ORDER BY COLUMN_A); SELECT * FROM TEMP ORDER BY COLUMN_B; I want to implement this selection in Django use ORM,,,still have no idea,,, anybody help? thanks -- You received this message because you are subscribed to the Google Groups "Django

RE: How to create a Dynamic Hierarchical Form

2013-04-22 Thread Babatunde Akinyanmi
Hi Cody, I think you should try another approach, something simple as what you have coded is at best wrong. make_quiz_form_class and _QuizForm try to get variables that are not available. make_quiz_form_class doesn't take any arguments as per your definition but you are supplying it with

Re: debugging with pycharm

2013-04-22 Thread Ezequiel
On Monday, April 22, 2013 3:03:11 PM UTC-3, Mark Lybrand wrote: > > It would appear that this was broken in 2.7.1. When I upgraded to 2.7.2 > my breakpoints once again work as expected. > I think in 2.7.1 the BP did not work if you set them after running server, on 2.7.2 is fixed. But in

How to avoid URLField adding the trailing slash?

2013-04-22 Thread Odagi
Django URLField https://docs.djangoproject.com/en/1.5/ref/forms/fields/#urlfield likes to add a trailing slash at the end of the user input, forcing all URLs to be stored with the extra character, this is wrong. How can I stop this behavior and save URLs as submitted by users? Thanks. --

Admin pagination not digg-style

2013-04-22 Thread Stanislav Mihaylov
I can't seem to find an easy and simple way to make the Django admin paginator display all page numbers rather then displaying them in 'Digg' style in the footer navigation. I read plenty of articles on how to make it Digg style, but it seems in the new Django versions it is Digg style by

How to create a Dynamic Hierarchical Form

2013-04-22 Thread Cody Scott
I am trying to create a form where you select product(s) and technology(s) and based on your selection different modules are available for selection. forms.py def make_quiz_form_class(): #Listing available options products = [(i, _(i)) for i in Product.objects.all()] technologies

Using Django and R in a production environment?

2013-04-22 Thread Derek
Based on googling around this topic, it seems that using RPy2 is the most common way to interface with R from Python. However all the discussions on this seem to centre around working in a desktop (single user) environment. The one discussion I could find that deals with the issue of working

Re: Need good image on the fly resizing

2013-04-22 Thread frocco
I also just realized that I am not using memcached I will try this tonight and see if it helps. On Monday, April 22, 2013 2:33:22 PM UTC-4, frocco wrote: > > I tried sorl-thumbnail and user is complaining that some images are not > resized to same size as others. > > On Monday, April 22, 2013

Re: Need good image on the fly resizing

2013-04-22 Thread frocco
I tried sorl-thumbnail and user is complaining that some images are not resized to same size as others. On Monday, April 22, 2013 11:39:19 AM UTC-4, Richard Jelte wrote: > > If you don't want to have to handle manually resizing images, I would > recommend letting something like >

Re: How to switch languages?

2013-04-22 Thread Cody Scott
I installed django-localeurl and disabled 'django.middleware.locale.LocaleMiddleware', and i18n_patterns but it had the same issue of only translating 'Yes' and 'No' and it reverted back to /en/ on every new page load. On Monday, 22 April 2013 12:08:34 UTC-4, אברהם סרור wrote: > > I

Re: debugging with pycharm

2013-04-22 Thread Mark Lybrand
It would appear that this was broken in 2.7.1. When I upgraded to 2.7.2 my breakpoints once again work as expected. On Mon, Apr 22, 2013 at 10:58 AM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > I assume you're running it in the debugger? Make sure you regular server > isn't

Re: debugging with pycharm

2013-04-22 Thread Nikolas Stevenson-Molnar
I assume you're running it in the debugger? Make sure you regular server isn't still running. Also, make sure your break point is on a line a line which does something (e.g., /not/ on a class/function definition, empty line, etc.) _Nik On 4/21/2013 10:14 PM, Mark Lybrand wrote: > I can't get

Modifying a field in another model

2013-04-22 Thread Vittorio
My (newbye) problem is as follows: Suppose class Person(models.Model): first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) address = models.CharField(max_length=100) class Lent_Book(models.Model): title =

Re: I have searched and searched for a CSV Importer that does the following.

2013-04-22 Thread Avraham Serour
looks like you'll have to write something like this yourself, it doesn't seem hard to make a page presenting the user with an option before loading the file and then using just one column On Mon, Apr 22, 2013 at 5:47 PM, sparky wrote: > I have searched and searched for a

Re: How to switch languages?

2013-04-22 Thread Avraham Serour
I suggest taking a look at django-localeurl, I used it instead of a form to change language on my last project. I believe it is worth taking a look On Mon, Apr 22, 2013 at 6:58 PM, Cody Scott wrote: > How do you get the

Re: How to switch languages?

2013-04-22 Thread Cody Scott
How do you get the preferred language? In the 1.5 docs it says to add 'django.core.context_processors.i18n' to your TEMPLATE_CONTEXT_PROCESSORS which variable is that in your settings.py? If I add it to TEMPLATE_LOADERS and refresh the page I get the error: 'function' object has no attribute

Re: Django Python Understanding Classes with an example

2013-04-22 Thread Gabriel
Hey, it would be better if you told us what's happening when you run this code, what errors are you getting and all... But one thing I noticed on the last line: You don't need to send self to your read_file function, but you do need to specify that you're calling the function from your object,

Re: How to link different kinds of objects?

2013-04-22 Thread Bastian
Thanks to both of you for your in depth answers and insight. The objects that go to the feed are premade. I will try to see to what extent I can use the links you provided. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Need good image on the fly resizing

2013-04-22 Thread Richard Jelte
If you don't want to have to handle manually resizing images, I would recommend letting something like sorl-thumbnail handle the re-sizing for you. You will still need to have PIL or Pillow installed first, and make sure that png/jpeg support

Django 1.5.1 on Google App Engine python27

2013-04-22 Thread Timothy Makobu
Hi all, According to the appengine docs, It can run any WSGI app. So im thinking, appart from the ORM, django, any version, can run on appengine. webapp2 and jinja2 are offered but, why use those when I can use the best? How do I set this up? I have read this tutorial

Re: How to switch languages?

2013-04-22 Thread Addy Yeow
There are several ways to switch language ( https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#how-django-discovers-language-preference). I normally set django_language session variable to the preferred language. For 1), have you compiled your messages into .mo files? You will also

Django Python Understanding Classes with an example

2013-04-22 Thread sparky
I'm just learning Python and Django. **Could someone tell me where I'm going wrong with below?** What I want to do is something like this csvobject = CSVViewer(file) rows = csvobject.get_row_count() This is what I have so far. Remember this is all new to me so I'm looking for a an

How to switch languages?

2013-04-22 Thread Cody Scott
I am trying to get translations to work on my site. I have marked words for translation and they show up in the django.po file. I am wondering what is the proper way to switch the current language. Currently I have the following in my project urls.py urlpatterns = i18n_patterns('', #

I have searched and searched for a CSV Importer that does the following.

2013-04-22 Thread sparky
I have searched and searched for a CSV Importer that does the following... * Imports a CSV Allows users to then select the header that corresponds to the model.* But, honest nothing exists I can find, anyone know of any app out there in Django that does this I could have missed? As close as I

Re: Problem uplaod

2013-04-22 Thread Hélio Miranda
I managed to solve the problem ... The problem was that I needed to put in "index.html" this: {{form}} thank you -- 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

Re: Python Developer Position

2013-04-22 Thread vinoth job
can you please provide company's name On Mon, Apr 22, 2013 at 12:13 PM, G.T. RAO wrote: > Python Developer Position > > If you love programming in Python and have good working experience in > Twisted, ExtJs and interested in working with a Product development company >

Re: Problem uplaod

2013-04-22 Thread Michael Hernandez
Hi, Miranda I tried to help you in your other thread. Are you getting errors. Can you paste them. What is the problem right now? On Monday, April 22, 2013 5:43:26 AM UTC-4, Hélio Miranda wrote: > > I'm trying to make a simple upload as follows: > http://plnkr.co/edit/neqmvI13prMySMtHQHta > >

Re: Need good image on the fly resizing

2013-04-22 Thread Aljoša Mohorović
check http://django-imagekit.readthedocs.org Aljosa -- 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...@googlegroups.com. To post to this

Re: How to link different kinds of objects?

2013-04-22 Thread Michael Hernandez
Sorry I am late to this thread I started typing up a response yesterday but never got around to sending it. Let me first reviews Problem scope. 1. You have a Feed, which is an object. 2. A feed can be created by any user. 3. A user can create an object. Is this object premade and they are just

Re: Re-usable app for REST API creation with Python 3 support?

2013-04-22 Thread Xavier Ordoquy
Hi Thomas, You should give a go to Django Rest Framework (http://django-rest-framework.org/) as it has been ported to Python3. Regards, Xavier Ordoquy, Linovia. Le 22 avr. 2013 à 12:08, Thomas Weholt a écrit : > I'm looking for a re-usable app for django that can

Re: How to link different kinds of objects?

2013-04-22 Thread Avraham Serour
So it looks like the m2m should be in the object Model. one more thing, maybe it would be worth it to inline the object admin in the feed admin take a look at https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin On Mon, Apr 22, 2013 at 12:22 PM, Bastian

Re: a wired problem with Debug for django1.5.1

2013-04-22 Thread David Patiño
Hi, When Django 1.5.1 is being used with DEBUG=False then ALLOWED_HOSTS parameter in settings.py must be set up. Please try to check if that solves the problem. Cheers,

Python Developer Position

2013-04-22 Thread G.T. RAO
Python Developer Position If you love programming in Python and have good working experience in Twisted, ExtJs and interested in working with a Product development company whose R center is based in Hyderabad which is providing solutions to global MNC's and into Platform development then do

Re-usable app for REST API creation with Python 3 support?

2013-04-22 Thread Thomas Weholt
I'm looking for a re-usable app for django that can help create a REST-ful API, but when trying to install django-piston and django-tastypie in my Python 3.3 virtual environment they both fail. Are there other alternatives? Are they suppose to work under Python 3.3 or am I doing something wrong?

Re: a wired problem with Debug for django1.5.1

2013-04-22 Thread Venkatraman S
On Mon, Apr 22, 2013 at 8:30 AM, liu li wrote: > > When Debug = False, all of things are working fine, > > when Debug = True, browser got an error with 500 > > so do you know why? > > I am using nginx to handle all of static files like css,img > Is INTERNAL_IPS /

Problem uplaod

2013-04-22 Thread Hélio Miranda
I'm trying to make a simple upload as follows: http://plnkr.co/edit/neqmvI13prMySMtHQHta But something is wrong, because it saves the image in the folder. What could it be? What am I doing wrong? I'm New to Django thank you -- You received this message because you are subscribed to the Google

Re: How to link different kinds of objects?

2013-04-22 Thread Bastian
Thanks for your answer. About the constraints: a feed can be empty or contain one or more objects. And an object must belong to at least one feed. I have run some tests and the m2m field works perfectly for that. -- You received this message because you are subscribed to the Google Groups

Re: Need good image on the fly resizing

2013-04-22 Thread Avraham Serour
You should use Pillow instead of PIL On Mon, Apr 22, 2013 at 8:59 AM, yati sagade wrote: > Check PIL out: > http://stackoverflow.com/questions/273946/how-do-i-resize-an-image-using-pil-and-maintain-its-aspect-ratio > > > On Mon, Apr 22, 2013 at 6:05 AM, frocco

Re: Upload Image

2013-04-22 Thread Hélio Miranda
I'm doing the following: http://plnkr.co/edit/neqmvI13prMySMtHQHta Is something wrong? What could it be? As it is, should not be saving the image in folder? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: Upload Image

2013-04-22 Thread Hélio Miranda
I still can not upload image Someone can give me one more help? 'm New to Django and did not know what I'm doing wrong ... -- 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

password_change redirect to user profile page

2013-04-22 Thread Nora Olsen
Hi, I have the following urlConf for password change: url(r'^users/(?P\d+)/$', UserProfile.as_view(), name='user_profile'), url(r'^password_change/$', auth_views.password_change, name='password_change'), I can't figure out to redirect to the user profile page by using post_change_redirect?