Customizing the Sites framework

2010-03-20 Thread ejm
Hi, My app uses a model called Site which is essentially the same as in the django.contrib.sites framework (domain and name), except that my model needs an extra field and is related through a foreign key to another model. (It is related to a model called Client, which stores all my Clients, and

Re: TemplateDoesNotExist at /admin/

2010-03-20 Thread ragingmon
Solved this problem already. The problem lies inside of /usr/lib/python2.5/site-packages/django/ contrib/admin/. Some files were not installed properly. The login.html exist but it has no contents inside. I opened up the Django-1.1.1.tar.gz and grabbed /django/contrib/admin/ and extracted it in

Re: Forms with read only fields

2010-03-20 Thread Paulo Almeida
You can also do that by overriding the form's __init__ : http://stackoverflow.com/questions/324477/in-a-django-form-how-to-make-a-field-readonly-or-disabled-so-that-it-cannot-be You can pass the user to init and disable fields depending on that parameter. - Paulo On Sat, Mar 20, 2010 at 4:02

Savinf m2m fields form formset?

2010-03-20 Thread bastir
Hey, I have a modelfrom generated from a db model A that has a m2m filed to model B. On the same page i show a modelformset with 3 instances of model B. What is the best way to save the m2m field? I tried this code but it looks a bit hacky to overwrite the m2m(texte) filed by myself. Is there a

RE: possible bug or feature request with extra and where

2010-03-20 Thread Henrik Genssen
No one any comment on this? is this the expected behavior? Hinnack >reply to message: >date: 12.03.2010 10:56:08 >from: "Henrik Genssen" >to: "Django users" >subject: possible bug or feature request with extra and where > >HI all, > >I

Re: content template loads at bottom of base template instead of top

2010-03-20 Thread timdude
Thanks Bruno, > > First question : does it always happen on the sames pages, or do you > have a same page sometimes OK and sometimes not ? > Second question : does it happen with all browsers or only with a > specific one ? When it happens, it can be on any browser, I've seen it on 6 different

Re: Using markdown to clean html

2010-03-20 Thread Brian Neal
On Mar 19, 8:35 am, Tor Nordam wrote: > I'm currently writing a blog application in django, and a part of what > I want to do is allow some HTML in posts and comments. I discovered > yesterday, more or less by accident, that the markdown filter actually > allows some HTML.

Re: Using markdown to clean html

2010-03-20 Thread Tor Nordam
Thank you, that looks good. But just out of curiosity: Does anyone know exactly what, if anything, the markdown template filter does to text with html? Does it allow everything? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: stuck in Tutorial on StackedInLine, part 2 of tutorial

2010-03-20 Thread Mike R
OK, I carefully constructed a reply with all the traceback, etc. then noticed that StackedInLine is not right, it is StackedInline (no capital L) -- thanks for your help! Discarded all that and now replying with this. Maybe I had some kind of idiotic java reflex that made me capitalize Line in

TemplateDoesNotExist at /admin/

2010-03-20 Thread ragingmon
Hello all I'm using cygwin 1.7 in windows7 with django 1.1.1 and python 2.5.2. I followed this tut http://docs.djangoproject.com/en/1.1/intro/tutorial02/#intro-tutorial02 I got stuck looking for solution to this problem. I always get a TemplateDoesNotExist at /admin/ when going to

Re: override change_form.html & submit_line.html

2010-03-20 Thread Ogi Vranesic
>> Hi >> > >In order to adapt them I would like to override following templates: >> >> contrib/admin/templates/admin/change_form.html >> contrib/admin/templates/admin/submit_line.html >> and probably also >> contrib/admin/templates/admin/edit_inline/tabular.html >> > >In my project I have already

Re: stuck in Tutorial on StackedInLine, part 2 of tutorial

2010-03-20 Thread Daniel Roseman
On Mar 19, 12:45 pm, Mike Rychener wrote: > I get an error when I try StackedInLine.  I downloaded the latest > 'official' version of Django in February and used the tutorial on the > web.  Is there a mismatch in versions?  or is something else missing? Yes, something else is

Re: Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread gvernold
Thanks creecode, didn't realise that source was there. I checked out how the URL was passed to the view function and it works perfectly! So simple it's unbelievable. I assume this is the best method to use when starting your own CMS? On Mar 20, 11:35 am, creecode wrote: >

Re: Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread creecode
Take a look at how Flatpages < http://code.djangoproject.com/browser/django/trunk/django/contrib/flatpages > does it and see if something like that method will work for you. One trick with a pattern like this is to put it near the end of your patterns so that it doesn't get satisfied to early

Re: Forms with read only fields

2010-03-20 Thread Thierry Chich
Le samedi 20 mars 2010 16:05:20, Peter Reimer a écrit : > Hi Folks, > > I'm looking for a way to get the following done: > Depending on different things (user, groups, rights, etc.) I want to > show a form with fields that can either be changed or not. For > example, a form with two fields for

stuck in Tutorial on StackedInLine, part 2 of tutorial

2010-03-20 Thread Mike Rychener
I get an error when I try StackedInLine. I downloaded the latest 'official' version of Django in February and used the tutorial on the web. Is there a mismatch in versions? or is something else missing? -- You received this message because you are subscribed to the Google Groups "Django

Line in urls.py to capture url as a variable and pass to view function.

2010-03-20 Thread gvernold
I've already kind of asked this question in another post but haven't had an answer yet. I have a database with just two columns in it - URL and CONTENT. I have a view function called 'pages' that will take an argument (that should be the page URL) and look for the row of data that matches the

Re: Stuck going through tutorial (with def __unicode__(self): bit)

2010-03-20 Thread Steven R. Elliott Jr
Right. 9 times out of ten its the server not restarting which someone already mentioned. If you're new to python try using ecli On Mar 20, 2010 10:22 AM, "Daniel Roseman" wrote: On Mar 20, 1:56 pm, Ed57 wrote: > Hi > > I'm just trying to

Forms with read only fields

2010-03-20 Thread Peter Reimer
Hi Folks, I'm looking for a way to get the following done: Depending on different things (user, groups, rights, etc.) I want to show a form with fields that can either be changed or not. For example, a form with two fields for name and hobby, an admin can change both fields, a normal user can

Re: Stuck going through tutorial (with def __unicode__(self): bit)

2010-03-20 Thread Daniel Roseman
On Mar 20, 1:56 pm, Ed57 wrote: > Hi > > I'm just trying to learn about django (I'm also new to python). In the > tutorial there's a bit where you put the def __unicode__(self): method > in your classes. I've done this but when I  do Poll.objects.all()  - > the class

