Re: Something like a mini Crystal Reports with Django

2007-08-02 Thread Mir Nazim
I understand that views need to be created. I am doing that these days. What specifically I wanted to know is whether anyone else has worked on a similar stuff. So he might want to share his experience. BRIT is Java. I would prefer something more python based solution. even better is there is a

Re: Queryset of instances bound to particular ForeignKey

2007-08-02 Thread Collin Grady
Neither of those is correct. He wants every B that has an A fkeyed to it. In other words, every instance of B where b.a_set.count() > 0 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: how to handle forms with more than submit button

2007-08-02 Thread Kenneth Gonsalves
On 03-Aug-07, at 10:12 AM, Kenneth Gonsalves wrote: > > > On 03-Aug-07, at 8:06 AM, james_027 wrote: > >>> create different URLs (and thus different views) for the different >>> buttons and then redirect to wherever you want to go. >>> >> >> How do I create a different URL for different buttons

Re: how to handle forms with more than submit button

2007-08-02 Thread Kenneth Gonsalves
On 03-Aug-07, at 8:06 AM, james_027 wrote: >> create different URLs (and thus different views) for the different >> buttons and then redirect to wherever you want to go. >> > > How do I create a different URL for different buttons but under one > form? each submit button has a name - say

Re: Firebird support

2007-08-02 Thread Jacob Kaplan-Moss
On 8/2/07, james_027 <[EMAIL PROTECTED]> wrote: > anybody here heard of firebird database? how can I get support from > django? This has been discussed before on django-dev; please search the archives. Jacob --~--~-~--~~~---~--~~ You received this message

Django and mod_proxy

2007-08-02 Thread Przemek Gawronski
Hi, I'm having some problems running Django behind an Apache with a mod_proxy. So my router transmits all it's communication on port 80 to 192.168.0.2, on which I've setup mod_proxy (with django server on 192.168.1.2, the networks see each other) ProxyRequests On ProxyPass /django/

Re: how to handle forms with more than submit button

2007-08-02 Thread Doug B
context_dict.update(button1_helper()) Opps, forgot to actually call button1_helper. Sorry, need sleep :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to handle forms with more than submit button

2007-08-02 Thread Doug B
> thanks doug, this is what I did, but I am not comfortable with it. > those two button do different things, and if they're under one method > on the views it could be ugly, what if I have 4 or 5 submit buttons? Keep in mind there is nothing keeping one view from calling another. def

Re: how to handle forms with more than submit button

2007-08-02 Thread [EMAIL PROTECTED]
Well... that's how I've been doing it anyway :) On Aug 2, 11:15 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > On Aug 3, 11:12 am, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Oh... forgot the semicolons after .submit(); but you get the picture > > thanks carole, yes I the picture.

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
Hi, On Aug 3, 11:21 am, Doug B <[EMAIL PROTECTED]> wrote: > As far as I know a form submits to a single url via the action=? > specifier. That's just the way an html form works. Each submit > button that is part of the form is going to post to the action url in > the form. You can override

Re: Recipe / Ingredient Model

2007-08-02 Thread Shane Graber
LOL, you don't know how often this happens to me. :P Shane On 8/2/07, Lucky B <[EMAIL PROTECTED]> wrote: > > God, 0/2, just do what John proposed, I am not thinking straight right > now, what I would give for an edit capability on my emails, I'll spend > all of tonight removing my foot from my

Re: Recipe / Ingredient Model

2007-08-02 Thread Shane Graber
Excellent! This is exactly what I was looking for. Thanks for the help! Shane On 8/2/07, John Danks <[EMAIL PROTECTED]> wrote: > > On 8/2/07, Shane Graber <[EMAIL PROTECTED]> wrote: > > > > I'm trying to make a recipe/ingredient application as my road to > > learning more about Django.

Re: how to handle forms with more than submit button

