Re: getting objects unique in several ways (annotate?)

2011-07-04 Thread elliot
Michal's answer does not work. For each book, I want fields from one of its Transactions. .values('pk') gives the book's pk (no relationship to Transaction) and .values('transaction__recipient') does not work either. I dont know squat about writing queries in sql, so extra doesn't help me. Whe

Re: error on django-admin.py startproject

2011-07-04 Thread bruno desthuilliers
On Jul 3, 10:39 pm, ravinder singh wrote: > plz upgrade ur system than try to run Please stop giving clueless advices (and quit that l33t speak too, it doesn't make you look 'kewl'). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: error on django-admin.py startproject

2011-07-04 Thread bruno desthuilliers
On Jul 3, 5:46 pm, Phil wrote: > Thanks for all the comments everyone, it's a great help. > > Yes I have more than one python installed, when I got the server it > had python2.4 and I read the latest django stopped supporting 2.4 so I > installed python2.7 after reading this(also it said not to de

Re: Sidebars

2011-07-04 Thread Venkatraman S
Hi Cal, Basically, i had to show some links by the side of the page(not the "MAIN" content) and was wondering whether there was some consistent and elegant way of doing this. I could change the styling of the sidebar and this could potentially break in some pages and it was a pain to make the edit

Re: error on django-admin.py startproject

2011-07-04 Thread Tim Diggins
I think it helps you to use virtualenv when using django on a machine with multiple pythons (it's a great tool anyway, but this is an extra reason). the trick is to use virtualenv's -p argument when creating the environment, to specify the path to the python executable. so, in summary: 1) install

unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Hi, I have the following model: class Produkte(models.Model): Kategorie = models.ForeignKey(Kategorien) Titel = models.CharField(max_length=100) Auflage = models.IntegerField(max_length=2, blank=True) Bestell_Nr = models.CharField(max_length=30, blank=True) ISBN =

Re: unique_together doesn't work

2011-07-04 Thread Tom Evans
On Mon, Jul 4, 2011 at 10:33 AM, Szabo, Patrick (LNG-VIE) wrote: > Hi, > ... > class Meta: >     unique_together = ("Kategorie", "Titel", "Auflage", "Status") > > but somehow the unique_together doesn’t seem to work. I can store entries > with the same titel without a problem. > > > > Am I

Re: unique_together doesn't work

2011-07-04 Thread Kenneth Gonsalves
On Mon, 2011-07-04 at 11:33 +0200, Szabo, Patrick (LNG-VIE) wrote: > but somehow the unique_together doesn't seem to work. what does 'doesn't seem to work' mean? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you

AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Hi, Sry, i was a little bit unclear. Of course i tried to store identical entries (all fields have the same values) and i had no problem doing so. Since most of the files i want to check for can be null i only inputet a titel. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szab

AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Well like i sad (i guess i did) i can still storey entries that are not unique . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146 -Urspr

Re: AW: unique_together doesn't work

2011-07-04 Thread Kenneth Gonsalves
On Mon, 2011-07-04 at 11:43 +0200, Szabo, Patrick (LNG-VIE) wrote: > Sry, i was a little bit unclear. > Of course i tried to store identical entries (all fields have the same > values) and i had no problem doing so. Since most of the files i want > to check for can be null i only inputet a titel.

AW: AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Yes i am. It seems that in the fieldset there can not be a field that is allowed to be null. If i remove that field it works. Is there a workaround for that ?! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patri

Re: unique_together doesn't work

2011-07-04 Thread Tom Evans
On Mon, Jul 4, 2011 at 10:43 AM, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > Sry, i was a little bit unclear. > Of course i tried to store identical entries (all fields have the same > values) and i had no problem doing so.  Since most of the files i want to > check for can be null i only inputet

AW: unique_together doesn't work

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Thank you all for your help. For now i just removed the "ALLOW NULL" on the fields and placed default values. I have another question but ill post this in a new "thread" because it's not related. . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marx

Re: AW: AW: unique_together doesn't work

2011-07-04 Thread Kenneth Gonsalves
On Mon, 2011-07-04 at 11:51 +0200, Szabo, Patrick (LNG-VIE) wrote: > Yes i am. > It seems that in the fieldset there can not be a field that is allowed > to be null. > If i remove that field it works. > > Is there a workaround for that ?! my observation (subject to correction) is that if there

change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Hi, I have a forum that looks like this: class ReportingForm_Produkt(ModelForm): class Meta: model = Buchung Where Buchung and Produkt looks like this: class Buchung(models.Model): Mitarbeiter = models.IntegerField(max_length=3) Produkt = models.ForeignKey(P

Re: change values in "select list"

2011-07-04 Thread Tom Evans
On Mon, Jul 4, 2011 at 11:12 AM, Szabo, Patrick (LNG-VIE) wrote: > Hi, > > > > I have a forum that looks like this: > > > > class ReportingForm_Produkt(ModelForm): > >     class Meta: > >     model = Buchung > > > > Where Buchung and Produkt looks like this: > > > > class Buchung(models.Model)

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Okay my Model now looks like this: class Produkte(models.Model): Kategorie = models.ForeignKey(Kategorien) Titel = models.CharField(max_length=100) Auflage = models.IntegerField(max_length=2, default=0) Bestell_Nr = models.CharField(max_length=30, blank=True) ISBN = models.Char

Re: change values in "select list"

2011-07-04 Thread Tom Evans
On Mon, Jul 4, 2011 at 11:34 AM, Szabo, Patrick (LNG-VIE) wrote: > Okay my Model now looks like this: > > ... > > but that didn't really change anything :-( > That is because you didn't read the documentation I linked you to, and just tried copy/pasting some code into arbitrary places and then co

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
I was afraid somethig like that would come. I did read the doc but i don't really understand it :-( Could you plz make it a little clearer for me ?! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexi

Re: change values in "select list"

2011-07-04 Thread Tom Evans
On Mon, Jul 4, 2011 at 11:46 AM, Szabo, Patrick (LNG-VIE) wrote: > I was afraid somethig like that would come. > I did read the doc but i don't really understand it :-( > Could you plz make it a little clearer for me  ?! > You are using a model form. The model form has a model selection in it. Yo

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Okay I'll try do tot hat...thank's a lot. I already have this in my model for "Produkte" which holds the FK for that drop down: def __unicode__(self): if self.Auflage: return "%s %s" % (self.Titel, self.Auflage) else: return self.Titel So shouldn't this al

Re: complex query

2011-07-04 Thread Andre Terra
Hello First, I must recommend that you use django-taggit, simpletag or any other tagging app, otherwise you'll just be reinventing the wheel. As for your question, you should read the aggregation docs. I don't have the link handy, but this should be correct: http://django.me/aggregation Sincerel

Re: Django {% regroup %} produces duplicate groups

2011-07-04 Thread bruno desthuilliers
On Jul 4, 12:49 am, Federico Maggi wrote: > {% block content %} >   {% regroup object_list|dictsort:"topic" by topic as topic_list %} > Remove the dictsort, it's for list of dicts, not model querysets https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#dictsort -- You received this m

Re: Sidebars

2011-07-04 Thread Cal Leeming [Simplicity Media Ltd]
Ah okay. On a side note, you could have also used fixed/absolute positioning of the element, then used jQuery show() and hide() to show the menu bar if someone clicks on the pull out tab. Some examples of this on omgpop.com. Cal On Mon, Jul 4, 2011 at 9:40 AM, Venkatraman S wrote: > Hi Cal, >

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Okay i think i'm close but i can't figure it out. I did this: class ReportingForm_ProduktField(ModelChoiceField): def label_from_instance(self, obj): return "My Object #%i" % obj.id class ReportingForm_Produkt(ModelForm): Produkt = ReportingForm_ProduktField(Produkte.o

i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Kase
... example.. y sabe this in django admin in a thextfield bla bla bla bla bla more bla bla bla and in my page... show

bla bla bla bla
more bla bla bla bla

is very annoying... and i dont know who to fix it... -- You received this message because you are subscribed to the Goog

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Kenneth Gonsalves
On Mon, 2011-07-04 at 04:02 -0700, Kase wrote: > and i dont know who to fix it... search in the docs for autoescape. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Kase
no... autoescape on dont work forceescape dont work =/ autoescape off dont work =/ example {% autoescape on %} {{grup.grupo}} {% endautoescape %} On 4 jul, 06:47, Kenneth Gonsalves wrote: > On Mon, 2011-07-04 at 04:02 -0700, Kase wrote: > > and i dont know who to fix

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Kenneth Gonsalves
On Mon, 2011-07-04 at 05:06 -0700, Kase wrote: > example > {% autoescape on %} > {{grup.grupo}} > {% endautoescape %} {% autoescape off %} {{grup.grupo}} {% endautoescape %} -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox htt

Better documentation on "manage.py validate"

2011-07-04 Thread Thomas Larsen Wessel
From: https://docs.djangoproject.com/en/1.3/ref/django-admin/#django-admin-validate it says: django-admin.py validate, Validates all installed models (according to the INSTALLED_APPS setting) and prints validation errors to standard output. Newcomers would expect it to tell of incongruences betwe

Re: Django {% regroup %} produces duplicate groups

2011-07-04 Thread Federico Maggi
On Mon, Jul 4, 2011 at 13:32, bruno desthuilliers wrote: > On Jul 4, 12:49 am, Federico Maggi wrote: >> {% block content %} >>   {% regroup object_list|dictsort:"topic" by topic as topic_list %} >> > > Remove the dictsort, it's for list of dicts, not model querysets > > https://docs.djangoproject

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Kase
Works!! thx but i dont like put ever {% autoescape off %} On 4 jul, 07:08, Kenneth Gonsalves wrote: > On Mon, 2011-07-04 at 05:06 -0700, Kase wrote: > > example > >     {% autoescape on %} > >             {{grup.grupo}} > >             {% endautoescape %} > >     {% autoescape off %} >  

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Andres Pardini
2011/7/4 Kase > Works!! thx > > but i dont like put ever > > i dont think its right save html tag in database unless its a blog like webpage,,, my opinion -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Kase
me too.. but i dont know other options for format text in i need deliver in 30 minuts! an i finish! what do you do for a sistem like a blog? PD: i put tiny_mce (not the app) the js and edit the admin template... but the format of tinymce dont work too =/ On 4 jul, 07:41, Andres P

ANN: django-iadmin

2011-07-04 Thread Stefano Apostolico
Hi all, I would like some feedback on https://github.com/saxix/djangoscreenshots-home-page-iadmin . Documentation in progress, but demo application included. Suggestions and comments are welcome, any help will be appreciated sax -- You received this m

Re: ANN: django-iadmin

2011-07-04 Thread Thomas Weholt
Did you have any screenshots? Didn't see any. Thomas On Mon, Jul 4, 2011 at 2:55 PM, Stefano Apostolico wrote: > Hi all, > > I would like some feedback on > https://github.com/saxix/djangoscreenshots-home-page-iadmin. > > Documentation in progress,  but demo application included. > > Suggestions

Aw: Re: Setting up EC2 for Django

2011-07-04 Thread Juergen Schackmann
maybe http://www.turnkeylinux.org/ and especially http://www.turnkeylinux.org/django will do the heavy lifting for you although I fully agree with the other replies, and I am not sure if you do yourself a favour using turnkeylinux just as a blackbox :-) -- You received this message because you

Re: change values in "select list"

2011-07-04 Thread Andre Terra
Hi, Patrick. Here are a couple of hints that will hopefully guide you in the right direction. It seems you are calling return from your class definition, when it is actually supposed to be used in a function. What happened to the label_from_instance function? Where it is supposed to go? I'll le

Re: ANN: django-iadmin

2011-07-04 Thread Alex Kamedov
I agree with Thomas, It'll be great it you are providing screenshots or demo project. On Mon, Jul 4, 2011 at 7:01 PM, Thomas Weholt wrote: > Did you have any screenshots? Didn't see any. > > Thomas > > On Mon, Jul 4, 2011 at 2:55 PM, Stefano Apostolico wrote: > > Hi all, > > > > I would like som

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Thanks for not giving up on me :-), i'll give it a try ! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexisnexis.at Tel.: 00431 534521573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht

Re: change values in "select list"

2011-07-04 Thread Andre Terra
Don't take it personally, but while we're at it, I should tell you that Classes have CamelCase names and functions are lowercase_with_underscores. Try not to mix both unless you have an incredibly compelling reason (which is not the case here). For what it's worth, it will do you good to name ever

AW: change values in "select list"

2011-07-04 Thread Szabo, Patrick (LNG-VIE)
Yeah, i know i'm a little messys with all that but thanks for the tipp. Could it be that you're Mail reader did something to the indentation because i am calling return inside the function or am i understanding you wrong ?! . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSL

Re: change values in "select list"

2011-07-04 Thread Andre Terra
Oh, yes... Sorry, I was reading from my phone earlier and the app ate part of the line. Nevermind! Cheers, André On Mon, Jul 4, 2011 at 11:11 AM, Szabo, Patrick (LNG-VIE) < patrick.sz...@lexisnexis.at> wrote: > Yeah, i know i'm a little messys with all that but thanks for the tipp. > > Could it

Re: ANN: django-iadmin

2011-07-04 Thread sax
Sorry, wiki still in progress. anyway demo application in included ( testprj directory), some screenshots are available at https://github.com/saxix/django-iadmin/tree/master/docs/source/_static or in the wiki section https://github.com/saxix/django-iadmin/wiki S. 2011/7/4 Alex Kamedov > I

Confusing path example for mod_wsgi?

2011-07-04 Thread candlerb
The example given in `django/docs/howto/deployment/modwsgi.txt` shows: os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' ... path = '/path/to/mysite' if path not in sys.path: sys.path.append(path) However, when deploying a project I found that I had to include

Re: ANN: django-iadmin

2011-07-04 Thread bobhaugen
Awesome feature list. I'll start trying it tomorrow. Just sending this message to be encouraging. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group

Re: Confusing path example for mod_wsgi?

2011-07-04 Thread Tom Evans
On Mon, Jul 4, 2011 at 3:49 PM, candlerb wrote: > The example given in `django/docs/howto/deployment/modwsgi.txt` shows: > > >    os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' > ... >    path = '/path/to/mysite' >    if path not in sys.path: >        sys.path.append(path) > >

Re: JQuery .load() works in production but fails in development

2011-07-04 Thread Joe Linoff
Hi Andre: Thank you for responding and for your insights. > For the record, you can use request.is_ajax to figure out whether a > request is coming from a js file and make the view behave accordingly. > It's mighty useful in some cases. That is very useful. > Also, have you gone trough the offi

Re: ANN: django-iadmin

2011-07-04 Thread Thomas Weholt
Just by looking at the screenshots makes me like it! Alot! :-) Keep up the great work. I'll see if I get the time to test it and provide you with more feedback. Regards, Thomas On Mon, Jul 4, 2011 at 4:42 PM, sax wrote: > Sorry, > wiki still in progress. > anyway demo application in included

Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Thomas Weholt
I've created a templatetag called {% kolibri_imports %} which I use the in the head-section of my templates. It imports related to stylesheets, javascript libraries etc for my kolibri-package. This works fine when I've control over the base-template I'm extending, but when I want to extend a templa

Re: Setting up EC2 for Django

2011-07-04 Thread creecode
Hello all, On Sunday, July 3, 2011 11:15:15 AM UTC-7, Stuart wrote: But here is how I would approach it.. > > 1) Figure out how to get Ubuntu Server running out on EC2 (http:// > alestic.com/ is a good start) > 2) Figure out how to install django on ubuntu (also google for > virtualenv and pi

Re: Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Ian Clelland
On Monday, July 4, 2011, Thomas Weholt wrote: > I've created a templatetag called {% kolibri_imports %} which I use > the in the head-section of my templates. It imports related to > stylesheets, javascript libraries etc for my kolibri-package. This > works fine when I've control over the base-tem

Re: ANN: django-iadmin

2011-07-04 Thread creecode
Hello sax, How about a short description here of what this app does? Toodle-loo.. creecode -- 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-use

Re: Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Ian Clelland
On Monday, July 4, 2011, Thomas Weholt wrote: > I've created a templatetag called {% kolibri_imports %} which I use > the in the head-section of my templates. It imports related to > stylesheets, javascript libraries etc for my kolibri-package. This > works fine when I've control over the base-tem

Re: ANN: django-iadmin

2011-07-04 Thread leo
It looks very good.I will follow this project and apply it soon. thanks for your awesome work. On 2011-7-4 22:42, sax wrote: Sorry, wiki still in progress. anyway demo application in included ( testprj directory), some screenshots are available at https://github.com/saxix/django-iadmin/tre

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Andres Pardini
Hi again, 2011/7/4 Kase > me too.. but i dont know other options for format text > i follow this tutorial for rich text editor http://lazutkin.com/blog/2011/mar/13/using-dojo-rich-editor-djangos-admin/ when you output the text put something like this: {{ notice.title }} {

Questions on markdown

2011-07-04 Thread leo
I using a textfield to store some information and in admin input interface i enter like this Action: check WSMB Reason: customer check this then got error Result: finish, result is good, in spec every single sentence every row, I using markdown to convert this plain text to html but it did not

Re: Questions on markdown

2011-07-04 Thread creecode
Hello Liu, On Monday, July 4, 2011 10:06:29 AM UTC-7, Liu Lin wrote: If I understand your post correctly you are entering in something like... > Action: check WSMB > Reason: customer check this then got error > Result: finish, result is good, in spec > ...in a field of your form. Upon save you

Re: Questions on markdown

2011-07-04 Thread Masklinn
On 2011-07-04, at 19:06 , leo wrote: > I using a textfield to store some information and in admin > input interface i enter like this > > > Action: check WSMB > Reason: customer check this then got error > Result: finish, result is good, in spec > > every single sentence every row, I using markd

Re: Questions on markdown

2011-07-04 Thread leo
Yes, you totally understood me,actually I copied the text from word and paste into textfield, it is very inconvenience manually add a blank line and also as you mentioned,if I put blank line between each line the appearance is not what i like i like this Action: check WSMB Reason: customer chec

Re: ANN: django-iadmin

2011-07-04 Thread sax
Django iAdmin iAdmin is a replacement of standard django admin application. Features - multiple columns portlets-like home page - tabbed view of inlines - mass updates functionality - export to csv with options and formatting - advanced import from csv with foreign key handling

Re: Questions on markdown

2011-07-04 Thread leo
The original text is Action: check WSMB Reason: customer check this then got error Result: finish, result is good, in spec what i want is html format Action: check WSMB Reason: customer check this then got error Result: finish, result is good, in spec On 2011-7-5 1:59, Masklinn wrote: On

Re: i save text with html in djanfo admin and when out its ilegible

2011-07-04 Thread Venkatraman S
On Mon, Jul 4, 2011 at 10:12 PM, Andres Pardini wrote: > i follow this tutorial for rich text editor > > http://lazutkin.com/blog/2011/mar/13/using-dojo-rich-editor-djangos-admin/ > How is this when compared with tinymce? -V http://blizzardzblogs.blogspot.com/ -- You received this message bec

Re: Sidebars

2011-07-04 Thread Venkatraman S
On Mon, Jul 4, 2011 at 5:10 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > On a side note, you could have also used fixed/absolute positioning of > the element, then used jQuery show() and hide() to show the menu bar > if someone clicks on the pull out tab.

Re: Questions on markdown

2011-07-04 Thread Petite Abeille
On Jul 4, 2011, at 8:08 PM, leo wrote: > what i want is To quote the friendly manual: "When you do want to insert a break tag using Markdown, you end a line with two or more spaces, then type return." http://daringfireball.net/projects/markdown/syntax#p -- You received this message because

Re: ANN: django-iadmin

2011-07-04 Thread creecode
Sounds interesting! Thanks! On Monday, July 4, 2011 11:06:44 AM UTC-7, sax wrote: > > Django iAdmin > > iAdmin is a replacement of standard django admin application. > Features > >- multiple columns portlets-like home page >- tabbed view of inlines >- mass updates functionality

Re: ANN: django-iadmin

2011-07-04 Thread Fred Chevitarese
Hmmm I like it ! All those features are already working? ^^ " *O relógio da vida recebe corda apenas uma vez.* *Ninguém tem o poder de decidir quando os ponteiros pararão, se mais cedo ou se mais tarde.* *O presente é o único tempo que você possui.* *Viva, ame e trabalhe com vontade.* *Não pon

Re: ANN: django-iadmin

2011-07-04 Thread sax
yep, but more test needed sax 2011/7/4 Fred Chevitarese > Hmmm I like it ! > > All those features are already working? > > > ^^ > > > " > *O relógio da vida recebe corda apenas uma vez.* > *Ninguém tem o poder de decidir quando os ponteiros pararão, se mais cedo > ou se mais tarde.* > *O

Re: ANN: django-iadmin

2011-07-04 Thread Fred Chevitarese
Thanks! I will try to test :P " *O relógio da vida recebe corda apenas uma vez.* *Ninguém tem o poder de decidir quando os ponteiros pararão, se mais cedo ou se mais tarde.* *O presente é o único tempo que você possui.* *Viva, ame e trabalhe com vontade.* *Não ponha nenhuma esperança no tempo, p

Re: Confusing path example for mod_wsgi?

2011-07-04 Thread candlerb
On Jul 4, 4:29 pm, Tom Evans wrote: > If you have setup your folder layout like this: > /path/to > foo/ > settings.py > bar/ > Where 'foo' is your project and 'foo.bar' is your app, then you will > need to add /path/to to sys.path. > If on the other hand 'bar' is how you refer to your ap

Django admin - how to hide some fields in User edit?

2011-07-04 Thread galgal
How can I hide fields in admin User edit? Mainly I want to hide permissions and groups selecting in some exceptions, but exclude variable doesn't work :/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Django admin - hide remove link

2011-07-04 Thread galgal
How can I hide remove link in Django admin? I need to hide it in my code, not in permissions (only user with id=1 can see it no matter if any users are superusers) -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the

forcing authentication without a password

2011-07-04 Thread Josh Stratton
I've setup my authentication system to use the standard name/password with good results, but some of the users are coming directly from Google Apps with an OpenID I've authenticated by hand. What I'd like is if they are authenticated from Google Apps, I can just call auth_login, but they haven't a

Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread leo
try to modify this file "Python26\Lib\site-packages\django\contrib\auth\admin.py" find this line (_('Groups'), {'fields': ('groups',)}), comment this line you will remove groups On 2011-7-5 4:59, galgal wrote: How can I hide fields in admin User edit? Mainly I want to hide permissions

Odp: Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread galgal
I'm rather searchung the way to do that in my admin.py file not in core files. -- 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/-/sZ83LDHBIC8J. To post to thi

url problems

2011-07-04 Thread charles
I am trying to work through the 3rd part of the tutorial and I have a problem. When I copy and past urlpatterns = patterns('', (r'^polls/$', 'polls.views.index'), (r'^polls/(?P\d+)/$', 'polls.views.detail'), (r'^polls/(?P\d+)/results/$', 'polls.views.results'), (r'^polls/(?P

Re: Odp: Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread Michał Sawicz
Dnia 2011-07-04, pon o godzinie 14:19 -0700, galgal pisze: > I'm rather searchung the way to do that in my admin.py file not in > core files. Obviously the proposal was... fundamentally wrong. Create your own UserAdmin, unregister the one registered by django.contrib.admin and register your own.

Re: Calling a custom templatetag inside a block/extrahead-block?

2011-07-04 Thread Thomas Weholt
On Mon, Jul 4, 2011 at 6:09 PM, Ian Clelland wrote: > On Monday, July 4, 2011, Thomas Weholt wrote: >> I've created a templatetag called {% kolibri_imports %} which I use >> the in the head-section of my templates. It imports related to >> stylesheets, javascript libraries etc for my kolibri-pack

Re: Django admin - hide remove link

2011-07-04 Thread Michał Sawicz
Dnia 2011-07-04, pon o godzinie 14:15 -0700, galgal pisze: > How can I hide remove link in Django admin? I need to hide it in my > code, not in permissions (only user with id=1 can see it no matter if > any users are superusers) Override has_delete_permission [1] on your ModelAdmin. https://docs.

Odp: Re: Odp: Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread galgal
That's my code now - how to hide groups for example? admin.site.unregister(User) class UserProfileInline(admin.StackedInline): model = UserProfile filter_horizontal = ('cities',) extra = 1 max_num = 1 filter_horizontal = ('cities',) class UserProfileAdmin(UserAdmin): inlin

Re: url problems

2011-07-04 Thread Michał Sawicz
Dnia 2011-07-04, pon o godzinie 16:50 -0500, charles pisze: > The current URL, , didn't match any of these. And the current URL was? -- Michał (Saviq) Sawicz signature.asc Description: This is a digitally signed message part

Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread Michał Sawicz
Dnia 2011-07-04, pon o godzinie 15:13 -0700, galgal pisze: > That's my code now - how to hide groups for example? Have you tried reading the Django Admin docs? [1] [2] [1] https://docs.djangoproject.com/en/1.3/ref/contrib/admin/ [2] https://docs.djangoproject.com/en/1.3/ref/contrib/admin/#django.

Odp: Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread galgal
Yes I read it. exclude = ('groups',) throws: Caught KeyError while rendering: "Key 'groups' not found in Form" -- 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-use

Re: url problems

2011-07-04 Thread charles
On 11/07/04 17:14, Michał Sawicz wrote: Dnia 2011-07-04, pon o godzinie 16:50 -0500, charles pisze: The current URL, , didn't match any of these. And the current URL was? the current url (path) is C:\Users\Dagon\mysite. Everything is relative to mysite. -- You received this message because y

Re: url problems

2011-07-04 Thread Daniel Roseman
What? URLs have nothing to do with file paths. There is nothing wrong here at all. The tutorial got you to define some URLs beginning with 'polls'. You have to go to one of those URLs. Going to the root of the site won't work, because you haven't set up a URL for it. -- DR. -- You received th

Re: getting objects unique in several ways (annotate?)

2011-07-04 Thread elliot
incase anyone cares, this is the solution I came up with. an initial query to filter for one condition, and then a for loop that checks that each member satisfies the second condition. hopefully, selected_related makes sure only one db call is made: (in a function) books = Book.objects.filter(wh

Re: Odp: Re: Django admin - how to hide some fields in User edit?

2011-07-04 Thread Michał Sawicz
Dnia 2011-07-04, pon o godzinie 15:20 -0700, galgal pisze: > Yes I read it. exclude = ('groups',) throws: > Caught KeyError while rendering: "Key 'groups' not found in Form" That's because the stock UserAdmin defines fieldsets in which 'groups' is a field, you need to modify the fieldsets, too.

Re: url problems

2011-07-04 Thread Herman Schistad
> the current url (path) is C:\Users\Dagon\mysite. Everything is relative to > mysite. Make sure you read the guide once more, and that you have "runserver" up and running (issue the command: python manage.py runserver" Then you go to the following URL: localhost:8000/polls and you will hopefully

Auth Login well documented but elusive

2011-07-04 Thread TuckFrance
Having problems with getting login to work even though it's well documented. The pages for success, invalid, and no info provided aren't getting used at all. Instead, clicking login always redirects to /login which is not what I want. Any ideas? URLconf: ... (r'^accounts/login/$', 'django.contrib.

Re: ANN: django-iadmin

2011-07-04 Thread Venkatraman S
On Mon, Jul 4, 2011 at 6:25 PM, Stefano Apostolico wrote: > > I would like some feedback on > https://github.com/saxix/djangoscreenshots-home-page-iadmin > . > > Documentation in progress, but demo application included. > > Suggestions and comments are wel

ModelForm save call with data and instance

2011-07-04 Thread Constantine
def view(request) form = MyForm(request.POST, instance = MyModel(myfiled = 1)) if form.is_valid(): obj = form.save() but POST will NEVER merged with instance i've looked through stack: ModelForm's save() https://code.djangoproject.com/browser/django/trunk/django/forms/models.py#L