Re: jellyroll app update.py

2007-09-05 Thread nostalgicapathy
Chris, In re: this: > In addition, there doesn't seem to be much documnetation on how to set > JELLYROLL_PROVIDERS in settings.py and where to set username & > passwords for services. at least for the delicious portion of the app you would add the following to your settings.py file. It can go a

Re: Getting 2 apps to show on a homepage

2007-09-05 Thread James Bennett
On 9/5/07, Atendo <[EMAIL PROTECTED]> wrote: > urlpatterns = patterns('', > (r'^$', 'myproj.app1.views.index'), > (r'^$', 'myproj.app2.views.index'), This won't work because you only get one view function per URL; the same URL can't simultaneously route to multiple different views. Generally the

Re: Error when creating thumbnails based on a class that is edit_inline

2007-09-05 Thread Greg
Here is my model file that contains a save method - When I do a assert False, self.name from within my if statement in my save method I get the name of the style. However, when I do a assert False, self.image I get nothing. That only happens when I edit the style from within a collection using e

Getting 2 apps to show on a homepage

2007-09-05 Thread Atendo
I have one project with two apps. I want to show a homepage that pulls in the two apps as homepage widgets. I tried the following approach... urlpatterns = patterns('', (r'^$', 'myproj.app1.views.index'), (r'^$', 'myproj.app2.views.index'), ... ...but what ended up happening is that only the bl

Re: Q lookup with both OR and AND

2007-09-05 Thread [EMAIL PROTECTED]
> Try replacing the ampersand with a comma and that /might/ do it. I tried this but it didn't work. I'm still getting tickets where private is true or false, and user is snewman: Ticket.objects.filter(Q(private__exact=False) | Q(private__exact=True), Q(assigned_user__username__exact='snewman'))

Re: Q lookup with both OR and AND

2007-09-05 Thread JustJohnny
It looks like your syntax is off a little: Try replacing the amersand with a comma and that /might/ do it. On Sep 5, 10:58 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm having trouble piecing together a query for this model: > > class Ticket(models.Model): > ... > assigned_use

Re: Q lookup with both OR and AND

2007-09-05 Thread Kevin Menard
Without looking into your problem in any real detail (sorry, late here), you could probably apply DeMorgan's Law and come up with a single predicate that you use throughout your query, using negation as appropriate. That may help you out. -- Kevin On 9/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED

Q lookup with both OR and AND

2007-09-05 Thread [EMAIL PROTECTED]
I'm having trouble piecing together a query for this model: class Ticket(models.Model): ... assigned_user = models.ForeignKey(User) name = models.CharField(maxlength=255) private = models.BooleanField(default=False) I'm trying to get all the tickets where the tickets are not priv

Re: hai am new one to django

2007-09-05 Thread James Bennett
On 9/5/07, Brett Parker <[EMAIL PROTECTED]> wrote: > If those of us in Europe believed everything we read in the papers we'd > get the impression that the American way was to start war with anyone > that wasn't American and had oil... (of course, we don't all believe > that, but lets just change f

Re: hai am new one to django

2007-09-05 Thread Brett Parker
On Wed, Sep 05, 2007 at 12:40:06PM -0500, Tim Chase wrote: > It has more letters; it's python; it's not Ruby; it doesn't steal > candy from small children; it fights for truth, justice, and the > American way. Woah - I didn't realise that it was fighting for the American way, truth and justice, c

Translating strings with placeholder in template

2007-09-05 Thread Charles Chan
Hi, I am trying to internationalize the following string: Please Login before you proceed. I am thinking of creating something like: msgid "login.before.you.proceed %(login_url)s" msgstr "Please Login before you proceed" I think this would work with Python code. However, can I do the translati

need help for transaction with postGreSql....

2007-09-05 Thread sush
I just wanna know how to do the trasnsaction with postgresql. If anyone has any clue / document, or has some working code on this issue, just send me the related excerpts. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Django on Nokia 770?

2007-09-05 Thread James Bennett
On 9/5/07, Steve Bergman <[EMAIL PROTECTED]> wrote: > Does anyone have comments about the possibility of running a django > server on the Nokia 770? Is it possible? I have a simple app that I > want to demo on it with both the django server and the browser running > on the same device. Some qui

Re: Django on Nokia 770?

2007-09-05 Thread Russell Keith-Magee
On 9/6/07, Steve Bergman <[EMAIL PROTECTED]> wrote: > > Does anyone have comments about the possibility of running a django > server on the Nokia 770? Is it possible? I have a simple app that I > want to demo on it with both the django server and the browser running > on the same device. I don'

Re: How run a python script as standalone? (aka: Why django need the DJANGO_SETTINGS_MODULE anyway???)

2007-09-05 Thread Russell Keith-Magee
On 9/6/07, mamcxyz <[EMAIL PROTECTED]> wrote: > > Also, why is necesary the DJANGO_SETTINGS_MODULE magic after all??? Something needs to tell django which applications are installed, and where the templates are, and which database to use - you know, the settings. the DJANGO_SETTINGS_MODULE define

Re: Django on Nokia 770?

2007-09-05 Thread Sean Perry
On Sep 5, 2007, at 4:16 PM, Steve Bergman wrote: > > Does anyone have comments about the possibility of running a django > server on the Nokia 770? Is it possible? I have a simple app that I > want to demo on it with both the django server and the browser running > on the same device. > Shoul

Django on Nokia 770?

2007-09-05 Thread Steve Bergman
Does anyone have comments about the possibility of running a django server on the Nokia 770? Is it possible? I have a simple app that I want to demo on it with both the django server and the browser running on the same device. --~--~-~--~~~---~--~~ You received

Re: jellyroll app update.py

2007-09-05 Thread Chris H.
I've added a bit more information to a similar issue on the google code site: http://code.google.com/p/jellyroll/issues/detail?id=1 Errors I've gotten are: * ImportError: No module named jellyroll.providers --fixed with sys.path.append() * EnvironmentError: Environment variable DJANGO_SETTINGS_

Re: Djangonauts in Sweden?

2007-09-05 Thread Nis Jørgensen
Emil Björklund skrev: > Hi folks, > > Two part post: > > 1. Just wanted to introduce myself: Emil, web designer/developer from > Malmö in southern Sweden, studying Information Architecture at Malmö > University where I also work as a tutor. > Come mostly from a php background, not much of a progra

How run a python script as standalone? (aka: Why django need the DJANGO_SETTINGS_MODULE anyway???)

2007-09-05 Thread mamcxyz
I wanna debug inside a IDE (komodo 4) my test cases for django, so I'm looking for a way to simply run the script from the IDE and step in as usual. This is my layout: F:\Proyectos\Python\jhonWeb <= root inside it: \demo\ THE SITE with the settings file \shared\ shared models I have develop to

forms, views and foreign key

2007-09-05 Thread Oleg Korsak
Hello. I have such model class in tours/models.py: from django.db import models from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import User class Profile(models.Model): regnum = models.CharField(_('registration number'), maxlength=32) pvnnum

Re: Integrating Django with existing site.

2007-09-05 Thread Steve Potter
On Sep 5, 11:31 am, "Dorai Thodla" <[EMAIL PROTECTED]> wrote: > Steve, > This is a great idea that may work as a migration strategy from lot of other > portals/content management systems or even websites. I wonder whether there > is some wikispace where we can preserve migration strategies. > >

Re: Unicode problem when rendering a template

2007-09-05 Thread wolfds
Can we see the model definition for Reward? --~--~-~--~~~---~--~~ 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, se

Re: Hierarchical menus

2007-09-05 Thread Chris Moffitt
I've used satchmo before as an example but here it is again. Here is the model that describes the category- http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/product/models.py Here is the template to display the menu- http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo

Re: update 2nd model via first when saved

2007-09-05 Thread Brian Morton
class Hardware(models.Model): blah = models.CharField() ... #called every time the model instance is saved def save(): #if you want many hardware history records for a piece of hardware history = HardwareHistory.create(hardware=self, ...) #if you only want

Re: Unicode Type Error when adding M2M field

2007-09-05 Thread wolfds
wolfds schrieb: > Your class Alert should have defined a method __unicode__() to return > a Unicode represantation. If so, you can use > > def __unicode__(self): > return smart_unicode(self.advert) > > in the class Rank_alert. sorry for typos - again: Your class Advert should have defined

Re: Hierarchical menus

2007-09-05 Thread wolfds
Itereate over the categories. For each category fetch the range set which belongs to it. see http://www.djangoproject.com/documentation/db-api/#backward --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: Unicode Type Error when adding M2M field

2007-09-05 Thread wolfds
Your class Alert should have defined a method __unicode__() to return a Unicode represantation. If so, you can use def __unicode__(self): return smart_unicode(self.advert) in the class Rank_alert. --~--~-~--~~~---~--~~ You received this message because you a

Hierarchical menus

2007-09-05 Thread MikeHowarth
I was wondering whether anyone can help me, I'm absolutely stumped where to start creating a hierarchical menu in Django. I've scoured Google and don't seem to be able to find anything to get me started. Basically I'm looking to create a simple list based menu like so: > Home > Category 1 > R

SEX

2007-09-05 Thread sexfrrr
SEX http://www.egoshare.com/f1e27ecf678afc9684311bac9ee98451/65544333rar.html --~--~-~--~~~---~--~~ 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.co

CMS Snapbuilding

2007-09-05 Thread Francisco
Olá, sou usuário do Snapbuilding, um gerenciador de conteúdo desenvolvido pela Snapsystems, estou muito satisfeito, com este sistema, pois atualizo meu site de qualquer lugar, não precisa de conhecimentos profundos em design e programação, possui várias funcionalidades, blog, enquete, formulário d

Re: How to add a non database item to a python model

2007-09-05 Thread shabda
Traceback (most recent call last): File "C:\Python24\lib\site-packages\django\core\handlers\base.py" in get_response 77. response = callback(request, *callback_args, **callback_kwargs) File "C:\Python24\lib\site-packages\django\contrib\auth\decorators.py" in _checklogin 14. return view_func(re

update 2nd model via first when saved

2007-09-05 Thread hotani
I am attempting to avoid writing a custom admin page. There are at most two people that will be updating the database, and this seems like a great job for the django admin area. However, for this to work I need a way to update a 2nd model (a history table) when another model is updated. Is this p

Re: How to add a non database item to a python model

2007-09-05 Thread Alex Koshelev
Show all exception dump --~--~-~--~~~---~--~~ 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 P

Re: How to add a non database item to a python model

2007-09-05 Thread shabda
Oh shucks, since I want to recalculate this attribute each time, I would need this to be in the view function. Still how would I override __init__ in django Models? On Sep 5, 11:10 pm, shabda <[EMAIL PROTECTED]> wrote: > That seems too easy to be true. :). > I have one more query, where should I

Re: How to add a non database item to a python model

2007-09-05 Thread shabda
That seems too easy to be true. :). I have one more query, where should I add this code? Considering this attribute would be used in many views, I am trying to override __init__. def __init__(self, *vargs): models.Model.__init__(self, *vargs) self.my_item_that_doesnt_exist_in_

Re: hai am new one to django

2007-09-05 Thread shabda
http://diveintomark.org/archives/2004/07/06/nfc I was walking across a bridge one day, and I saw a man standing on the edge, about to jump off. So I ran over and said, "Stop! Don't do it!" "I can't help it," he cried. "I've lost my will to live." "What do you do for a living?" I asked. He said

Re: hai am new one to django

2007-09-05 Thread Tim Chase
Given the turn from "a simple request for help" to "help me with my homework because I'm too lazy to type my questions into google", answers have been shifted from "helpful" to somewhere between "acerbically pedantic" and "sleep-deprived lunacy". > thanks for ur help.( i like ur way of answering)

Unicode Type Error when adding M2M field

2007-09-05 Thread Merric Mercer
I have the following model:- class Rank_Advert(models.Model):     advert = models.ForeignKey(Advert)     brand = models.ForeignKey(Brand,verbose_name="brand_owner")     rank= models.IntegerField(default=1,blank=True)     def __unicode__(self):     return self.advert     class Admin:  

Re: Integrating Django with existing site.

2007-09-05 Thread Dorai Thodla
Steve, This is a great idea that may work as a migration strategy from lot of other portals/content management systems or even websites. I wonder whether there is some wikispace where we can preserve migration strategies. Dorai www.thodla.com On 9/5/07, Steve Potter <[EMAIL PROTECTED]> wrote: > >

Re: Integrating Django with existing site.

2007-09-05 Thread Steve Potter
> > Try coding each module as a Django template tag. > Then, create a template that returns an html fragment rather than a > full html page. > Associate each rendered template with a specific URL. > Perhaps something like: > mysite.com/components/module1.html > In Joomla, create a plug-in t

Custom template tags within a textarea field

2007-09-05 Thread MichaelMartinides
Hi, Just to be sure. If I have custom template tags within a TextAreafield of a model. I would do something like to following: def view(request, page): p = Page.objects.get(name=page) t = Template( p.content ) content = t.render() return render_to_response('page.html', {content:content}

Re: Error adding DateField - 'unicode' object has no attribute 'strftime'

2007-09-05 Thread Michael Radziej
Hi Greg, On Wed, Sep 05, Greg wrote: > > Michael, > I'm using sqlite. Thanks for the clarification. I've almost no experience with sqlite, sorry. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 Nürnberg - Tel +49-911-9352-0 - Fax +49-911-9352-100 http://www.noris.de - The

Djangonauts in Sweden?

2007-09-05 Thread Emil Björklund
Hi folks, Two part post: 1. Just wanted to introduce myself: Emil, web designer/developer from Malmö in southern Sweden, studying Information Architecture at Malmö University where I also work as a tutor. Come mostly from a php background, not much of a programmer in any language but I get by on

Unicode problem when rendering a template

2007-09-05 Thread Tipan
I've recently updated our Django source to the latest version which meant implementing the Unicode handling. In the main all went well, although I'm getting a few decode errors such as: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 28: ordinal not in range(128) I have chan

Re: GET and POST in a template

2007-09-05 Thread Jonathan Buchanan
On 9/5/07, Rufman <[EMAIL PROTECTED]> wrote: > > hey > > how can i read the get or post dictionary in a template. i tried > reading it like a session (request.session.) but this doesn't > seem to work. I need to get the value of the parameter to be able to > define what the users sees in the templ

Re: Help with One-to-Many Models

2007-09-05 Thread JimT
Jake, Well that gets me part way there. I wasn't clear that I DO want the hours to display in the business detail in the admin area but only the hours related to this particular business. The hours now show up in my template but again, all the hours show up, not just the records related to this

Re: Error adding DateField - 'unicode' object has no attribute 'strftime'

2007-09-05 Thread Greg
Michael, I'm using sqlite. Lapin, Where in my code do you want me to use smart_str? Thanks On Aug 29, 3:58 am, Michael Radziej <[EMAIL PROTECTED]> wrote: > On Tue, Aug 28, Greg wrote: > > > Hello, > > I have the following code in my models.py file > > > class Orders(models.Model): > > times

Build Your Business With Targeted email leads.

2007-09-05 Thread International Marketing
GetResponse is an easy, web-based email marketing software that delivers your campaigns, offers, newsletters, follow-ups and autoresponder messages. GetResponse provides you with: 1. Unlimited email marketing campaigns, autoresponders, follow-ups, lists and broadcasts. 2. 150+ professionally de

GET and POST in a template

2007-09-05 Thread Rufman
hey how can i read the get or post dictionary in a template. i tried reading it like a session (request.session.) but this doesn't seem to work. I need to get the value of the parameter to be able to define what the users sees in the template. anyone have an idea how i could do this? stephane

Re: hai am new one to django

2007-09-05 Thread Jon Atkinson
> > 4)how django better then ROR ...? > LOL. I recalled an old joke: > Teacher asked the children in class to write a homework on the topic: > "Who is the greatest hero of twentieth century and why it's Lenin?" This reminds me of a post I saw somewhere (maybe it was a comic on xkcd, I don't re

Re: hai am new one to django

2007-09-05 Thread Damodhar
hi, a lot of thanks to u. On Sep 5, 3:27 pm, eXt <[EMAIL PROTECTED]> wrote: > On 5 Wrz, 10:37, Damodhar <[EMAIL PROTECTED]> wrote:> i want to take reaserch > about this topic, and submit report, so canu > > hel pme. > > Are you really going to write the report or you want someone to write > it

Re: Multiple primary keys

2007-09-05 Thread Lars Stavholm
Leo wrote: > Lars, have you made any progress on this? I agree that only the Sorry to say: no progress at all:( > numeric types are interesting as multiple keys, so worrying about > URL encoding is pointless (i.e., there's no reason to worry about > supporting multiple arbitrary-string keys).

Import error in django

2007-09-05 Thread AniNair
Hi... I am using python 2.5.1 with django .97 pre. I am trying to have a page from the url config (r'^users/', include('dbp.users.views.show')), I have my view as from django.http import HttpResponse def show(request): return HttpResponse("some thing here.") on trying to access the page u

Re: Integrating Django with existing site.

2007-09-05 Thread Ray Cote
At 4:59 AM + 9/5/07, Steve Potter wrote: >... you have many different modules, each of them being a separate >application that >functions independently of the others, but they are all displayed on >one page. >I want to be able to convert these modules one by one without having >to replace th

Re: hai am new one to django

2007-09-05 Thread Michael Radziej
On Wed, Sep 05, eXt wrote: > > On 5 Wrz, 10:37, Damodhar <[EMAIL PROTECTED]> wrote: > > i want to take reaserch about this topic, and submit report, so canu > > hel pme. > Are you really going to write the report or you want someone to write > it for you? The latest is my feeling after reading y

Re: hai am new one to django

2007-09-05 Thread eXt
On 5 Wrz, 10:37, Damodhar <[EMAIL PROTECTED]> wrote: > i want to take reaserch about this topic, and submit report, so canu > hel pme. Are you really going to write the report or you want someone to write it for you? The latest is my feeling after reading you post. > 1) how can i install in my s

Re: django checkout doesn't work..

2007-09-05 Thread Devi
Looks like the problem is with my svn client. It works with svn client version 1.2.0, but doesn't work with 1.4.3 The error i'm getting is ... svn: PROPFIND request failed on '/svn/django/trunk' svn: PROPFIND of '/svn/django/trunk': could not connect to server (http://code.djangoproject.com) On

permissions

2007-09-05 Thread Ana
Hi, I'd like to add user permissions to my application. To update, add, and delete objects I use generic views. In my views.py file I've got: [code] @permission_required_with_error('ReservationSlot.can_update', url='ResourceScheduler/error.html', login_url='/ResourceScheduler/ login') def limited

Re: hai am new one to django

2007-09-05 Thread Damodhar
hi also give details about ... how django differ from zend frame work.. thanks On Sep 4, 7:48 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > am new one to django > > welcome > > > am working in php mysql > > I'm sorry ;) > > > me whats django and how its defer from php ruby on rails... > > Django

Re: Signing with mouse

2007-09-05 Thread Florian Lauber
On Tue, Sep 04, 2007 at 08:47:05PM -, Kelsey Ruger wrote: > > [...] utility that will allow a user to > sign > their name with a mouse and save the resulting image for inclusion > in > a PDF. Has anyone heard of something like this? You might be interested in the forthcoming -tag in combinatio

Re: hai am new one to django

2007-09-05 Thread Damodhar
hi thanks for ur help.( i like ur way of answering) i want to take reaserch about this topic, and submit report, so canu hel pme. django is python based frame work , right 1) how can i install in my system can i reun this frame work in windowsOS meachine. ( dont want complete exp just how to

Re: default value in a form

2007-09-05 Thread Rufman
what attributes other than widget does base_fields have...i couldn't find anything in the django docs or on google. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e