2007-08-02 Thread Doug B
As far as I know a form submits to a single url via the action=? specifier. That's just the way an html form works. Each submit button that is part of the form is going to post to the action url in the form. You can override with javascript, but that doesn't make much sense unless you're doing

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
hi, On Aug 3, 11:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Oh... forgot the semicolons after .submit(); but you get the picture > thanks carole, yes I the picture. so its about javascript not django ... cheers, james --~--~-~--~~~---~--~~ You

Re: how to handle forms with more than submit button

2007-08-02 Thread [EMAIL PROTECTED]
Oh... forgot the semicolons after .submit(); but you get the picture On Aug 2, 11:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Something like this... > > > function submitFunctionA() > { >document.getElementById('myform').action = "someurl"; >

Re: how to handle forms with more than submit button

2007-08-02 Thread [EMAIL PROTECTED]
Something like this... function submitFunctionA() { document.getElementById('myform').action = "someurl"; document.getElementById('myform').submit() } function submitFunctionB() { document.getElementById('myform').action = "someotherurl"; document.getElementById('myform').submit()

Re: Queryset of instances bound to particular ForeignKey

2007-08-02 Thread [EMAIL PROTECTED]
In model B.. if you say modela = models.ForeignKey(ModelA) You could also say b.modela_set.all() On Aug 2, 8:18 pm, Lucky B <[EMAIL PROTECTED]> wrote: > If I gather correctly you want to see every ModelA that's bound to a > particular ModelB b? > > ModelA.objects.filter(modelBs=b) > > That

ANN: SonomaSunshine for Django v0.01

2007-08-02 Thread SamFeltus
Presented for your amusement, with source code for the first time!!! LOL The Redneck Riviera's Best Python Powered Folk Art Server... SonomaSunshine v0.01 for Django Django application for creating/editing Shiny/Happy Flash movies. http://samfeltus.com/django/hey_yall.html

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
God, 0/2, just do what John proposed, I am not thinking straight right now, what I would give for an edit capability on my emails, I'll spend all of tonight removing my foot from my mouth. On Aug 2, 10:49 pm, Lucky B <[EMAIL PROTECTED]> wrote: > Ok, I've thought about it some more, and came up

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
Ok, I've thought about it some more, and came up with this: http://dpaste.com/hold/15915/ It's not quite what you asked for, for your idea of the interface you're gonna have to either code a QuantityField type field to merge both the quantity and unit, or just write views that accommodate the

Firebird support

2007-08-02 Thread james_027
Hi, anybody here heard of firebird database? how can I get support from django? Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: how to handle forms with more than submit button

2007-08-02 Thread james_027
hi > create different URLs (and thus different views) for the different > buttons and then redirect to wherever you want to go. > How do I create a different URL for different buttons but under one form? Thanks james --~--~-~--~~~---~--~~ You received this

Re: Recipe / Ingredient Model

2007-08-02 Thread John Danks
On 8/2/07, Shane Graber <[EMAIL PROTECTED]> wrote: > > I'm trying to make a recipe/ingredient application as my road to > learning more about Django. Making a model of an ingredient and most > of the recipe are relatively straight forward based on the excellent > tutorials on the Django.

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
ack, I missed a few things, the ingredient-quantity measure. not sure how to do that. ignore my previous message. On Aug 2, 10:27 pm, Lucky B <[EMAIL PROTECTED]> wrote: > You're missing just: > ingredients = models.ManyToManyField(Ingredient) > > In your recipe model. > > If you want a pretty

Re: Recipe / Ingredient Model

2007-08-02 Thread Lucky B
You're missing just: ingredients = models.ManyToManyField(Ingredient) In your recipe model. If you want a pretty interface in admin (if you're not using newforms- admin) then: ingredients = models.ManyToManyField('Ingredient', filter_interface=models.HORIZONTAL) On Aug 2, 10:13 pm, "Shane

Re: how to handle forms with more than submit button

2007-08-02 Thread Lucky B
create different URLs (and thus different views) for the different buttons and then redirect to wherever you want to go. On Aug 2, 10:13 pm, james_027 <[EMAIL PROTECTED]> wrote: > Hi, > > How do I handle this situation wherein I want different submit button > to call different method on the

Enjoy it !

2007-08-02 Thread goldcompany
Enjoy it ! 1) http://www.mmopawn.com 2) http://www.mmopawn.com 3) http://www.mmopawn.com 4) http://www.mmopawn.com 5) http://www.mmopawn.com 6) http://www.mmopawn.com 7) http://www.mmopawn.com a good site about world of warcraft -

