[ANNC] django-sanction 0.1.0 (OAuth2 client)

2012-08-16 Thread Demian Brecht
django-sanction is a wrapper for the sanction OAuth2 client library. High level features include: Provider agnostic: There is no assumption made about what providers should be accounted for (as in the core sanction module). This means that while providers that follow the OAuth 2 spec should be

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 9:43am, Melvyn Sopacua wrote: On 17-8-2012 1:31, Mike Dewhirst wrote: On 17/08/2012 4:06am, Melvyn Sopacua wrote: The -*- coding: utf-8 -*- line. Done. It now respects any existing coding in models.py and any existing from __future__ imports. - Same with db_table in the

回复: Customizing session id strings?

2012-08-16 Thread Pengfei Xue
git://github.com/martinrusev/django-redis-sessions.git take a look at this implementation for redis I think that's what you want -- Sincerely, Pengfei Xue 已使用 Sparrow (http://www.sparrowmailapp.com/?sig) 已使用 Sparrow (http://www.sparrowmailapp.com/?sig) 在 2012年8月17日星期五,上午12:12,Roy

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 9:43am, Melvyn Sopacua wrote: On 17-8-2012 1:31, Mike Dewhirst wrote: On 17/08/2012 4:06am, Melvyn Sopacua wrote: On 16-8-2012 11:33, Mike Dewhirst wrote: - Perhaps do the same with editor modelines, like the one you have for emacs. Vi(m)'s start with either vim: vi: or ex:.

django makemessages doesn't recognize trans in templates

2012-08-16 Thread Jojo
Hi, the subject should be a little clear so, this is the project folder structure project folder locale en LC_MESSAGES django.po es LC_MESSAGES django.po it LC_MESSAGES django.po project __init__.py mochileros settings.py urls.py wsgi.py

Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Tomas Neme
DropDownMultiple widget http://djangosnippets.org/snippets/747/ -- "The whole of Japan is pure invention. There is no such country, there are no such people" --Oscar Wilde |_|0|_| |_|_|0| |0|0|0| (\__/) (='.'=)This is Bunny. Copy and paste bunny (")_(") to help him gain world domination. --

Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Melvyn Sopacua
On 17-8-2012 1:05, Houman wrote: > What I am trying to achieve would be deal type having a m2m > relationship to sales items. I don't like the m2m widget, So change it. All ModelForm derivatives have a widgets argument that is a dictionary of fieldname => widget instance:

Re: script for splitting models.py

2012-08-16 Thread Melvyn Sopacua
On 17-8-2012 1:31, Mike Dewhirst wrote: > On 17/08/2012 4:06am, Melvyn Sopacua wrote: >> On 16-8-2012 11:33, Mike Dewhirst wrote: >> - Perhaps do the same with editor modelines, like the one you have for >> emacs. Vi(m)'s start with either vim: vi: or ex:. > > Not sure what you mean here. The

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 9:31am, Mike Dewhirst wrote: On second thoughts, from __future__ import absolute_import is needed for 1.4 but should be removed when upgrading to 1.5. On third thoughts, that should be "when upgrading to Python 3.x" ! Mike -- You received this message because you are

Re: script for splitting models.py

2012-08-16 Thread Mike Dewhirst
On 17/08/2012 4:06am, Melvyn Sopacua wrote: On 16-8-2012 11:33, Mike Dewhirst wrote: https://github.com/mdewhirst/split-models Python 2.7 and Django 1.4 One of mine was getting too big and too labour-intensive to debug after a manual split. This was due to accretion of cruft during my

Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Houman
Hi xavier, Apologies for the confusion. What I am trying to achieve would be deal type having a m2m relationship to sales items. I don't like the m2m widget, so I thought I use formsets with dropdowns in them. The idea is good, somce the user would choose how many dropdowns he wants and

Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Xavier Ordoquy
Hi Houman Le 17 août 2012 à 00:05, houmie a écrit : > DealType class has a many to many relationship to sales_item. Therefore > using inline formsets wouldn't be possible. I have tried it and inlines need > foreign key. DealType has a ForeignKey to Company which is what

Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread houmie
Hi Xavier, This wasn't the whole story. I actually have a DealType class: |class DealType(models.Model): deal_name= models.CharField(max_length=40) sales_item= models.ManyToManyField(SalesItem) price= models.DecimalField(decimal_places=2) | DealType class has a

Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Xavier Ordoquy
Hi, I'm not sure I understood what you're trying to do. If you want to display all the SaleItem linked to a company in a formset, then inlines are what you're looking for. You'll find the documentation about them there:

How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Houmie
The question might seem too simplistic, but it seems formsets can only work with forms that have simple type fields such as charfield. But has anyone tried to use a form with a dropdown and use that form to instantiate a formset? Let me give you an example why this fails: *Model:* class

Re: Editing a form values

