Re: Hidden rows elements also visible on list filters

2011-05-25 Thread rahul jain
Yes I am referring to django admin list filter, one on the side. class Admin(model.Admin): list_filter = (column1, column2) so for instance column1 has 6 values (a, b,b,b,c,e). Then list filter shows a,b, c,e. like this By column1 show all a b c e Now if i hide some rows based on the logge

Re: running a django app, help please?

2011-05-25 Thread Amanjeev Sethi
I think the basic tutorial ( https://docs.djangoproject.com/en/dev/intro/tutorial01/) talks about apps: Projects vs. apps What's the difference between a project and an app? An app is a Web application that does something -- e.g., a Weblog system, a database of public records or a simple poll app

Re: django database

2011-05-25 Thread Kenneth Gonsalves
On Thu, 2011-05-26 at 09:44 +0430, bahare hoseini wrote: > do i have to install mysql to create a database in my website? yes (or postgresql or sqlite) -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscr

django database

2011-05-25 Thread bahare hoseini
hi, do i have to install mysql to create a database in my website? tnx -- 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, send email to django-user

How do I override default behaviour for foreign keys in an inline formset?

2011-05-25 Thread King
I want to do something like this... http://groups.google.com/group/django-users/browse_thread/thread/db03fa90a14ecc6a ...but unfortunately there was no reply to this particular posting. I've found other posts on the web of people looking for the same sort of solution, and have not been able to find

running a django app, help please?

2011-05-25 Thread raj
I'm sort of confused with the django app system. I own a free hosting, by alwaysdata.net (just to learn the django stuff), and it says that I can make an app using the following line: python mysite/manage.py startapp [appname] When reading the django book (at the djangobook.com), it never talks ab

Re: Is there an HTML editor that's Django-aware

2011-05-25 Thread AJ
Thanks a lot Simon. This is probably OT: That was helpful but I thought I could dive in again with Vim and failed (at least for now). You see, I am now used to some of the things in textmate: * quick file switching. Textmate has Cmd+T and type the file name for quick switching * a project. I fou

Re: Weird Error when following django book?

2011-05-25 Thread raj
Thank you, so I guess everything is working okay. :) On May 25, 2:30 pm, Jacob Kaplan-Moss wrote: > On Wed, May 25, 2011 at 1:04 PM, Boštjan Mejak > wrote: > > HTML source code can't be passed as a string. You morons. > > This isn't OK. Stop it at once. > > You've been warned about your tone on

Re: NoReverseMatch while rendering

2011-05-25 Thread Alexandra
Thanks Andy. found my error- which was a syntax problem in my render_to_response function in the views.py. On May 25, 11:01 pm, Andy McKay wrote: > On 2011-05-25, at 7:58 PM, Alexandra wrote: > > > Has anyone seen this before? My urls.py seem to be configured properly > > Without knowing the rel

Re: Synchronize method or model field access

2011-05-25 Thread Andy McKay
On 2011-05-25, at 3:22 PM, Pawel R wrote: >> I would push the atomic updates to the database or use a queue with a single >> worker. Thread level locking doesn't scale across processes or servers. > > Could you tell me please how? Celery provides a queue you could use: http://ask.github.com/

Re: NoReverseMatch while rendering

2011-05-25 Thread Andy McKay
On 2011-05-25, at 7:58 PM, Alexandra wrote: > Has anyone seen this before? My urls.py seem to be configured properly Without knowing the relevant line in urls.py, its hard to guess, but one would be that phone.adder.username is an empty string, as noted here: > Caught NoReverseMatch while rende

NoReverseMatch while rendering