Recipe / Ingredient Model

2007-08-02 Thread Shane Graber
I'm trying to make a recipe/ingredient application as my road to learning more about Django. Making a model of an ingredient and most of the recipe are relatively straight forward based on the excellent tutorials on the Django. However, I'm struggling with understanding how to hook in multiple

how to handle forms with more than submit button

2007-08-02 Thread james_027
Hi, How do I handle this situation wherein I want different submit button to call different method on the views. I feel that calling the same method on views for all the submit button on a form is not good, as you'll make the distinction of what to do inside the method... Thanks james

Job Fair F/OSS project

2007-08-02 Thread [EMAIL PROTECTED]
I'm looking for some volunteers for a new open source project. At the Institute of Design (http://www.id.iit.edu ), our next project is a system for the management of our job fair (http://www.id.iit.edu/ recruitID/ ) The systems goal is to allow students and employers to enter their availability

Re: value for choices arguments for newforms.MultipleSelectField

2007-08-02 Thread Kai Kuehne
Hi, On 8/3/07, james_027 <[EMAIL PROTECTED]> wrote: > I don't see ModelMultipleChoiceField on the documentaion or the latest > source code You can look at http://code.djangoproject.com/browser/django/trunk/tests/regressiontests/forms/tests.py till the documenation is updated. > Thanks > james

Re: value for choices arguments for newforms.MultipleSelectField

2007-08-02 Thread james_027
H On Aug 2, 11:35 pm, Nathan Ostgard <[EMAIL PROTECTED]> wrote: > You can use ModelMultipleChoiceField for this: > > items = > newforms.ModelMultipleChoiceField(queryset=Items.objects.all()) > I don't see ModelMultipleChoiceField on the documentaion or the latest source code Thanks james

Re: website template compatible with django

2007-08-02 Thread Kenneth Gonsalves
On 01-Aug-07, at 12:32 PM, Ben wrote: > I am a total Django newbie. Hence the probably silly questions: > There are professional-looking website templates for sale in several > places (templatemonster, etc). > Can those be used easily with Django ? yes > Do they need to be designed

Re: Using limit_choices_to on a ManyToMany Field

2007-08-02 Thread Russell Keith-Magee
On 8/3/07, Greg <[EMAIL PROTECTED]> wrote: > > Come onI know that somebody can figure this out Greg - seriously, it's been 6 hours since your original message. Give people a chance to _read_ your message before you complain about the fact that nobody has answered. Yours, Russ Magee %-)

Re: Queryset of instances bound to particular ForeignKey

2007-08-02 Thread Lucky B
If I gather correctly you want to see every ModelA that's bound to a particular ModelB b? ModelA.objects.filter(modelBs=b) That gives you what you want. On Aug 2, 7:20 pm, Benjamin Goldenberg <[EMAIL PROTECTED]> wrote: > Hi everyone, > I asked about this earlier today on IRC and no one knew of

Queryset of instances bound to particular ForeignKey

2007-08-02 Thread Benjamin Goldenberg
Hi everyone, I asked about this earlier today on IRC and no one knew of a way to do it. Basically I have a model, let's call it ModelA with a ForeignKey to an instance of ModelB. I would like QuerySet of all instances of ModelB that are bound to that particular ForeignKey. Does anyone have any

Re: Using limit_choices_to on a ManyToMany Field

2007-08-02 Thread Greg
Come onI know that somebody can figure this out sandp = models.ManyToManyField(Choice, limit_choices_to = {'choice__id': self.collection.id}) What do I need to get the collection id? Will 'self.collection.id' work? I forgot to add my collection class. Here it is: class

