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

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

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

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): > ... >

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

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

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

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,

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

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

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

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

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: 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-

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

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

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

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 >

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

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

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

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

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

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)

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

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 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

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',

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

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

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

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): > >

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

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: 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

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

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

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

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

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... > >

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

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

Re: Multiple primary keys

2007-09-05 Thread Leo
Lars, have you made any progress on this? I agree that only the 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). I'm trying to convince a team to use Django for new

Re: markdown issue

2007-09-05 Thread [EMAIL PROTECTED]
so great, it is what i wanted now On 9月4日, 下午10时03分, Tim Chase <[EMAIL PROTECTED]> wrote: > > i find this code translate enter once to "" , and enter twice is > > still "". > > i want keep "", ie. enter once i get a "", enter twice i get a > > "" > > is this possible? > > Ah...I misunderstood