2011-05-25 Thread Alexandra
I got the following TemplateSyntaxError: Caught NoReverseMatch while rendering: Reverse for 'profile_detail' with arguments '('',)' and keyword arguments '{}' not found. The exact line causing the issue is the following in my view_phone.html template file: {% blocktrans %}added by{% endblocktran

Re: Annotate with a filtered Count

2011-05-25 Thread Sean McArthur
I would be very interested to know if there is a way to do this using Django's Aggregation API. For now, the only solution I can come up with is having to use a fat .extra() call. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Anyone got experience of using django-fiber cms?

2011-05-25 Thread Dave Sayer
On 18 May 2011 19:45, growlf wrote: > Actually, Django-CMS does have front-end editing, but it seems that > the latest edition is a bit wonky atm with regards to the interface > and the documentation on actually using it.  I think the developers > are moving towards a more stable MPTT solution, an

Re: Form Validation - Redisplay With Error

2011-05-25 Thread Robin
I'm very comfortable with SQL and more traditional programming. Would you recommend some specific HTTP primer, or anything else for those making the transition to web dev? On May 25, 8:24 am, bruno desthuilliers wrote: > On May 25, 3:54 pm, Robin wrote: > > > Because that would be too easy? ;)

Re: Synchronize method or model field access

2011-05-25 Thread Pawel R
> I would push the atomic updates to the database or use a queue with a single > worker. Thread level locking doesn't scale across processes or servers. Could you tell me please how? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Section 508 compliance for Django for grant application

2011-05-25 Thread Lisabeth
Thank you. That was a very satisfying link to forward internally as I have been arguing exactly the same thing: that Django is transparent to the end user and the burden of 508 compliance applies to the web pages that are served. So far, no one has been swayed by that argument. I am still hoping

Re: Synchronize method or model field access

2011-05-25 Thread Eric Chamberlain
On May 25, 2011, at 11:19 AM, Pawel R wrote: >> Synchronise what with what? > > Synchronize with other threads. I need this method to be invoked by only one > thread at a time. > >> "It doesn't work" is utterly useless. What does it do? > > It lets more than 1 thread to invoke this method at

Re: Section 508 compliance for Django for grant application

2011-05-25 Thread Benjamin Welton
https://code.djangoproject.com/ticket/5635#comment:1 Unless there has been a recent change to this policy, your going to have to fill out the section 508 yourself. Ben On 05/25/2011 04:00 PM, Lisabeth wrote: Hello, I'm part of a bioinformatics team at a small, non-profit biomedical research

Section 508 compliance for Django for grant application

2011-05-25 Thread Lisabeth
Hello, I'm part of a bioinformatics team at a small, non-profit biomedical research institute (Seattle BioMed). We are working on a grant application that includes Django as we are excited about getting into python and the BioPython module. However, to include this technology in the grant, we mus

Looking for Class Base Views intro (not Generic Class Base Views!)

2011-05-25 Thread Mateusz Harasymczuk
I am looking for a Class Base Views introduction or tutorial. I have googled the web, and all I was able to find was the Generic Class Base Views. There were only a few examples of non generic views, however the code was to fuzzy. Django generally has a superb documentation, but this part is no

Re: xsendfile + django problem

2011-05-25 Thread Renato Beserra
Never mind, I moved the XSendFile on up and the solution is working fine. Thanks. 2011/5/25 Renato Beserra > Hey guys, > > I am really lost here, i followed this link > http://groups.google.com/group/django-users/browse_thread/thread/b4ceae1956e003e5/2ed48bf40e0226e9?lnk=gst&q=mod_xsendfile#2ed4

xsendfile + django problem

2011-05-25 Thread Renato Beserra
Hey guys, I am really lost here, i followed this link http://groups.google.com/group/django-users/browse_thread/thread/b4ceae1956e003e5/2ed48bf40e0226e9?lnk=gst&q=mod_xsendfile#2ed48bf40e0226e9 but i can't get this to work. I set up apache and xsendfile properly i guess, but i always got a empty f

Re: Weird Error when following django book?

2011-05-25 Thread Jacob Kaplan-Moss
On Wed, May 25, 2011 at 1:04 PM, Boštjan Mejak wrote: > HTML source code can't be passed as a string. You morons. This isn't OK. Stop it at once. You've been warned about your tone once before. Please aim for a professional, polite tone here or find another group to hang out in. If you can't act

Re: How do you organize your deployment enviroment

2011-05-25 Thread DrBloodmoney
Yeah. That was the post I was thinking about. For some reason I thought that it came from the core dev team. I still think that migrations should be a part of a full-stack framework like django (south is the first app I install in a new project). They might as well pick the best-in-breed and throw

Re: Synchronize method or model field access

2011-05-25 Thread Pawel R
> Synchronise what with what? Synchronize with other threads. I need this method to be invoked by only one thread at a time. > "It doesn't work" is utterly useless. What does it do? It lets more than 1 thread to invoke this method at a time. > How does that differ from what you were expecting?

Re: Weird Error when following django book?

2011-05-25 Thread Boštjan Mejak
HTML source code can't be passed as a string. You morons. -- 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, send email to django-users+unsubscr...

Django DATETIME_FORMAT Localization

2011-05-25 Thread jrs_66
Hi, Despite the high likelihood that I'll be chewed out as an ignoramus who can't seem to read docs (I have... for about a day), I'm going to try to ask a seemingly basic question (without even posting my model;) I'm using the Django 1.2 enhanced localization feature to setup formatting constants

Re: How do you organize your deployment enviroment

2011-05-25 Thread Shawn Milochik
On 05/25/2011 01:22 PM, DrBloodmoney wrote: On Wed, May 25, 2011 at 9:31 AM, DK wrote: 100% south migration :) This. I know that they have said that they weren't going to be putting South into django (contrib?), but I wish they would. Most django devs should be using it. This isn't entirely

