Re: Translation outside the broswer

2012-10-10 Thread Laxmikant Gurnalkar
You can pass the latest language_code in the url and set that to the session >>>Is there a way to retrieve the latest language used in the user session? cheers *Laxmikant* On Wed, Oct 10, 2012 at 9:14 PM, Bastian wrote: > Ok this is all very clear now, and the docs are quite helpful too ( > ht

Djangoproject and Djangobook websites

2012-10-10 Thread Csaba Kiss
I am wondering if the above mentioned sites are created by Django. If yes, why don't they have a Django badge? If they don't use Django, then hmm, that would make you think... -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discuss

Re: A very basic question with Django

2012-10-10 Thread Sarbjit singh
> Thanks Guys for your valuable answers. As you have pointed out that > learning Framework would take time, so i just wanted to be sure that my > investment would be worth full. I am learning Python & Django as a hobby > but my aim is to make some website dealing with forms and database. So in

Re: Value Error during 1.2 to 1.4 conversion

2012-10-10 Thread Peter
Thanks. That pointed me in the right direction. First, I didn't realize that the 'url' form required named parameters. However, I was using the non-url form, and it turned out in the conversion to class-based generics, I had left off the "{}" third object in each list. So it was expecting a dict

Re: Django performance vs others

2012-10-10 Thread thanos
For real performance I suggest taking a big breath and looking at ChicagoBoss. It's a move I've done that has saved me a lot of money on AWS. On Wed, Oct 10, 2012 at 9:07 AM, Amirouche Boubekki < amirouche.boube...@gmail.com> wrote: > 2012/10/10 Moonlight > >> I think this

Re: Create table and load data

2012-10-10 Thread Larry Martell
I'm having trouble getting django to read my fixture file. I created it in yaml: - model: cdsem.fields pk: 1 fields: name: data_file_id description: data_file_id - model: cdsem.fields pk: 2 fields: name: tool_id description: tool_id and so on. I put it in a file c

Re: A very basic question with Django

2012-10-10 Thread Peter Murphy
On Wednesday, October 10, 2012 3:24:26 PM UTC+10, Sarbjit singh wrote: > > First of all, I am very sorry for asking this basic question. I am not > sure if this is the right place to put this question but I am very confused. > > Hello, Sarbjit. > I am not having much experience with web devel

Re: A very basic question with Django

2012-10-10 Thread Tim Chase
On 10/10/12 13:29, Tomas Ehrlich wrote: > If you know what's CGI, feel free to answer the original question: > "Could Django be deployed using CGI?" Yes, it can be done[1]. No, it's not usually a good idea. -tkc [1] http://joemaller.com/1467/django-via-cgi-on-shared-hosting/ https://code.django

Re: A very basic question with Django

2012-10-10 Thread Kurtis Mullins
On Wed, Oct 10, 2012 at 2:29 PM, Tomas Ehrlich wrote: > Common guys, this thread isn't about me and CGI :) I really don't care > what it is and know, when you've just told me what it is I don't care > even more :) > > If you know what's CGI, feel free to answer the original question: > "Could Djan

Re: A very basic question with Django

2012-10-10 Thread Tomas Ehrlich
Common guys, this thread isn't about me and CGI :) I really don't care what it is and know, when you've just told me what it is I don't care even more :) If you know what's CGI, feel free to answer the original question: "Could Django be deployed using CGI?" Cheers, Tom :) Dne Wed, 10 Oct 2012

Re: A very basic question with Django

2012-10-10 Thread Kurtis Mullins
1. Django is perfectly suitable for handling Forms and content stored in a database. In a low to medium traffic site, serving static content is not a problem at all. In fact, that's the purpose of a Content Management System. Many of which have been built on or around Django. If you get to a point

Re: Update a model using UpdateView

2012-10-10 Thread Stefano Tranquillini
Ok thx. it make sense and does not seem too complex (as the others look like ;) ). On Wednesday, October 10, 2012 1:17:08 PM UTC+2, Kurtis wrote: > > By the way, that 'owner' field would be something like this: > > owner = ForeignKey(User) > > And in my example, I use the Form to make sure the O

Re: Model field that links to a page ID, or external URL

2012-10-10 Thread Andy Baker
(long dead thread resuscitation attempt) I'm not sure I understand your objections. Why would absolute url change? And if it does you still have to worry about external links breaking. Surely the answer is to ensure you don't change the value of get_absolute_url. Don't base it on anything that'

Re: Translation outside the broswer