Re: OR a Q object - Problem with ManyToMany relationships?

2007-08-02 Thread Nowell
I believe that this is due to the fact that the last Q is performing an INNER JOIN on the Authors table, and therefore is excluding all records that do not have an entry in your (what I assume is a) ManyToManyField/ForeignKey. On Aug 2, 5:37 pm, LaundroMat <[EMAIL PROTECTED]> wrote: > Hi, > >

Newforms w/ *dynamic* ChoiceField choices?

2007-08-02 Thread rskm1
Newforms has a spiffy way to dynamically set the "initial" values of fields, in the view code when the Form is constructed. choosecolorform = ChooseColorForm(initial={'color': 'black'}) I was hoping it would be just as easy to dynamically define the choices available in a ChoiceField, too...

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Kai Kuehne
Forgot something: I could print the form manually and not use form.as_table(). So I can left out the fields I don't want. I think this is ok in this case. Thanks! Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

schema evolution [testers wanted]

2007-08-02 Thread Derek Anderson
hey all, i have finished writing unit tests covering the mysql, postgresql and sqlite3 backends, as well as notably expanding what introspections/migrations the sqlite3 backend can handle. also, full documentation (including installation and usage instructions) is available both in the

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Kai Kuehne
Hi Lucky, On 8/2/07, Lucky B <[EMAIL PROTECTED]> wrote: > > I think you should be using form_for_instance on the dvd instance > instead of the generic form contructor. > http://www.djangoproject.com/documentation/newforms/#form-for-instance This works, and this is the way I had it first. But I

Re: remember me feature

2007-08-02 Thread SH
> is implementing remember me feature for login is as simple as changing > the cookies settings in the settings.py? is manipulating of setting.py > allowed in views? > I just incorporated the DualSessionMiddleware into my project. It does what it says, and didn't break any of my other code.

Re: create_or_update() shortcut

2007-08-02 Thread Nathaniel Whiteinge
On Aug 2, 3:01 am, Jens Diemer <[EMAIL PROTECTED]> wrote: > We have the shortcut get_or_create() [1], but whats about a > create_or_update() ? One exists as a patch_. I've been using it with the current svn for a while without problems. I find that an update_or_create() shortcut is particularly

Re: Trigger a django user password change...

2007-08-02 Thread RajeshD
> > Any better ideas? You could also use the pre_save signal in your first solution (instead of post_save). That will give you the new password before it's saved to the DB. So, you can pull up that user's DB User object and compare the two passwords. Of course, and send a message to the user.

Re: Django equivalent of ROR flash

2007-08-02 Thread SH
I haven't tried it myself, but check out: http://www.djangosnippets.org/snippets/331/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Trigger a django user password change...

2007-08-02 Thread RajeshD
> > One idea is this: > > ===- > > old_passwords = {} > def save_old_pass(sender, instance, signal, *args, **kwargs): > user_obj = instance > old_pass = user_obj.password > old_passwords[user_obj] =

Re: Newforms - passing form data in sessions - Trouble with ForeignKey

2007-08-02 Thread RajeshD
> But I run into trouble when saving in sessions via clean_data and then > trying to initiate a newform with the saved clean_data. This occurs > only when ForeignKeys are in the Game. > > This is probably due to the nature foreignkeys are stored as an object > in clean_data (see below).

Re: Admin & Models

2007-08-02 Thread Rohit
Thanks Nathan. I think this solves one part of my problem. Also just for reference, the method should be modified as so: def company(self): return self.sub_dept.dept.company and so on. The exclusion of self, leads Django to look for a global named "sub_dept". Any idea how I can add company

Re: Internationalization and accents

2007-08-02 Thread Ramiro Morales
On 8/2/07, Jonas <[EMAIL PROTECTED]> wrote: > > There seems to have a bug with the internationalization. > When the (result) translated string has accents, that is the "msgstr" > in the .po file, there is no problem. > > But when the string TO BE translated has accents, that is the "msgid" > in