One dedicated db connection per user?

2011-05-25 Thread Gerv Markham
Hi everyone, Top-level question: I want to have a database connection per authenticated user, because each has their own username and password at the database level. Django by default seems geared up either for 1 or a small, set number of databases (and therefore connections). What is the best way

Re: How do you organize your deployment enviroment

2011-05-25 Thread DrBloodmoney
On Wed, May 25, 2011 at 9:31 AM, DK wrote: > 100% south migration :) This. I know that they have said that they weren't going to be putting South into django (contrib?), but I wish they would. Most django devs should be using it. -- You received this message because you are subscribed to the Go

Re: South migration for fixtures

2011-05-25 Thread DrBloodmoney
On Wed, May 25, 2011 at 12:54 PM, Amit Sethi wrote: > Hi all , I might be wrong with some of the concepts as I am new to > south. I am using south to migrate some fixture data for a django app. > Also something worth noting is I am bringing south new into the django > app it was not part of instal

South migration for fixtures

2011-05-25 Thread Amit Sethi
Hi all , I might be wrong with some of the concepts as I am new to south. I am using south to migrate some fixture data for a django app. Also something worth noting is I am bringing south new into the django app it was not part of installed apps till now . So the workflow I have followed till now

Re: Weird Error when following django book?

2011-05-25 Thread Nan
The "u" before the opening quote is Python's way of telling you that it's a Unicode string instead of an ASCII string. On May 25, 11:54 am, raj wrote: > I'm up to the html template part of the djangobook, and I keep getting > a weird output error whenever I do a t.render() call. It's a really >

Weird Error when following django book?

2011-05-25 Thread raj
I'm up to the html template part of the djangobook, and I keep getting a weird output error whenever I do a t.render() call. It's a really small error but I want to make sure that my django module is correctly working. This is the output I got from the example in the django book: u"Dead John Smith

Re: 500.html and STATIC_URL

2011-05-25 Thread Addy Yeow
http://docs.djangoproject.com/en/dev/topics/http/views/#the-500-server-error-view On Wed, May 25, 2011 at 11:22 PM, bax...@gretschpages.com < mail.bax...@gmail.com> wrote: > Am I correct in understanding that when there is a 500 error and the > user is routed to 500.html, it does not know setting

Re: Is there an HTML editor that's Django-aware

2011-05-25 Thread Matteius
I am pycharmed by pycharm. It is a very good way to edit Django models, views and templates. On May 24, 1:47 pm, shofty wrote: > why not use a python ide that is html aware? > pycharm by jetbrains is good. > > On May 24, 6:49 pm, AJ wrote: > > > > > Simon, > > > Can you please give details of p

500.html and STATIC_URL

