Re: getting tuples from http request.GET

2015-03-07 Thread Sunil Sawant
Thanks Collin, you cut out the crap from from my code. Simple is beautiful :) On Friday, March 6, 2015 at 5:11:45 PM UTC-8, Collin Anderson wrote: > > Hi, > > Normally query arguments are separated by &. If you're able to send the > data like this: > > >

Need help creating a form

2015-03-07 Thread Ben Gorman
Note: I've also posted this question StackOverflow but sadly, it hasn't been answered yet. My setup consists of a League which can contains multiple Teams. I'm trying to build a form for setting up a (single

Re: [Choose Database based on geolocalization]

2015-03-07 Thread Russell Keith-Magee
Hi Xina, The short answer is "not easily, and not within Django". Django's DB Routers don't contain any detail about the request, so there's no ability to geolocated the requesting IP for routing purposes. For the record, this is because Django is a general purpose toolkit - there's no guarantee

Re: Embedding a compiler to my web page

2015-03-07 Thread Russell Keith-Magee
If you're going to be compiling code, you almost certainly don't want to be using subprocess for this. A view should be able to return in milliseconds. Very few native code compilations are going to be complete in milliseconds. What you should be doing is treating the compilation step as a

Re: Fixing a poorly written Django website (no unit tests)

2015-03-07 Thread Some Developer
On 06/03/15 16:23, Ilya Kazakevich wrote: You may start from highest level testing: 1) create "usage scenarios" for your website. Like "customer opens page 'foo', and should see 'bar'". You use such scenarios for manual testing, right? 2) code such scenarios against Django project. You may use

[Choose Database based on geolocalization]

2015-03-07 Thread xina towner
Hi, is there any possibility that we could select the database to which route a request of a user depending on the geolocalization of the client? Or the user country? I've check some documentation of the dbrouters, but I am concerned that if a user travels to another country he is going to be

Re: Django 1.7 tutorial part 4, url

2015-03-07 Thread luis zarate
Do you have APPEND_SLASH=False in your settings? https://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#append-slash 2015-03-07 10:31 GMT-06:00 luis zarate : > > > 2015-03-06 18:39 GMT-06:00 Collin Anderson : > > Hi, >> >> That seems

Re: Django 1.7 tutorial part 4, url

2015-03-07 Thread luis zarate
2015-03-06 18:39 GMT-06:00 Collin Anderson : > Hi, > > That seems strange. The error says that there's no question with id=1. Are > you sure there's a question with id=1? > > The ending slash seems important to me. I don't know why it would work > without it. > > Collin > >

Re: Embedding a compiler to my web page

2015-03-07 Thread luis zarate
You should want to read about subprocess https://docs.python.org/3.4/library/subprocess.html Install your favorite compiler and call it with subprocess as a comand line program. 2015-03-07 9:01 GMT-06:00 Snehasish Sen : > How can I embed a c/c++ compiler to my site

Re: Detecting modifications in ManyToMany field

2015-03-07 Thread Vijay Khemlani
You might find the m2m_changed signal useful https://docs.djangoproject.com/en/1.7/ref/signals/#m2m-changed On Sat, Mar 7, 2015 at 7:57 AM, Fabien Schwob wrote: > Hello, > > I would like to detect changes in a ManyToMany field, to update data > in the linked Model. I've two

Re: Detecting modifications in ManyToMany field

2015-03-07 Thread Vijay Khemlani
You might find the m2m_changed signal useful https://docs.djangoproject.com/en/1.7/ref/signals/#m2m-changed On Sat, Mar 7, 2015 at 7:57 AM, Fabien Schwob wrote: > Hello, > > I would like to detect changes in a ManyToMany field, to update data > in the linked Model. I've two

Embedding a compiler to my web page

2015-03-07 Thread Snehasish Sen
How can I embed a c/c++ compiler to my site which can host a programming competetion -- 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

Re: Existing database - new project

2015-03-07 Thread Derek
I have taken route 1 before; its a bit more messy because you may have to explicitly map your desired model names to the actual column names. You also face the issue of dealing with primary keys. If you have the choice, and the current database is not in use anymore, I would create a new

Re: Gunicorn sock file is missing?

2015-03-07 Thread Kaloian
> > Did you try to sudo to the user running gunicorn and creating the socket? Do you mean to create the socket manually? Haven't tried that. The directory and all its parents are owned by the user running gunicorn and also have 777 permissions. I am no sure I understand what you mean by -

Detecting modifications in ManyToMany field

2015-03-07 Thread Fabien Schwob
Hello, I would like to detect changes in a ManyToMany field, to update data in the linked Model. I've two objects : class Category(models.Model): some fields ... class Post(models.Model): some fields ... categories = models.ManyToManyField(Category) And I would like to