Newforms - passing form data in sessions - Trouble with ForeignKey

2007-08-02 Thread MichaelMartinides
Dear all, I have a very simple 3 page ordering process for a small online shop. I would like to pass data from the pages via sessions. But I run into trouble when saving in sessions via clean_data and then trying to initiate a newform with the saved clean_data. This occurs only when

Re: Internationalization and accents

2007-08-02 Thread Chris Hoeppner
That's not a bug ;) You should avoid using non-ascii chars in msgid strings. This has nothing to do with Django, but with gettext (the "translation" engine behind the scene) itself. There's no point in using non-ascii chars anyways, since msgid strings are thought to be message identifiers, not

Using limit_choices_to on a ManyToMany Field

2007-08-02 Thread Greg
I've looked everywhere for information on how to use the 'limit_choices_to' attribute...but can't seem to find the answer. I have the following models: class Choice(models.Model): choice = models.ForeignKey(Collection, edit_inline=models.TABULAR, num_in_admin=5) size =

Internationalization and accents

2007-08-02 Thread Jonas
There seems to have a bug with the internationalization. When the (result) translated string has accents, that is the "msgstr" in the .po file, there is no problem. But when the string TO BE translated has accents, that is the "msgid" in the .po file, no substitution occurs in the translated

Re: Count the times a user has logged into the system

2007-08-02 Thread Chris Hoeppner
Seems a bit hacky actually. But if there's no other way... Thanks a lot Mackenzie! 2007/8/2, Mackenzie Kearl <[EMAIL PROTECTED]>: > > you can just create a profile with a field number of times logged in. > This could be updated in a custom login view that you write. > > check out

Re: How to get selected value set in newforms

2007-08-02 Thread Nis Jørgensen
[EMAIL PROTECTED] skrev: > I think the problem is related to passing the resultsdict dictionary to the > DisplayForms. > Once, I did not pass in the dictionary then the initial value works. > Yes. Passing in values creates a bound form. Initial data are used only for unbound forms. I think

Re: Admin & Models

2007-08-02 Thread Nis Jørgensen
Nathan Ostgard skrev: > list_display can use functions as their value... so, you can have: > > class Employee(models.Model): > sub_dept = ForeignKey(SubDept) > > def company(self): > return sub_dept.dept.company > > def dept(self): > return sub_dept.dept > > class Admin: >

Re: Count the times a user has logged into the system

2007-08-02 Thread Mackenzie Kearl
you can just create a profile with a field number of times logged in. This could be updated in a custom login view that you write. check out http://www.djangobook.com/en/beta/chapter12/ def login(request): username = request.POST['username'] password = request.POST['password'] user

Re: 404 for date-based generic views--Help!