2011-05-25 Thread bax...@gretschpages.com
Am I correct in understanding that when there is a 500 error and the user is routed to 500.html, it does not know settings.STATIC_URL or settings.MEDIA_URL, but 404.html does? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Preselected Radio button

2011-05-25 Thread bruno desthuilliers
On May 25, 4:12 pm, Ndungi Kyalo wrote: > Am trying to pre-select a radio button created with the django.forms library : > >     choices = forms.ChoiceField( >         widget = forms.RadioSelect(), >         choices = [ >             ['a', 'i liked it'], >             ['b', 'i did not like it'] >

Re: Form Validation - Redisplay With Error

2011-05-25 Thread bruno desthuilliers
On May 25, 3:54 pm, Robin wrote: > Because that would be too easy? ;) Well... >  Sincere thanks, Bruno.  A lot of > this is new to me...python, Django, web dev, and even open source. > Didn't even think of that! Surprisingly enough, it took me a couple weeks realizing I could as well just read

Re: Form Validation - Redisplay With Error

2011-05-25 Thread Ndungi Kyalo
sorry, i'll repost under the appropriate subject. On 25 May 2011 17:11, Ndungi Kyalo wrote: > Am trying to pre-select a radio button created with the django.forms library > : >     vote = forms.ChoiceField( >         widget = forms.RadioSelect(), >         choices = [ >             ['a', 'i liked

Preselected Radio button

2011-05-25 Thread Ndungi Kyalo
Am trying to pre-select a radio button created with the django.forms library : choices = forms.ChoiceField( widget = forms.RadioSelect(), choices = [ ['a', 'i liked it'], ['b', 'i did not like it'] ], required=True ) How would I go a

Re: Form Validation - Redisplay With Error

2011-05-25 Thread Ndungi Kyalo
Am trying to pre-select a radio button created with the django.forms library : vote = forms.ChoiceField( widget = forms.RadioSelect(), choices = [ ['a', 'i liked it'], ['b', 'i did not like it'] ], required=True ) How would I go abou

Re: Form Validation - Redisplay With Error

2011-05-25 Thread Robin
Because that would be too easy? ;) Sincere thanks, Bruno. A lot of this is new to me...python, Django, web dev, and even open source. Didn't even think of that! There's so much to learn, it can be overwhelming. Thank you again, I'll have a look through the code today. On May 25, 1:02 am, bruno

Master/detail in the admin

2011-05-25 Thread Thomas Weholt
I've googled and looked at the docs, but haven't found anything related to this scenario: I got a master/detail model, defined like so: class Master(models.Model): title = models.CharField(max_length=100) def details_url(self): return 'Details' self.content_object)

Re: UK-based Django Host?

2011-05-25 Thread Nan
Well, I was sort of hoping someone had found a Webfaction equivalent somewhere on the other side of the pond. ;-) Rackspace managed cloud is way out of our price range, and we really only need resources on the level of a large shared or smallish VPS plan. On May 25, 9:48 am, Daniel Hilton

Re: django raw_id_fields patch

2011-05-25 Thread Ernesto Guevara
I need change the FK id value in raw_id to Thanks! 2011/5/25 epic2005 > who have the raw_id_fields patch url.. or some sugguest for modify > raw_id_fields pop id back in the textbox , please give me , thanks a > lot. > > -- > You received this message because you are subscribed to the Goog

Re: UK-based Django Host?

2011-05-25 Thread Daniel Hilton
On 25 May 2011 14:43, Nan wrote: > > Thanks for the suggestions, guys.  I've heard great things about > Linode, but we really need managed hosting. Then have a look at Rackspace cloud managed options - I think that's the closest you're going to get without finding an individual / technical organi

Re: UK-based Django Host?

2011-05-25 Thread Nan
Thanks for the suggestions, guys. I've heard great things about Linode, but we really need managed hosting. On May 25, 7:24 am, Simon Connah wrote: > On 24 May 2011, at 18:03, Nan wrote: > > > I know this question has been asked before, but the most recent thread > > I can find in the archives

Re: How do you organize your deployment enviroment

