using zope.interface with Django models

2008-04-21 Thread Robert Gravina
Hi All, Others have experiemented with using the zope component architecture in Django, with great results: http://www.stereoplex.com/two-voices/adapters-in-django-and-the-revenge-of-zope I'd really like to make use of it too, but I'm finding whenever I say one of my Django models implements

Re: Question about sessions in the DB

2008-04-21 Thread Peter Rowell
> It seems like I need to reference the session_key variable before I > can use it. Can anybody explain why? Well, I'll try. I spent sometime looking at django.contrib.session.backends.* The session is created in a 'lazy' fashion. In particular, db.py's load() method creates the record (and

ANN: This Week in Django 19 - Special Feature Internationalisation

2008-04-21 Thread mtrier
I usually refrain from posting this kind of information to this list, but I thought that this has enough general interest to be something that people might want to be aware of. Each week we have a podcast called This Week in Django that discusses the weekly events within the Django community. We

Question about sessions in the DB

2008-04-21 Thread Dan
Hi All, I'm sure I'm missing something obvious here, but I'm relatively new to Python programming and to Django, so I'd appreciate any help that you all have to offer. I'm writing a function that takes in a username and password via a SOAP method (this all works well), authenticates the user,

Re: Javascript GUI Editor that works with Django templates

2008-04-21 Thread blis102
Thats not particularly a concern for me, or most users, but I guess if you or your users use opera, that would be a deal-breaker. Since Opera is used by a very very small percentage of web users, I don't think it would be a major problem in most use cases. Just my .02 p.s. FCKeditor's connector

Re: define a function in a model that calls itself from the db?

2008-04-21 Thread Peter Rowell
> I have the main page > that will display multiple sections that are each individuals apps. My first question is: do they update anything after the initial data fetch? If not, why not just build the page on the first GET (using template includes, etc.) and be done with it. > One obvious

Re: I'm not getting URL's. Help!

2008-04-21 Thread Michael
You interested in answering the first part of my post? I can't really help you with information like this... 2008/4/21 jeffself <[EMAIL PROTECTED]>: > > I don't think thats it because if I reverse the order of the url's in > the root urls.py file and put precincts before elections, then >

Re: Question about urls.py

2008-04-21 Thread Kenneth Gonsalves
On 22-Apr-08, at 4:00 AM, jmDesktop wrote: > (r'^contact/thanks/(.)/$','mysite.books.views.thanks' (r'^contact/thanks/(?P.)/$','mysite.books.views.thanks'), will direct to the thanks function which you call as: def thanks(request,sender) and this thanks function loads the thanks template

Re: Question about urls.py

2008-04-21 Thread Alex Morega
On Apr 22, 2008, at 01:30 , jmDesktop wrote: > > What I have in my urls.py file is: > > (r'^contact/thanks/(.)/$','mysite.books.views.thanks'), try this: (r'^contact/thanks/(?P.*)/$','mysite.books.views.thanks'), The idea is to capture the sender part of the URL and pass it on as the

Re: Weblog archive links are bad

2008-04-21 Thread Kenneth Gonsalves
On 22-Apr-08, at 2:44 AM, Jon Lesser wrote: > I tried to open a trac ticket on this, but it thinks I'm a spammer. fill in your profile or register at the site and it will accept you -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/code/

Re: CommaSeparatedEmailField

2008-04-21 Thread Jeff Anderson
Berco Beute wrote: Is there something like a 'CommaSeparatedEmailField'? I know there is a CommaSeparatedIntegerField, which is rather handy... I don't believe that there is a multiple e-mail field, but I imagine it would be super easy to write one. Jeff Anderson signature.asc

Re: I'm not getting URL's. Help!

2008-04-21 Thread jeffself
I don't think thats it because if I reverse the order of the url's in the root urls.py file and put precincts before elections, then precincts items work correctly but the election items point to precincts rather than elections. On Apr 21, 3:52 pm, Michael <[EMAIL PROTECTED]> wrote: > How are

Re: Multiple views, multiple apps?

2008-04-21 Thread Mariano
YES! This is exactly what I was looking for. Thank you very very much! As an aside, I managed to do this differently, although of course, is not elegant and introduces a lot of clutter. What I did was inside my app folder, I created folders for every model that I was gonna CRUD, then a views.py

Question about urls.py

2008-04-21 Thread jmDesktop
Hi, I am trying to understand how URLconf works and why I am failing at a simple task. I have this in one my .py files (larger snippet is an email responder from djangobook chap7): return HttpResponseRedirect('/contact/thanks/%s' % sender ) What I have in my urls.py file is:

Re: Multiple views, multiple apps?

2008-04-21 Thread Michael
There is absolutely no reason that you have to use views to serve your views. For example I have an app that has both brands and products. For that I have brandviews.py and productviews.py. I do the same for my urls.py files. It makes life easier when everything is separate. Then you can have your

Re: Django Names

2008-04-21 Thread Juanjo Conti
Not sure, but I think WordPress versions are named with jazz players. Greets. Juanjo -- mi blog: http://www.juanjoconti.com.ar --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Model Options for Admin Site

2008-04-21 Thread Thomas Kerpe
James, have a look here: http://www.djangoproject.com/documentation/model-api/#list-display //Thomas Am 22.04.2008 um 00:07 schrieb jwwest: > > Wow, awesome. Thank you! > > On the same subject, is there a way to display more information on the > record in the listing rather than just one

CommaSeparatedEmailField

2008-04-21 Thread Berco Beute
Is there something like a 'CommaSeparatedEmailField'? I know there is a CommaSeparatedIntegerField, which is rather handy... 2B --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Model Options for Admin Site

2008-04-21 Thread jwwest
Actually, NVM. Right after I asked this I found the answer in the Django Book. Thank you. - James On Apr 21, 5:07 pm, jwwest <[EMAIL PROTECTED]> wrote: > Wow, awesome. Thank you! > > On the same subject, is there a way to display more information on the > record in the listing rather than just

Re: Model Options for Admin Site

2008-04-21 Thread jwwest
Wow, awesome. Thank you! On the same subject, is there a way to display more information on the record in the listing rather than just one column ? For instance, say I have a 'sales table' and I want to list the sales number as the first column, then the customer name and so forth. Do I need to

Re: Model Options for Admin Site

2008-04-21 Thread Thomas Kerpe
Hi James define a __str__ or better __unicode__ method within your model which returns the correct string. i.e. def __unicode__(self): return self.name //Thomas Am 21.04.2008 um 23:55 schrieb jwwest: > > Hey all, > > I'm not sure what I'm doing wrong in my models file, but when I add

Model Options for Admin Site

2008-04-21 Thread jwwest
Hey all, I'm not sure what I'm doing wrong in my models file, but when I add a record in admin, all records are titled [name of model] object. This is a problem especially in related tables since there's no way to tell them apart. What do I need to add and where? Thanks -James

Re: Django Installation Questions on Ubuntu

2008-04-21 Thread Andrew English
That was the problem. I misunderstood the documentation when it said to change projectname.settings to the name of my settings file. I appreciate the help! Thanks. On Mon, Apr 21, 2008 at 5:41 PM, Thomas Kerpe <[EMAIL PROTECTED]> wrote: > > > > Hi khayman, > > Replace: > SetEnv

Re: Django Installation Questions on Ubuntu

2008-04-21 Thread Thomas Kerpe
> Hi khayman, Replace: SetEnv DJANGO_SETTINGS_MODULE settings.py With: SetEnv DJANGO_SETTINGS_MODULE projectname.settings //Thomas Am 21.04.2008 um 23:06 schrieb khayman: > > I have installed Apache, modpython and Django via apt-get. Apache and > modpython are working (I can serve normal

Re: Django Names

2008-04-21 Thread Marty Alchin
On Mon, Apr 21, 2008 at 5:07 PM, Justin Lilly <[EMAIL PROTECTED]> wrote: > I believe there is also a google-code application called Coltrane-blog. Also, http://code.google.com/p/cab/ -Gul --~--~-~--~~~---~--~~ You received this message because you are subscribed

Weblog archive links are bad

2008-04-21 Thread Jon Lesser
It seems that if there are no entries for a particular month, the archive link to that month results in a 404. http://www.djangoproject.com/weblog/2008/apr/ <--Works http://www.djangoproject.com/weblog/2008/mar/ <--404 I tried to open a trac ticket on this, but it thinks I'm a spammer.

Re: Django Names

2008-04-21 Thread Justin Lilly
I believe there is also a google-code application called Coltrane-blog. On Mon, Apr 21, 2008 at 5:00 PM, bfrederi <[EMAIL PROTECTED]> wrote: > > I am curious as to what other Django based projects are named > something to do with other jazz people (such as Django, Ellington, and > Satchmo)? I

Django Installation Questions on Ubuntu

2008-04-21 Thread khayman
I have installed Apache, modpython and Django via apt-get. Apache and modpython are working (I can serve normal files and python script output). However, I am unable to serve the initial Django project. Here is the httpd.conf: Code: SetHandler python-program PythonHandler

Django Names

2008-04-21 Thread bfrederi
I am curious as to what other Django based projects are named something to do with other jazz people (such as Django, Ellington, and Satchmo)? I think it's a cool convention, but those are the only 3 I can think of when I am trying to tell people about it. Thanks, Brandon

Re: Multiple views, multiple apps?

2008-04-21 Thread Mariano
I can't use the admin module because I am working with Google App Engine... On Apr 21, 3:15 pm, Peter Rowell <[EMAIL PROTECTED]> wrote: > > This works but looks really ugly... > > Agreed. > > Is there some reason you can't use class Admin in your models? > > More than one person has observed

Re: Multiple views, multiple apps?

2008-04-21 Thread Peter Rowell
> This works but looks really ugly... Agreed. Is there some reason you can't use class Admin in your models? More than one person has observed that Django's auto-generated admin interface is its Killer App. It's integrated with the django.contrib.auth authentication app, and it's even

Re: awareness of current view in template/site navigation

2008-04-21 Thread Peter Rowell
There are any number of Cheap Hacks you can do to make this simpler. In the view (or possibly using the {% expr %} tag (See http://www.djangosnippets.org/snippets/9/)), set a variable called in_news_archive to "-active" if you are in that section, and '' or None if you aren't. If this is a

Re: I'm not getting URL's. Help!

2008-04-21 Thread Michael
How are you getting the URL? Is there something in your models that is defining the absolute URL? or are you using the Revese lookup? Chances are because they are just copies of one another that you forgot to change one of the files and they still have the get_absolute_url referring to the

Multiple views, multiple apps?

2008-04-21 Thread Mariano
(Warning: still very much a Django newbie) I'm having a bit of trouble conceptualizing this. Say I have an app that has two models: A and B. Both need to have CRUD views. What's the preferred way of doing this? One way I can think of is in urls.py, separate by URL and method name like so:

Re: define a function in a model that calls itself from the db?

2008-04-21 Thread the devel
> Since you are using jQuery (my favorite JS library), take a look at > the taconite plugin. > Home page:http://www.malsup.com/jquery/taconite/ > It makes page mods almost trivial to do. Very cool plugin. I will be implementing that shortly. So if I could get an opinion on this logic... I have

Re: Formwizard Initial Data

2008-04-21 Thread Peter Rowell
> forms.ModelMultipleChoiceField(queryset=Submission.objects.all()) > > how can I make the queryset use Submission.objects.filter rather than > objects.all ? I have not used formtools, but just from looking at the above line I wonder if you tried:

Re: filters should throw exceptions

2008-04-21 Thread David Durham, Jr.
On Mon, Apr 21, 2008 at 1:06 PM, Peter Rowell <[EMAIL PROTECTED]> wrote: > From http://www.djangoproject.com/documentation/templates/#variables > > If you use a variable that doesn't exist, the template system will > insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is > set

Re: London Django User Group

2008-04-21 Thread siudesign
Just an additional note: This will be going ahead. I'm organising the London Django User Group with Simon Willison. There are a few things to iron out and i'll keep everyone posted. Regards Rob On Apr 21, 8:58 am, "Joe Bloggs" <[EMAIL PROTECTED]> wrote: > I live in St Albans but I am

Re: How do I escape a single quote in a Django template?

2008-04-21 Thread Rajesh Dhawan
On Apr 21, 2:29 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to change the admin template from chapter 6 of > djangobook.com.  How can I change the admin template from: > > {% trans 'Django administration' %} > > to > > {% trans 'Bob's administration' %} > > I can't put the

Re: How do I escape a single quote in a Django template?

2008-04-21 Thread Kevin Monceaux
jmDesktop, On Mon, 21 Apr 2008, jmDesktop wrote: > {% trans 'Bob's administration' %} One can find examples of using the trans template tag about 1/4 of the way down the Internationalization documentation page: http://www.DjangoProject.com/documentation/i18n/ For the above it looks like:

Re: Suggestions on UI (client side web) framework to complement Django

2008-04-21 Thread Rajesh Dhawan
On Apr 21, 2:13 pm, ydjango <[EMAIL PROTECTED]> wrote: > Django is a pretty good framework for server side web development. > > client side Web development is also very time consuming and painful. > > For Web Client side development, are there any good web ui frameworks > which can make

How do I escape a single quote in a Django template?

2008-04-21 Thread jmDesktop
Hi, I'm trying to change the admin template from chapter 6 of djangobook.com. How can I change the admin template from: {% trans 'Django administration' %} to {% trans 'Bob's administration' %} I can't put the apostrophe single quote in there. I tried \' and , but it did not work. Thank

Re: A modeling/implementation quiz

2008-04-21 Thread Rajesh Dhawan
On Apr 19, 3:29 pm, Juanjo Conti <[EMAIL PROTECTED]> wrote: > Hi all, > > I am worried about how to model the next scene (this is an example, but > an appropriated one): In the model we have People, and there are > different kind of people, let's say: Professors, Students and Other. > Each

Suggestions on UI (client side web) framework to complement Django

2008-04-21 Thread ydjango
Django is a pretty good framework for server side web development. client side Web development is also very time consuming and painful. For Web Client side development, are there any good web ui frameworks which can make developing look and feel and ui of a web site as easy and as productive as

Re: filters should throw exceptions

2008-04-21 Thread Peter Rowell
From http://www.djangoproject.com/documentation/templates/#variables If you use a variable that doesn’t exist, the template system will insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is set to '' (the empty string) by default. So you could at least define this to be something

Re: define a function in a model that calls itself from the db?

2008-04-21 Thread the devel
I will look into it thank you. --~--~-~--~~~---~--~~ 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

Re: Some weird. In production, imagen is redirected to images

2008-04-21 Thread mamcxyz
Thanks, I take a look at your ideas... --~--~-~--~~~---~--~~ 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

Re: define a function in a model that calls itself from the db?

2008-04-21 Thread Peter Rowell
> if I include the template tags within the html, will > that still be parsed? Or would it be wiser to call a .py script that > will return html after all the object calling is done? I think you might need to work on your model of how things work. Template tags are only meaningful to the

Re: Authenticate

2008-04-21 Thread Peter Rowell
> Authentication works perfectly on the latter method. Why would one > work but not the other? Because they are two different models that are unrelated except for Userprofile having a ForeignKey to User. Just as with Userprofile, if you modify the User record you have to explicitly save() it.

Re: define a function in a model that calls itself from the db?

2008-04-21 Thread the devel
Thanks for the response. So regarding how to inject html via ajax (using jquery) if I include the template tags within the html, will that still be parsed? Or would it be wiser to call a .py script that will return html after all the object calling is done?

Re: define a function in a model that calls itself from the db?

2008-04-21 Thread Peter Rowell
Uhm, you could use . However, you eat the overhead of a second breowser<=>server chat, so I would investigate ways to directly include your news item in a larger template. The higher the volume of your site, the more that second chat will hurt you. AJAX is appropriate if you are going to be

Re: A modeling/implementation quiz

2008-04-21 Thread Juanjo Conti
Kenneth Gonsalves escribió: > > On 21-Apr-08, at 8:15 PM, Michael wrote: > >> What about using the count() method on a filtered subset to get your >> id? >> >> Eg: >> p = People(type="S") >> p.id = People.objects.filter(type=p.type).count() + 1 > > I dont know what the context of this is,

Re: Some weird. In production, imagen is redirected to images

2008-04-21 Thread Peter Rowell
> This not happend in dev mode with the webserver of django. That's an important observation to make because it limits the places where this might be happening. Firefox has an excellent plugin, Live HTTP headers, that can give a little more insight into what is happening. The following was

define a function in a model that calls itself from the db?

2008-04-21 Thread the devel
The way i have it setup now is that when i go to the url (news/) i defined for the html snippet, it calls a generic view of the object_list. I configured all the CSS for it so it looks good. Now that I have a working model of the app, is there a way to simply include or call the url into another

Authenticate

2008-04-21 Thread Chris
So I have created a user profile model the extends the User model. I am having issues with trying to authenticate. So I gather some information and and attempt to save it out but when I go to authenticate shorty after, the auth.authenticate does not return a user object therefore not logging the

Re: I'm not getting URL's. Help!

2008-04-21 Thread 小龙
Show me -- Settings.py 2008/4/21, jeffself <[EMAIL PROTECTED]>: > > > I've got a project that contains two apps (elections and precincts). > My root urls.py looks like this: > from django.conf.urls.defaults import * > urlpatterns = patterns('', > (r'^elections/',

Re: A modeling/implementation quiz

2008-04-21 Thread Kenneth Gonsalves
On 21-Apr-08, at 8:15 PM, Michael wrote: > What about using the count() method on a filtered subset to get your > id? > > Eg: > p = People(type="S") > p.id = People.objects.filter(type=p.type).count() + 1 I dont know what the context of this is, but this would only give the id if you

Re: form.fieldname.value ?

2008-04-21 Thread Doug B
Unless something has changed since.96 you should be able to access initial and bound data directly. They are stored in dicts on the form object called 'initial' and 'data' form.data.fieldname (this is pre-cleaned bound data) form.cleaned_data.fieldname (post clean if valid)

Re: DateField widget, ModelForm and javascript

2008-04-21 Thread Rishabh Manocha
AFAIK that JS date picker is only available in the admin interface. rendering a form as {{ my_form}} does not print that date picker either. I'd be interested in knowing how to get it to show up too (what JS/CSS files need to be added, whether there is some setting we can use in the python code

DateField widget, ModelForm and javascript

2008-04-21 Thread Guillaume Lederrey
Hello ! I have a model that I try to edit with a ModelForm. This model has a DateField property. I render the form in my template with a simple : {{ form.as_p }} I expected the DateField to be displayed as in the admin interface, with a javascript date picker. But I only get a text field. The

Re: Widgets with an error class

2008-04-21 Thread Rishabh Manocha
http://www.djangoproject.com/documentation/newforms/#customizing-the-error-list-format documentation ftw :) On Mon, Apr 21, 2008 at 5:15 AM, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > > No ideas on this? > > > > On Apr 6, 2:38 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote: > > Hello,

Re: Confused on a foriegnkey error

2008-04-21 Thread Rishabh Manocha
Thanks for writing back, Karen. I guess the snippets of code I inserted were a little misleading. I have many other modelforms too, which all have a user = ForeignKey(User) defined. Problem is that I have to use multiple instances of these forms (for example, I need I have a ModelForm called

Some weird. In production, imagen is redirected to images

2008-04-21 Thread mamcxyz
Hi, I have http://www.paradondevamos.com/imagen/ (imagen is the spanish name of image) and always get converted to /images so I get a 404 for all the urls. I have this in my urls: (r'^imagen/', include('shared.multimedia.urls-image')), I don't have rewrite rules in apache, and not have a

templatetags package name

2008-04-21 Thread Alex Morega
Hello, What is the best practice in naming templatetags modules in the following situation? I have an application named "foo". It lives as a top-level Python package. Its views are foo.views, its models are foo.models, etc. I waht this application to define some templatetags. The most

form.fieldname.value ?

2008-04-21 Thread mbdtsmh
Hi all - being new to Django I've started to define my first template. The issue that I am having is when I simply want to get a value from a form object (rather than the whole string). I can get around this by passing in extra values in the render_to_response command in the views.py file

I'm not getting URL's. Help!

2008-04-21 Thread jeffself
I've got a project that contains two apps (elections and precincts). My root urls.py looks like this: from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^elections/', include('elections.urls')), (r'^precincts/', include('precincts.urls')), (r'^admin/',

Re: Generic views and user's objects

2008-04-21 Thread picky
No idea ? Can't I use generic view in this case ? :-/ On 18 avr, 00:11, picky <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying to usegenericview in my app and I have some problems with > objects related to the logged user. > > Here is a simplified version of my models : > > class

Formwizard Initial Data

2008-04-21 Thread sparky
Hello All, I am writing an app that includes Messaging and I would like to give users the ability to attach other system objects to the messages that they send. The FormWizard stuff is fabulous, but I would like to limit a queryset used in one of the forms here are my Mail forms: class

filters should throw exceptions

2008-04-21 Thread David Durham, Jr.
Hi all, I'm new to working with Django so forgive my newness. I'm reading through chapter 10 of the free online django book, and I've come across the statement that filter should silently ignore errors. I disagree with this. I think they ought to raise exceptions, and the site should be

awareness of current view in template/site navigation

2008-04-21 Thread Aljosa Mohorovic
i often find myself thinking "there must be a better way" when creating site navigation that has different images for normal/active/ hover link. so if my current location is "/news/archive", what i usually do is: - define current_view="news_archive" as variable for template - in template,

Re: define special attributes with ModelForm

2008-04-21 Thread Thomas Guettler
Constantin Christmann schrieb: > Hello, > > I am using ModelForm for auto-generation of my input forms. It saves me > much time to use this, but is there a way to apply additional attributes > to the generated form. > I mean the kind of attributes I can define with > > attrs={'class':'special'}

Re: A modeling/implementation quiz

2008-04-21 Thread Michael
What about using the count() method on a filtered subset to get your id? Eg: p = People(type="S") p.id = People.objects.filter(type=p.type).count() + 1 Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Fwd: custom form on admin interface page

2008-04-21 Thread Kevin Monceaux
André, On Mon, 21 Apr 2008, Andre Meyer wrote: > btw I am using the 0.96.1 release. Does that still use old_forms? Have > not yet looked into old/newforms... Yes it does. At the moment to use newforms-admin, one has to check out the newforms-admin branch from SVN. If you'd like to find out

Re: 'message_set' causes ProgrammingError while handling Exception

2008-04-21 Thread radioflyer
Thanks again dallas and kenneth, Kenneth's comment about the clean process sent me back to the docs. I was using form.cleaned_data to do my own integrity checking, but I didn't realize what was truly available from the clean methods. Handling the validation with custom form methods does seem

Re: questions about Django.db

2008-04-21 Thread 小龙
Thanks i got it . a=Page.objects.all() for one in a: print one >>[a,a1,a2] :D > > > > -- deSign thE fuTure http://www.freeis.cn/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: A dynamic MultipleChoiceField with m2m and each option be one of those objects

2008-04-21 Thread Raisins
I have it implemented without new forms for now. Anyone have an idea how I could do it with new forms? On Apr 18, 5:11 pm, Raisins <[EMAIL PROTECTED]> wrote: > I am trying to create a dymanic MultipleChoiceField with the > CheckboxSelectMultiple widget. The thing I want different, is the all >

Re: Can't get ThreadLocals (user in threadlocal storage) working.

2008-04-21 Thread Marty Alchin
On Sun, Apr 20, 2008 at 10:45 AM, Hilbert Schraal <[EMAIL PROTECTED]> wrote: > # Make this unique, and don't share it with anybody. > SECRET_KEY = '[EMAIL PROTECTED]@d(5w+m)kpcjffne(pvb+#6w2s_pz*5)b%$f' As an aside, note the comment: "don't share it with anybody" It's good that you cleaned the

Re: Confused on a foriegnkey error

2008-04-21 Thread Karen Tracey
On Mon, Apr 21, 2008 at 2:53 AM, Rishabh Manocha <[EMAIL PROTECTED]> wrote: > > Hey Guys, > > I have 4 models working something like this: > > class User(models.Model): > name = models.CharField() > email = models.EmailField() > ... > > class A(models.Model): > domainname =

Re: A dynamic MultipleChoiceField with m2m and each option be one of those objects

2008-04-21 Thread Raisins
I posted this a second ago but it didnt seem to post. ah well. I have it working without newforms. Just a bunch of check boxes and a loop over c.m2mModel2.all() I then just capture the post data and figure out what I want to do in the view. I would really like to new this in newforms and take

Re: Javascript GUI Editor that works with Django templates

2008-04-21 Thread Peter Melvyn
> My favorite is FCKeditor. Its formatting of source code is really > clean and semantic. I have come to hate TinyMCE because it jumbles > source code and uses too many tags at times. Try it out, you may like > it a lot. I've tried it and it seems it does not work with Opera...

Re: how do designers create content

2008-04-21 Thread Chris Hoeppner
El dom, 20-04-2008 a las 12:13 +0530, Kenneth Gonsalves escribió: > > On 20-Apr-08, at 12:03 PM, lee wrote: > > > Do the designers use text base editting like ultraedit or > > or graphics based software like dreamweaver? Most of the artist I know > > don't do much coding and are into

Re: how do designers create content

2008-04-21 Thread Chris Hoeppner
El dom, 20-04-2008 a las 12:13 +0530, Kenneth Gonsalves escribió: > > On 20-Apr-08, at 12:03 PM, lee wrote: > > > Do the designers use text base editting like ultraedit or > > or graphics based software like dreamweaver? Most of the artist I know > > don't do much coding and are into

Re: questions about Django.db

2008-04-21 Thread Chris Hoeppner
When you retrieve a row (aka, a model instance), it will be an object with attrs a, a1, aN. I'm not sure I got your point, though. ~ Chris El lun, 21-04-2008 a las 01:11 +0800, 小龙 escribió: > Just as in table Test: > name url sizetime > a a1 a2 a3 >

Condense several database queries to one

2008-04-21 Thread Julien
Hi everyone, I have my code like this: class OrderedItem(models.Model): owner_list = models.ForeignKey('OrderedList', related_name='items') order = models.IntegerField() ... class OrderedList(models.Model): # Reset orders an_ordered_list =

Fwd: custom form on admin interface page

2008-04-21 Thread Andre Meyer
Hi Kevin Thanks a lot for this. It does indeed work in this way which is MUCH better than my ifequal solution. btw I am using the 0.96.1 release. Does that still use old_forms? Have not yet looked into old/newforms... thanks and cheers André On Sat, Apr 19, 2008 at 1:02 PM, Kevin Monceaux

Re: Admin page doesn't show calendar popup

2008-04-21 Thread Polat Tuzla
Please follow the django documentation, section named 'Install the Django code'. It's located here: http://www.djangoproject.com/documentation/install/ Make sure that you follow the part 'Installing the development version'. And don't forget to 'Remove any old versions of Django' before

Re: Is psyco project alive?

2008-04-21 Thread Giovanni Giorgi
As far as I know, "Psyco" will not have feature enhancements: You can read here http://psyco.sourceforge.net/introduction.html: I will not continue to develop it beyond making sure it works with future versions of Python I think you can use it without fear, but I have never used it in a

Re: Connect users in models.py to admin site users

2008-04-21 Thread chiefmoamba
hang on, I may have found the answer here: http://groups.google.com/group/django-users/browse_thread/thread/8933164dfc790200/f7ef4498f1391aac?lnk=gst=link+class+to+user#f7ef4498f1391aac On Apr 20, 8:29 pm, chiefmoamba <[EMAIL PROTECTED]> wrote: > Hello, > > I have a model in models.py as shown

Re: London Django User Group

2008-04-21 Thread Joe Bloggs
I live in St Albans but I am travel into London a few times a month so I wouldn't mind a meetup. My main criteria for the meetup would be that the pub has some real ale! That is assuming that people who want to attend are over 18. On Fri, Apr 18, 2008 at 9:17 PM, siudesign <[EMAIL PROTECTED]>

Re: can not run manage.py dbshell

2008-04-21 Thread Russ
Doh! thanks that fixed it man I feel stupid now :) On Apr 21, 12:03 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2008-04-20 at 23:43 -0700, Russ wrote: > > Im trying to learn django and I appear to be running into an issue > > with python manage.py dbshell I am getting the

Re: How to use ImageField to save images to dynamic path

2008-04-21 Thread Rishabh Manocha
I don't know if this answers your specific question, but this is being worked on, apparently - http://code.djangoproject.com/ticket/5361. I had a similar requirement, where I wanted to dynamically append a model field to the filename before saving it. I ended up getting the model field's value

Re: can not run manage.py dbshell

2008-04-21 Thread Malcolm Tredinnick
On Sun, 2008-04-20 at 23:43 -0700, Russ wrote: > Im trying to learn django and I appear to be running into an issue > with python manage.py dbshell I am getting the following error can > anyone shed some light on this for me, Im at a loss > > Im running MAC OSX 10.5.2 Leopard > I have installed

Confused on a foriegnkey error

2008-04-21 Thread Rishabh Manocha
Hey Guys, I have 4 models working something like this: class User(models.Model): name = models.CharField() email = models.EmailField() ... class A(models.Model): domainname = models.CharField() class B(models.Model): domain = models.ForigenKey(A) name = models.CharField()

can not run manage.py dbshell

2008-04-21 Thread Russ
Im trying to learn django and I appear to be running into an issue with python manage.py dbshell I am getting the following error can anyone shed some light on this for me, Im at a loss Im running MAC OSX 10.5.2 Leopard I have installed the MySQLdb Thank You $ python manage.py dbshell