2007-08-02 Thread Drasty
I should also note that adding allow_future=True results in the same 404 error. (I'm also testing with data with dates in 2006, so "TIME_ZONE" in settings.py shouldn't be a contributing factor, even though I'm using the "correct" designation for where I am.) On Aug 2, 11:42 am, Mackenzie

Count the times a user has logged into the system

2007-08-02 Thread Chris Hoeppner
I can recall this being covered some time ago, but google won't throw up my answers. So, sorry for double post :) I'd like to count the times a user has logged in (if possible without hacking on contrib.auth). Actually just the first 10 times or so. I want to show a few mini-tutorials the first

Re: How to get selected value set in newforms

2007-08-02 Thread jeffhg58
I think the problem is related to passing the resultsdict dictionary to the DisplayForms. Once, I did not pass in the dictionary then the initial value works. Jeff -- Original message -- From: [EMAIL PROTECTED] Nis, Thanks for the reply. I tried your example and that

Re: schema evolution

2007-08-02 Thread Derek Anderson
this is the right place. or anyone can feel free to PM me. which database are you using? can you give me a copy of your model file and a dump of your existing schema? Romo wrote: > Hello! > > I don't know if this is the right place to a little problem I have > with this... > > I installed

Re: 404 for date-based generic views--Help!

2007-08-02 Thread Drasty
On Aug 2, 11:42 am, Mackenzie Kearl <[EMAIL PROTECTED]> wrote: > You should put some template code up as well Here you go (there are no variables in "zora.html"): {% extends "zora.html" %} {% block title %}Pictures of Zora (from {{ day|date:"N d, Y" }}){% endblock title %} {% block bodystyle

Re: 404 for date-based generic views--Help!

2007-08-02 Thread Mackenzie Kearl
You should put some template code up as well i know that I recently could not see posts that existed because allow_future: defaults to False http://www.djangoproject.com/documentation/generic_views/#django-views-generic-date-based-archive-day

Re: schema evolution

2007-08-02 Thread Romo
Hello! I don't know if this is the right place to a little problem I have with this... I installed schema-evolution and everything seemed to be fine... when i try to run it with: python manage.py sqlevolve app_name (obviously app_name is not my app name :P) I get the following: BEGIN;

Re: How to get selected value set in newforms

2007-08-02 Thread jeffhg58
Nis, Thanks for the reply. I tried your example and that does not work. Here is the snippet of my code: views.py def displayresults(request, object_id): result = Result.objects.get(pk=object_id) startdatevalue = '' starttimevalue = '' startdatestr = '%s' %

django admin and edit_inline

2007-08-02 Thread Lic. José M. Rodriguez Bacallao
if I have a model edited inline with other in the admin site, how can I specified the ordering of the inline edited model fields and it don't show up in admin first page? -- Lic. José M. Rodriguez Bacallao Cupet - Todos somos muy

Re: create_or_update() shortcut

2007-08-02 Thread Don Arbow
On Aug 2, 2007, at 2:01 AM, Jens Diemer wrote: > > We have the shortcut get_or_create() [1], but whats about a > create_or_update() ? > > [1] http://www.djangoproject.com/documentation/db-api/#get-or- > create-kwargs The shortcut already exists, it's called save().

Re: Admin and ManyToManyField

2007-08-02 Thread Lucky B
null=True only affects the database representation, you need to set blank=True. The reason you can do it in the command line is that you can bypass admin's validators through the command line. On Aug 2, 11:08 am, Ramashish Baranwal <[EMAIL PROTECTED]> wrote: > Hi, > > I have a model that has a

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Lucky B
I think you should be using form_for_instance on the dvd instance instead of the generic form contructor. http://www.djangoproject.com/documentation/newforms/#form-for-instance On Aug 2, 11:14 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote: > No ideas anyone? :-/

Re: How to get selected value set in newforms

2007-08-02 Thread Nis Jørgensen
[EMAIL PROTECTED] skrev: > I am still having problems setting the select widget to the 3rd value in the > drop down list. > Looking further it seems that the html does not have the selected="selected" > value in any of the items. > The documentation states that if use a bound form you will

Re: Admin & Models

2007-08-02 Thread Nathan Ostgard
list_display can use functions as their value... so, you can have: class Employee(models.Model): sub_dept = ForeignKey(SubDept) def company(self): return sub_dept.dept.company def dept(self): return sub_dept.dept class Admin: list_display = ('first_name, 'last_name',

Re: Something like a mini Crystal Reports with Django

2007-08-02 Thread Lucky B
You could try Eclipse BIRT for a WYSIWYG interface. But otherwise you can create a view however you want to report your data doing whatever manipulation you wanted. I don't see what else you would need other than to create a view. On Aug 2, 5:17 am, Mir Nazim <[EMAIL PROTECTED]> wrote: > Anybody

Re: ModelMultipleChoiceField doesn't do initial selection

2007-08-02 Thread Kai Kuehne
No ideas anyone? :-/ --~--~-~--~~~---~--~~ 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 [EMAIL

Admin and ManyToManyField

2007-08-02 Thread Ramashish Baranwal
Hi, I have a model that has a ManyToManyField. When I try to add/edit an object of this model in admin, it says that the ManyToManyField is required i.e. I can not leave it out. While, from the shell I can easily create an object without adding anything in the ManyToManyField. The same happens

Windows XP tips and tricks

2007-08-02 Thread John Travolta
Great Windows XP tips and tricks http://windowsxpsp2pro.blogspot.com --~--~-~--~~~---~--~~ 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

Re: Including view in a template

2007-08-02 Thread Kyle Fox
You might want to try writing an inclusion tag: http://www.djangoproject.com/documentation/templates_python/#inclusion-tags They are much simpler to write than template tags, and more "designer friendly." They let you write a separate template that gets rendered inside of another template

Re: templates..

2007-08-02 Thread Andy McKay
On 2 Aug 2007, at 14:11, Marco A. wrote: > NameError at /foo/ global name 'get_template' is not defined You haven't defined get_template anywhere in your import statements (below), so you've got an error in Python back. Define it so Python knows what it is. A quick google tells me the

templates..

2007-08-02 Thread Marco A.
Hi ! I have a problem to setting up the template : NameError at /foo/ global name 'get_template' is not defined Request Method: GET Request URL: http://127.0.0.1:8000/foo/ Exception Type: NameError Exception Value: global name 'get_template' is not defined Exception Location:

newforms / newforms-admin: customizing label_tag with css -- how does newforms-admin do it?

2007-08-02 Thread _
Hi, I'd like to add some css to my field.label_tag() if the field is required (so it generates class="required" as part of the ). I'm using a straight forms.form_from_model but I can't really see how it can be done in an intelligent manner. I've tried to figure out how newforms-admin does it (in

Re: 404 for date-based generic views--Help!

2007-08-02 Thread Drasty
I figured out the year archive issue (it doesn't use the object_list, argh!) but still get 404s for the day and detail generic views. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

404 for date-based generic views--Help!

2007-08-02 Thread Drasty
I'm getting 404 errors on day and detail views for date-based generic views. In addition, the year archive doesn't show any entries, but the month view does! Here's my urlconf--is there something I'm missing? (I'm using Python 2.4.4, MySQL, & the dev server on localhost.) from

Re: mod_python apache2 path problem

2007-08-02 Thread Graham Dumpleton
On Aug 2, 6:11 pm, Giorgio Salluzzo <[EMAIL PROTECTED]> wrote: > On Jul 31, 12:25 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > > Huh. What bug, strange behaviour in mod_python? What old threads? > > Excuse me, I tought he was having a problem similar to the >

Re: Compare column entries in database query

2007-08-02 Thread Russell Keith-Magee
On 8/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I want to find all entries in a database where two specific fields are > equal: > > mytable.objects.filter(column_a='column_b') At present, the answer is unfortunately 'you can't do this' (unless you use a hack like the one you

Composing an URL using the current search query

2007-08-02 Thread Filipe Correia
Hi, I'm struggling with an issue similar to the one presented on this thread: http://groups.google.com/group/django-users/browse_frm/thread/536c0a7ba9f8c155/5d61867c4339e4d8 In a view, getting the various elements that compose the current URL's query string is easy, one only needs to use the

Re: Model Examples page, gone?

2007-08-02 Thread Nis Jørgensen
Nimrod A. Abing skrev: > Hello, > > I was just going through the current docs and wanted to look up some > examples and I noticed that the Model Examples page is gone: > > http://www.djangoproject.com/documentation/models/ > > though it can still be accessed in the older versions of the docs. > >

how to do filtring drop down list by other drop down list in django admin

2007-08-02 Thread Setas
2 foreignkeys in one model.. they are related by many to one class Theaters(models.Model): class Halls(models.Model): .. Theaterss = models.ForeignKey(Theaters) . class Repertory(models.Model):

Compare column entries in database query

2007-08-02 Thread [EMAIL PROTECTED]
Hi everybody! I want to find all entries in a database where two specific fields are equal: mytable.objects.filter(column_a='column_b') But this gives me no results at all. I now managed to get it done with a .extra(), but I was wondering if this is the only possible solution. All examples in

Trigger a django user password change...

2007-08-02 Thread Jens Diemer
I would like to do something if the django user password has been set or update. So i trigger signals.post_save with the User class, like this: === from django.db.models import signals from django.dispatch import

Re: Trouble with installing stockphoto

2007-08-02 Thread yml
Hello, It looks like your "base.html" is in a folder which is not defined in the "TEMPLATE_DIRS". In order to fix your problem you should add this directory to this tuple. I hope that help On Aug 2, 5:38 am, Danno <[EMAIL PROTECTED]> wrote: > So I was able to import everything it looks like ok,

Re: Something like a mini Crystal Reports with Django

2007-08-02 Thread Mir Nazim
Anybody has any views on this. -- PS: posting just to keep this topic fresh On Jul 31, 4:28 pm, Mir Nazim <[EMAIL PROTECTED]> wrote: > Hello > > I was wondering has anybody done application that was something like a > mini crystal reports. Generating a report based of model items >

Model Examples page, gone?

2007-08-02 Thread Nimrod A. Abing
Hello, I was just going through the current docs and wanted to look up some examples and I noticed that the Model Examples page is gone: http://www.djangoproject.com/documentation/models/ though it can still be accessed in the older versions of the docs.

value for choices arguments for newforms.MultipleSelectField

2007-08-02 Thread james_027
hi somewhere on the django documentation I saw the choice provided for MultipleSelectField is from a Database but I can't recall where I read it but I do it this way, let me know if there are better alternative items = newforms.MultipleChoiceField(choices = [('i.id', 'i.name') for i in

Re: mod_python apache2 path problem

2007-08-02 Thread Giorgio Salluzzo
On Jul 31, 12:25 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Huh. What bug, strange behaviour in mod_python? What old threads? Excuse me, I tought he was having a problem similar to the following: http://www.modpython.org/pipermail/mod_python/2003-July/013947.html We had the same and I

Re: Django equivalent of ROR flash

2007-08-02 Thread Jarek Zgoda
[EMAIL PROTECTED] napisał(a): >> Django provides something similar in the authentification app, but it >> works only the the authentificated users : >> >> http://www.djangoproject.com/documentation/authentication/#messages > > What would be the best way to implement something like this in

RE: Trouble with installing stockphoto

2007-08-02 Thread mojo
You should create this base.html template. This is not self extension. There are more problems with win32, i.e. file paths. -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Danno Sent: Thursday, August 02, 2007 7:39 AM To: Django users

Re: Django equivalent of ROR flash

2007-08-02 Thread Fabien Schwob
Hello, > Does Django have this > http://api.rubyonrails.com/classes/ActionController/Flash.html Django provides something similar in the authentification app, but it works only the the authentificated users : http://www.djangoproject.com/documentation/authentication/#messages -- Fabien

Django equivalent of ROR flash

2007-08-02 Thread james_027
Does Django have this http://api.rubyonrails.com/classes/ActionController/Flash.html Thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: pydev

2007-08-02 Thread Nimrod A. Abing
On 8/2/07, eXt <[EMAIL PROTECTED]> wrote: > > Hi > >As I said earlier i don't have (and don't remember) these settings. > But you're right - it was in eclipse.ini. Now I use Eclipse Europa and > Java 6 on Kubuntu (32 bit) and I don't have any errors (even null > references mentioned by

Re: Do I have to send shopping cart data to every template in my app?

2007-08-02 Thread oggie rob
On Aug 1, 11:22 pm, oggie rob <[EMAIL PROTECTED]> wrote: > This is what middleware is made > for.http://www.djangoproject.com/documentation/middleware/ > > -rob Sorry, I have recently been working with shopping carts and had redirection on my brain. Fabien's suggestion is probably what you are

  1   2   >