2011-05-25 Thread DK
100% south migration :) -- 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, send email to django-users+unsubscr...@googlegroups.com. For more option

Re: How do you organize your deployment enviroment

2011-05-25 Thread Daniel Roseman
On Wednesday, May 25, 2011 1:22:40 PM UTC+1, jonas wrote: > > I'm just wondering how you could handle database changes. > > Let's say you have a existing working project and the client asks for some > changes. > > These changes force you to create an extra table and modify some tables > (models).

Re: Stuck at filtering/slicing

2011-05-25 Thread Michel30
hmm had a send accident.. I tried Documentrevision.objects.values('documentid').annotate(Max('versionnumber')).filter and it retrieves a list of values, but I need the objects to use later on On May 25, 2:40 pm, Michel30 wrote: > I've tried annotate before but I ran into the issue that it retu

Re: Stuck at filtering/slicing

2011-05-25 Thread Michel30
I've tried annotate before but I ran into the issue that it returns a list of values I believe? I tried: On May 25, 1:40 pm, Jani Tiainen wrote: > On Wed, 2011-05-25 at 02:59 -0700, Michel30 wrote: > > Hello all, > > > I have the following model: > > > class Documentrevision(models.Model): > >  

Re: Parsing an XML feed using ElementTree

2011-05-25 Thread Sithembewena Lloyd Dube
P.S: I was aware that I posted a non-django question: I just took the chance that someone here may have needed to do the same. Thanks! On Wed, May 25, 2011 at 2:35 PM, Sithembewena Lloyd Dube wrote: > Hi Everyone, > > Thanks for all your suggestions. I read up on gzip and urllib and also > learn

Re: Parsing an XML feed using ElementTree

2011-05-25 Thread Sithembewena Lloyd Dube
Hi Everyone, Thanks for all your suggestions. I read up on gzip and urllib and also learned in the process that I could use urllib2 as its the latest form of that library. Herewith my solution: I don't know how elegant it is, but it works just fine. def get_contests(): url = ' http://xml.ma

Re: How do you organize your deployment enviroment

2011-05-25 Thread Jonas Geiregat
I'm just wondering how you could handle database changes. Let's say you have a existing working project and the client asks for some changes. These changes force you to create an extra table and modify some tables (models). On the development server I could modify the changes to the database a

Re: login with subdomains

2011-05-25 Thread tom
Hey Lucian, that sounds solid. I will implement that together with an additional auth backend. Looking into the option of subclassing remoteuserbackend and adding the functionality there but also leverage the remote_user META variable. That sounds to me like a very robust solution. Thanks for desc

Re: (extendable) social network plugin

2011-05-25 Thread Leon van der Ree
Thanks Matias, I had the time to take a good look at django-social-auth and this was the thing I was looking for. This looks great! I will come back about the social-communication plugin, which is capable of performing all kind of postings on social networks in a unified way, in another post once

Re: Stuck at filtering/slicing

2011-05-25 Thread Jani Tiainen
On Wed, 2011-05-25 at 02:59 -0700, Michel30 wrote: > Hello all, > > I have the following model: > > class Documentrevision(models.Model): > docrevid = models.AutoField(primary_key=True, > db_column='DocRevID') > documentid = models.ForeignKey(Document, db_column='DocumentID') > submit

Re: Limit admin login domain?

2011-05-25 Thread Cal Leeming [Simplicity Media Ltd]
Yup, you can. But, you have to use multihost.py middleware. Google for django multihost :) (we had the exact same requirement, and this is how we resolved it. Also, multihost is a billion times nicer than the sites framework that comes with Django, imho). Cal 2011/5/25 λq > Hi guys, > > Can I

Re: login with subdomains

2011-05-25 Thread Cal Leeming [Simplicity Media Ltd]
Hi OP, To do this, you need to use what's known as a 'handoff'. This basically means handing off an authenticated session to a different FQDN. There are several ways you can do this, but I would recommend using the following: - Create a receiver URL on each FQDN which can be handed off to (in

Re: UK-based Django Host?