2012-10-10 Thread Bastian
Ok this is all very clear now, and the docs are quite helpful too (https://docs.djangoproject.com/en/dev/topics/i18n/translation/#using-translations-outside-views-and-templates). But now I wonder what is the best way to implement that? I mean in my case I use Django to automatically discover the u

Re: Django testing strategy

2012-10-10 Thread Daniele Procida
On Thu, Oct 4, 2012, Daniele Procida wrote: >I have started writing my first tests, for a project that has become >pretty large (several thousand lines of source code). >I'd appreciate any advice. Many thanks for the advice and suggestions. This is what I have produced so far:

Re: Drop down menu

2012-10-10 Thread sri
Hi, Thanks for your responses. I am looking to develop the drop down like a select box. I will read the documentation that Cal has pointed to and hopefully i should be able to work it. Thanks Sreekanth On Wednesday, 10 October 2012 13:13:37 UTC+1, jessoclarence wrote: > > Sreekanth, > > Do yo

Re: A very basic question with Django

2012-10-10 Thread shmengie
Django is suited well for developing interactive web applications. It provides comprehensive framework with "batteries included." That means once you learn the framework, common and repetitive development tasks are simpler. Being a framework, means your going to need to learn it's scaffolding

Re: Object Serializer

2012-10-10 Thread Javier Guerra Giraldez
On Tue, Oct 9, 2012 at 8:10 PM, Victor Manuel Quiñones Victor wrote: > I need to serialize some objects and save them into the database. What > library would you suggest for it? there are a few options, each with different pros/cons. roughly in order of personal preference: JSON: pro: works in

Re: Django performance vs others

2012-10-10 Thread Amirouche Boubekki
2012/10/10 Moonlight > I think this one > explains how it works. A quick read make me think it's a bit complex. Check out the routing benchmark too http://mindref.blogspot.fr/2012/10/python-web-routing-benchmark.html If this is legit tests

Re: How to implement a form to update the quantity?

2012-10-10 Thread Domi nika
Thanks. Is it possible to display multiple form in loop? 2012/10/1 Anton Baklanov > it *is good idea* to submit... > > missed some words, lol > > > On Mon, Oct 1, 2012 at 9:52 PM, Anton Baklanov wrote: > >> it to submit forms with ajax, to not reload entire page every time. >> > > > > -- > Regar

Re: Update a model using UpdateView

2012-10-10 Thread Kurtis Mullins
By the way, that 'owner' field would be something like this: owner = ForeignKey(User) And in my example, I use the Form to make sure the Owner is set properly. On Wed, Oct 10, 2012 at 7:14 AM, Kurtis Mullins wrote: > You've got it. I included an 'owner' field on any model that I wanted to > sho

Re: Update a model using UpdateView

2012-10-10 Thread Kurtis Mullins
You've got it. I included an 'owner' field on any model that I wanted to show ownership with. This is actually not too insanely hard as you could make a Parent Model or Mixin to make things easier. Another option is to use something like django-guardian to handle all of your permissions. However,

Re: Localisation and timezones

2012-10-10 Thread koenb
Tom, I think you can create a custom format file for that (see [1] ). Koen [1] : https://docs.djangoproject.com/en/1.4/topics/i18n/formatting/#creating-custom-format-files Op woensdag 10 oktober 2012 12:40:52 UTC+2 schreef Tom Evans het volgende: > > Hi all > > If you enable USE_L10N=True, t

Re: Localisation and timezones

2012-10-10 Thread Tom Evans
On Wed, Oct 10, 2012 at 11:40 AM, Tom Evans wrote: > Hi all > > If you enable USE_L10N=True, then datetime, date and time formats are > all taken from the definition for the current locale. However, none of > these formats seem to include the timezone of a non-naive datetime > field, which I can a

Re: A very basic question with Django

2012-10-10 Thread Tim Chase
On 10/10/12 01:09, Tomáš Ehrlich wrote: >> A2: I admit that I don't know exactly what CGI means, but you >> actually can deploy Django using FastCGI. I'm using WSGI, >> which is recommended method right now. Please checkout >> documentation for more details >> https://docs.djangoproject.com/en/1.

Localisation and timezones

2012-10-10 Thread Tom Evans
Hi all If you enable USE_L10N=True, then datetime, date and time formats are all taken from the definition for the current locale. However, none of these formats seem to include the timezone of a non-naive datetime field, which I can add by disabling USE_L10N and defining an appropriate DATETIME_F

Re: Update a model using UpdateView

2012-10-10 Thread Stefano Tranquillini
Thanks. one question: this works great if you are modifying user data. in fact, you do the checking qs = super(RequestUpdateView, self).get_queryset() return qs.filter(owner=self.request.user) now. let's image i've a form (call it Task) that must be updated by someone (or a group of u

Re: django socialauth username not showing correctly

2012-10-10 Thread Stefano Tranquillini
Mmm...Social Auth has a pipe for creating the user when he logs in with the social-auth. You probably have to remove that and do the creation manually. Yet, I'm not an expert, I've 4 days experience in this ;-). give a look here https://groups.google.com/forum/?fromgroups#!forum/django-social-auth