2012-08-16 Thread Melvyn Sopacua
On 16-8-2012 21:08, Nicolas Ardison wrote: > I found how to solve it, Dismiss this message, i read in documentation. > > ##START OF CODE > class MyForm ( form.Form): > > email = forms.CharField(label="Email"); > name= forms.CharField(label="name"); > lastname = forms.CharField(label="

installing Django without translations

2012-08-16 Thread Ben Saylor
Hi, Is there a way to install Django without creating the translation (*/locale/*/LC_MESSAGES/*) files? I am trying to minimize the disk space required for Django. (I actually exceeded my disk quota during installation, and noticed that the locale directories within the build directory were

Re: Django 1.4 admin. Calendar widget appears for DateTimeField but not DateField

2012-08-16 Thread Lachlan Musicman
Grimmus, You haven't really given us a lot of information to work with. My suggestion is: 1. Try it in another browser or clear your cache and try again 2. Send some more information, by (for example) using a code inspector (show source, firebug, etc) to see if the jquery and template code is

Re: Editing a form values

2012-08-16 Thread Nicolas Ardison
I found how to solve it, Dismiss this message, i read in documentation. ##START OF CODE class MyForm ( form.Form): email = forms.CharField(label="Email"); name= forms.CharField(label="name"); lastname = forms.CharField(label=" lastname"); def Loadname(self,n_name) self.fields[' name

Re: Django Admin doesn't show all fields from model when registered.

2012-08-16 Thread Babatunde Akinyanmi
Ok I fixed it and in case someone else falls into such a trap, here's how I fixed it. My Answer model had a field with name 'is_correct' and had a method with name 'is_correct'. This confused django such that: >>> ans = Answer.objects.get(id=1) >>> ans.is_correct > So I changed the name of the

Editing a form values

2012-08-16 Thread Nicolas Ardison
Hello guys, i can not find how to the following things. I have a form that it's not related with any model, and i want to load it with initial data. ##START OF CODE class MyForm ( form.Form): email = forms.CharField(label="Email"); name= forms.CharField(label="name"); lastname =

Re: Difficulties using generic views (Tutorial 4, Django 1.4)

2012-08-16 Thread Jamie Re
I have had to reboot my VM so it recognizes new files, that could have been your problem? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Q3NRvTo_Jr0J. To

Re: Auto login with external cookie from different system

2012-08-16 Thread Melvyn Sopacua
On 16-8-2012 6:02, Kurtis Mullins wrote: > Not all of us host the Python docs, locally, haha. Lies! But yea, forgot to check that so thanks :) -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: script for splitting models.py

2012-08-16 Thread Melvyn Sopacua
On 16-8-2012 11:33, Mike Dewhirst wrote: > https://github.com/mdewhirst/split-models > > Python 2.7 and Django 1.4 > > One of mine was getting too big and too labour-intensive to debug after > a manual split. This was due to accretion of cruft during my learning > (which hasn't stopped). So I

Re: installing django extensions

2012-08-16 Thread Alexis Roda
Al 16/08/12 19:16, En/na Sells, Fred ha escrit: Thanks, that last post was the clue I needed. I have 2 independent, active django projects and was erroneously editing the settings.py in the wrong project. Just plain old stupid error, but I may have not seen it for days without all your help.

RE: installing django extensions

2012-08-16 Thread Sells, Fred
Thanks, that last post was the clue I needed. I have 2 independent, active django projects and was erroneously editing the settings.py in the wrong project. Just plain old stupid error, but I may have not seen it for days without all your help. Thanks and apologies for taking up your time.

Re: installing django extensions

2012-08-16 Thread Alexis Roda
Al 16/08/12 17:20, En/na Sells, Fred ha escrit: It seems to import OK, see below: more manage.bat \alltools\python26\python manage.py %1 %2 %3 %4 %5 C:\all\projects\AccTherapySchedulerServer\AccTherapySite>manage shell

Customizing session id strings?

2012-08-16 Thread Roy Smith
We're using django.contrib.sessions.backends.cache. We use mongodb for our datastore, so we don't use the django model/database support at all. The standard django session machinery generates 32-character hex strings (128 bits) for session ids. We store the session_id in many places in our

RE: installing django extensions

2012-08-16 Thread Sells, Fred
It seems to import OK, see below: >more manage.bat \alltools\python26\python manage.py %1 %2 %3 %4 %5 C:\all\projects\AccTherapySchedulerServer\AccTherapySite>manage shell C:\all\projects\AccTherapySchedulerServer\AccTherapySite>\alltools\python26\python manage.py shell Python 2.6.6

Re: installing django extensions

2012-08-16 Thread Amyth Arora
As Alexis said, Try importing it in a shell and see what response you get, the INSTALLED_APPS dictionary is correct , seems more like a corrupt installation of django_extentions. On Thu, Aug 16, 2012 at 6:53 PM, Sells, Fred wrote: > I’m running python2.6 and django

Django Admin doesn't show all fields from model when registered.

2012-08-16 Thread Tundebabzy
Hi guys, here's bit of my code http://dpaste.com/hold/787292/ The problem is that my Answer model in admin is missing the 'is_correct', 'date_added' and 'modified' fields.

Re: installing django extensions

2012-08-16 Thread Alexis Roda
Al 16/08/12 15:23, En/na Sells, Fred ha escrit: C:\alltools\python26>python Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >> import django_extensions >> dir(django_extensions)

Re: How well does South work in a team?

2012-08-16 Thread Tim Chase
On 08/16/12 08:58, Paul Backhouse wrote: > On Thu, 2012-08-16 at 10:39 -0300, Tomas Neme wrote: >> Well, if you push without pulling, this might happen, > > *Implicit git usage* :D > > I'd expect git to squeal about it being a non-fast-forward commit. Git should, though other VCSes might notice

Re: How well does South work in a team?

2012-08-16 Thread Ramiro Morales
On Thu, Aug 16, 2012 at 12:44 AM, Benjamin Lei wrote: > I'm just wondering since it seems the migrations created are all prepended > with an incremental number... so if two developers were to push two > different migrations, each with the same id, I'm afraid something bad

Re: How well does South work in a team?

2012-08-16 Thread Tomas Neme
>>> Well, if you push without pulling, this might happen, >> >> *Implicit git usage* :D > > Implicit VCS usage, whichever you choose. > > If you don't, you shouldn't be doing team work ah, I see now. CVS wouldn't complain in that scenario... neither would git/hg when you pull, for that case..

Re: How well does South work in a team?

2012-08-16 Thread Tomas Neme
>> Well, if you push without pulling, this might happen, > > *Implicit git usage* :D Implicit VCS usage, whichever you choose. If you don't, you shouldn't be doing team work -- "The whole of Japan is pure invention. There is no such country, there are no such people" --Oscar Wilde |_|0|_|

Re: How well does South work in a team?

2012-08-16 Thread Paul Backhouse
On Thu, 2012-08-16 at 10:39 -0300, Tomas Neme wrote: > Well, if you push without pulling, this might happen, *Implicit git usage* :D I'd expect git to squeal about it being a non-fast-forward commit. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: How well does South work in a team?

2012-08-16 Thread Tomas Neme
Well, if you push without pulling, this might happen, if you always pull before pushing, then you'd have to manually merge both migrations (which would probably mean letting the other migration as 001, and changing yours so it adds your wanted changes on top of THAT And as an answer: using south

installing django extensions

2012-08-16 Thread Sells, Fred
I'm running python2.6 and django 1.3 I've installed django_extensions using easy_install and verified it as shown. Directory of C:\alltools\python26\Lib\site-packages 08/16/2012 07:59 AM . 08/16/2012 07:59 AM .. 03/12/2012 11:19 AM django 05/28/2011

Re: How well does South work in a team?

2012-08-16 Thread Marcin Tustin
For that to happen, models would have to be changed without a migration being generated, or without it boeing added to source control. Neither is good practice. On Aug 16, 2012 7:56 AM, "Benjamin Lei" wrote: > I'm just wondering since it seems the migrations created are all

How well does South work in a team?

2012-08-16 Thread Benjamin Lei
I'm just wondering since it seems the migrations created are all prepended with an incremental number... so if two developers were to push two different migrations, each with the same id, I'm afraid something bad will happen. For example: Dev A: creates 001_somedesc Dev B: creates

Displaying queries in Django admin

2012-08-16 Thread lakesh
I would like to display all the student information like his ID, parent's first name,parent's first name, parent's email and the country in the django admin. These data are in the models and i would like to query and display them in django admin like a database table. The models for Student,

Django 1.4 admin. Calendar widget appears for DateTimeField but not DateField

2012-08-16 Thread grimmus
I have checked for missing resources (jquery etc.) but all external assets are being loaded correctly. It's just that nothing appears beside the textbox for the DateField ! Anyone any ideas why this might be happening ? Thanks -- You received this message because you are subscribed to the

Re: Calculations in Queries

2012-08-16 Thread akaariai
On 16 elo, 03:51, Callum Bonnyman wrote: > I've tried a few things but i cannot get the correct date formats to > calculate the difference, so far i have this: > >     popular_posts = Post.objects.extra(select={ >     'popularity': '(' + datetime.datetime.now() + ' -

script for splitting models.py

2012-08-16 Thread Mike Dewhirst
If anyone is interested I have uploaded a script for splitting a monolithic models.py into multiple files in ./models https://github.com/mdewhirst/split-models Python 2.7 and Django 1.4 One of mine was getting too big and too labour-intensive to debug after a manual split. This was due to

Re: What is the easy way to install DJango?

2012-08-16 Thread yati sagade
While other answers have covered nicely how to install Django on your system, you might want to take this opportunity to venture in to the wonderful land of UNIX. It will make your life much, much easier :) If you have the option, install Linux beside your Windows in a dual boot setting and after