2011-05-25 Thread Simon Connah
On 24 May 2011, at 18:03, Nan wrote: > I know this question has been asked before, but the most recent thread > I can find in the archives is from 2007, and presumably the landscape > has changed since then. > > I'm looking for a Webfaction-like host with servers in the UK. It > needs to allow l

django raw_id_fields patch

2011-05-25 Thread epic2005
who have the raw_id_fields patch url.. or some sugguest for modify raw_id_fields pop id back in the textbox , please give me , thanks a lot. -- 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@googl

Re: login with subdomains

2011-05-25 Thread Lucian Nicolescu
You're right, it would be valid for all subdomains. Hmm ... I can't see a solution without a hack. Eg: authenticate the user on agileamp.com and at the same time do a AJAX request to the subdomain's authentication clone. This way the a cookie would be set only for the TLD (agileamp.com) and for th

Stuck at filtering/slicing

2011-05-25 Thread Michel30
Hello all, I have the following model: class Documentrevision(models.Model): docrevid = models.AutoField(primary_key=True, db_column='DocRevID') documentid = models.ForeignKey(Document, db_column='DocumentID') submitterid = models.ForeignKey('Author', db_column='SubmitterID') docu

Re: login with subdomains

2011-05-25 Thread tom
well, I thought about this, but wouldn't then the session be valid for test.agileamp.com as well as for test2.agileamp.com? I want to set the session only for test.agileamp.com (the subdomain where the account belongs to). On 25 Mai, 10:30, Lucian Nicolescu wrote: > I think you can use the SESSIO

Re: Synchronize method or model field access

2011-05-25 Thread Daniel Roseman
On Tuesday, May 24, 2011 9:52:58 PM UTC+1, Etam wrote: > > Hi, > > how do you synchronize a method (or model field access) in Django? > > It doesn't work: > > from multiprocessing import Lock > change_status_lock = Lock() > def change_status(self, status): > self.change_status_lock.acquire() >

Re: UK-based Django Host?

2011-05-25 Thread Jorge Bastida
Linode 512 here, excellent service. 2011/5/25 Stuart MacKay > I use a Linode 512 VPS hosted in London. So far it has been awesome. > > Stuart MacKay > Lisbon, Portugal > > > I know this question has been asked before, but the most recent thread >> I can find in the archives is from 2007, and pr

Re: UK-based Django Host?

2011-05-25 Thread Stuart MacKay
I use a Linode 512 VPS hosted in London. So far it has been awesome. Stuart MacKay Lisbon, Portugal I know this question has been asked before, but the most recent thread I can find in the archives is from 2007, and presumably the landscape has changed since then. I'm looking for a Webfaction-

Re: login with subdomains

2011-05-25 Thread Lucian Nicolescu
I think you can use the SESSION_COOKIE_DOMAIN and set it up to ".agileamp.com" (docs: http://docs.djangoproject.com/en/dev/topics/http/sessions/#session-cookie-domain). Lucian On Tue, May 24, 2011 at 11:46 PM, tom wrote: > Hello, > > I have a application, where I want that users log in to a spec

Re: UK-based Django Host?

2011-05-25 Thread Daniel Hilton
On 24 May 2011 20:01, Nan wrote: > Thanks, Matt.  Normally I'd agree with you, but this application isn't > just a website -- it's sensitive to latency issues and will be > integrating with a third-party service that's also UK-based, so we're > looking at minimizing cross-Atlantic round-trips. If

Re: Weird problem with rendering a Variable in a custom tag

2011-05-25 Thread bruno desthuilliers
On May 25, 4:43 am, stevedegrace wrote: > And you are absolutely correct, using a local variable in the render > method and not rebinding self,ip resolves the problem. Thank you very > much. Can you explain why this is? "Once a node is parsed, its render method may be called any number of times"

Re: Form Validation - Redisplay With Error

2011-05-25 Thread bruno desthuilliers
On May 25, 4:48 am, Robin wrote: > I've tried to track down this information (new to Django and web dev) > and I'm certainly not expecting a spoon-fed answer.  A nudge in the > right direction would be most appreciated. :) Why don't you just have a look at the code of the builtin auth form ?-) h