Stuck going through tutorial (with def __unicode__(self): bit)

2010-03-20 Thread Ed57
Hi I'm just trying to learn about django (I'm also new to python). In the tutorial there's a bit where you put the def __unicode__(self): method in your classes. I've done this but when I do Poll.objects.all() - the class is called Poll - i just get . The tutorial says this might happen if I'm

Dynamic multi-site - running many sites from one Django instance

2010-03-20 Thread berryp
Hi, I am working on a project which needs to run any number of sites in the same Django instance. Each site can be in many languages and must have it's own set of templates and media. I have prototyped this using the sites framework by setting the SITE_ID, MEDIA_ROOT and TEMPLATE_DIRS at runtime

Re: Need limit_choices_to help

2010-03-20 Thread Walt
Is this the type of solution you have in mind? http://tinyurl.com/yaqjfx4 Walt -~ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email

Re: override change_form.html & submit_line.html

2010-03-20 Thread Daniel Roseman
On Mar 20, 12:07 pm, Ogi Vranesic wrote: > Hi > > In order to adapt them I would like to override following templates: > > contrib/admin/templates/admin/change_form.html > contrib/admin/templates/admin/submit_line.html > and probably also >

Re: Signals in Django

2010-03-20 Thread Kenneth Loafman
Jirka Vejrazka wrote: >> Is it possible to get real signals into Django processes? I have >> several processes that collect data for analysis, so they run a long >> time normally. For maintenance purposes, it would be handy to be able >> to send a SIGHUP to the processes and have them shut down

Re: Making a "Common causes for translation problems"

2010-03-20 Thread cool-RR
Hey Russ, At this point I'll just do a brief list, so I think I'll do it on the wiki. I don't want to invest too much time into it, but I'll be happy if someone else will want to expand it and put in in the documentation. (I think it'll be really useful to people who use i18n.) Thanks, Ram. On

override change_form.html & submit_line.html

2010-03-20 Thread Ogi Vranesic
Hi In order to adapt them I would like to override following templates: contrib/admin/templates/admin/change_form.html contrib/admin/templates/admin/submit_line.html and probably also contrib/admin/templates/admin/edit_inline/tabular.html In my project I have already a directory

Re: about models.py

2010-03-20 Thread Atamert Ölçgen
On Saturday 20 March 2010 10:50:04 grp25 wrote: > There are 2 applicatons in our django project say app1 and app2.. > Now we want to update our database by using models of app2. > But after performing manage.py syncdb there is no change in the > database. > So what should we do? > Please help

Re: import csv

2010-03-20 Thread Mark
I got it to work by just using the (already) imported django.contrib.admin BatchModelAdmin now becomes admin.ModelAdmin http://code.google.com/p/django-batchimport/issues/detail?id=4 On Mar 19, 1:22 pm, Mark wrote: > Hello, > I'm having some trouble putting together a

about models.py

2010-03-20 Thread grp25
There are 2 applicatons in our django project say app1 and app2.. Now we want to update our database by using models of app2. But after performing manage.py syncdb there is no change in the database. So what should we do? Please help -- You received this message because you are subscribed to

Bug into Auth module

2010-03-20 Thread carlitux
hi, I think I found a bug, but I have no time to do all the django requirements to report it. And of course first your opinion. Here the form doesn't validate the new_password1 if is an False context boolean object. If we left the new_password1 field empty string or None if jump the "if

Re: query a foreignkey

2010-03-20 Thread het.oosten
I translated my model into english to make everything more understandable for the list. There is were I messed up (next time i do everything in English right away). I rechecked everything after the message of Nuno and removed an error. Now everything works perfectly. Thank you Bruno and Nuno! --

Re: Making a "Common causes for translation problems"

2010-03-20 Thread Russell Keith-Magee
On Fri, Mar 19, 2010 at 9:16 PM, cool-RR wrote: > Hello Django community, > > I have started compiling a list, "Common causes for translation > problems". Where would be a good place to put this list so people who > have a problem with their translations will be most likely

Re: Multi Database Question

2010-03-20 Thread Russell Keith-Magee
On Fri, Mar 19, 2010 at 10:19 PM, mbdtsmh wrote: > This makes alot of sense and works in my case - many thanks. > > However, still unclear as to how to specify which table should be > created in which database when you do want to syncdb to both > databases. I may