Re: Custom widget for a modelform field

2010-03-08 Thread Daniel Roseman
On Mar 9, 7:20 am, Odd wrote: > It works fine if I'm not using a modelform, i.e. > > class MyForm(forms.Form): >    data=forms.CharField(widget=MySelect()) > > Can one not use a custom widget in a modelform? > > Thanks. The 'widgets' argument is new in the development version, it's not in 1.1. (I

Re: Custom widget for a modelform field

2010-03-08 Thread andreas schmid
i have customized multiselect widget on a model field and it works like this: class MyModelForm(ModelForm): field = ModelMultipleChoiceField(MyOtherModel.objects, required=False, widget=MultipleSelectWithPop) class Meta: model = MyModel let me know! Odd wrote: > It works

Re: Custom widget for a modelform field

2010-03-08 Thread Odd
It works fine if I'm not using a modelform, i.e. class MyForm(forms.Form): data=forms.CharField(widget=MySelect()) Can one not use a custom widget in a modelform? Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Re: Django registration not showing logged in on all pages

2010-03-08 Thread Kenneth Gonsalves
On Tuesday 09 Mar 2010 11:01:59 am Duvalfan23 wrote: > Not that Im aware of. Im using the built in auth methods as of now for > login and logout. Im kind of a django newbie. Im not quite sure what > you mean by that. Ill try to go look up some documentation on it But > if you have any great info on

Re: Extending a custom built API

2010-03-08 Thread Nick
Thanks, I did a little changing around but what you recommended was spot on. Here is the final view def slideshowAPI2(request): error = False if 'id' in request.GET and request.GET['id']: id = request.GET.get('id') ids = id.split(',') object = slideshow.objects.filt

Re: Django registration not showing logged in on all pages

2010-03-08 Thread Duvalfan23
Not that Im aware of. Im using the built in auth methods as of now for login and logout. Im kind of a django newbie. Im not quite sure what you mean by that. Ill try to go look up some documentation on it But if you have any great info on that please let me know. Thanks!! On Mar 9, 12:23 am, Kenne

Re: Django registration not showing logged in on all pages

2010-03-08 Thread Kenneth Gonsalves
On Tuesday 09 Mar 2010 7:23:35 am Duvalfan23 wrote: > I have started a Django application with the Django Registration from > GoogleCode included also. I built a menu that has certain menu items > only viewable by logged in users. My login page is ~/login/ and > register page is ~/register/. Whenev

Re: modes.ManyToManyField and Users

2010-03-08 Thread krayel
Nevermind, figured it out. On Mar 8, 2:22 pm, krayel wrote: > Right now I have model which is basically: > > class Student(models.Model): >   name = models.CharField(max_length=150) >   id = models.IntegerField(primary_key=True) > > and another model which refers to it: > > class ServiceHours(mod

Re: How to use pre-built HTML forms in Django

2010-03-08 Thread MMRUser
Thanks another doubt,what about the css mappings class="field text medium" do they also need to include in the class definition in Django. On Mar 9, 9:21 am, rebus_ wrote: > On 9 March 2010 05:04, MMRUser wrote: > > > > > I have an pre-built HTML form (means I design the HTML form > > separately

Re: How to use pre-built HTML forms in Django

2010-03-08 Thread rebus_
On 9 March 2010 05:04, MMRUser wrote: > I have an pre-built HTML form (means I design the HTML form > separately) and I need to reuse it with Django form class > (django.forms), So how do I incorporate my HTML form with Django form > class. for example > > HTML: > > >   >  Username >  * >   >   >

Re: join channel #django

2010-03-08 Thread rebus_
On 9 March 2010 05:02, sajuptpm wrote: > I cant join #django, > > [09:20] [Channel] Cannot join channel (+r) - you need to be identified > with services > > What is the problem?. How join this channel?. What are the other > popular django channels?. > > Please help me. > > -- > You received this m

join channel #django

2010-03-08 Thread sajuptpm
I cant join #django, [09:20] [Channel] Cannot join channel (+r) - you need to be identified with services What is the problem?. How join this channel?. What are the other popular django channels?. Please help me. -- You received this message because you are subscribed to the Google Groups "Dj

How to use pre-built HTML forms in Django

2010-03-08 Thread MMRUser
I have an pre-built HTML form (means I design the HTML form separately) and I need to reuse it with Django form class (django.forms), So how do I incorporate my HTML form with Django form class. for example HTML: Username * How do I map this HTML in to Django form definition, I k

Django registration not showing logged in on all pages

2010-03-08 Thread Duvalfan23
I have started a Django application with the Django Registration from GoogleCode included also. I built a menu that has certain menu items only viewable by logged in users. My login page is ~/login/ and register page is ~/register/. Whenever I log in, the logged in menu shows up on the Login and Re

multipart/form-data and HttpResponse

2010-03-08 Thread inna
Hi, How can I return both an image file and some text fields with HttpResponse? It seems that the image file gets stripped under my current method. Here is an excerpt: photofile = open(photo_filepath, "rb") data = {} data['msg1'] = 'testmsg' data['msg2'] = 'testm

Re: Adding a new convenience filter 'contains_any'

2010-03-08 Thread Russell Keith-Magee
On Tue, Mar 9, 2010 at 3:24 AM, Phlip wrote: >> > And if the PEP8 told you to ... just jump off a cliff... would you? >> >> Sounds like you might benefit from actually reading it: > > This thread arc is about me lamenting the positive value of style > guides, even those with wrong line-items. > >

Re: Extending a custom built API

2010-03-08 Thread felix
you are already basically there id = request.GET.get('id') if id: ids = id.split(',') slideshows = slideshow.objects.filter(id__in=ids) then returns that as json however you like On Mar 8, 11:41 pm, Nick wrote: > I am working on an api that outputs a list of JSON based on certain > crite

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread Graham Dumpleton
On Mar 9, 9:50 am, felix wrote: > thanks for the offer, but as I said : the problem is long since > solved.  it was a circular import problem. > I reworked the imports and its gone. > > my question was:  how could it have happened on the staging server and > not on the dev server ? As I said be

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread felix
thanks for the offer, but as I said : the problem is long since solved. it was a circular import problem. I reworked the imports and its gone. my question was: how could it have happened on the staging server and not on the dev server ? I was just asking around to see if anybody had seen that

Extending a custom built API

2010-03-08 Thread Nick
I am working on an api that outputs a list of JSON based on certain criteria. Currently if someone enters http://example.mysite/slideshows/api?id=1 it returns a JSON serialized output of the slideshow with that ID. What I would like to do is allow for multiple ids, so http://example.mysite/slides

Re: modify date in django twitter app

2010-03-08 Thread Nick
I think this may help http://www.magpiebrain.com/2005/08/21/formatting-dates-with-django/ try using strftime and formatting from there. On Mar 8, 3:16 pm, "het.oosten" wrote: > I forgot to mention that my desired output of the date is: > 2010-02-22 20:46:03 > > On 8 mrt, 22:13, "het.oosten" wr

Re: how to QuerySet.add(multiple objects)

2010-03-08 Thread Sentenza
my_fruit.apple_plant.fruit_set.all().update(weird_plant = weird_plant) cheers. On Mar 8, 7:22 pm, Sentenza wrote: > Hi, > > i'd like to hang some fruits belonging to an 'apple plant' also onto > another 'weird plant' -- for this i'm iterating over all fruits on the > apple plant, like this (i'm s

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread Graham Dumpleton
It is almost impossible to suggest anything about your problem as you don't post the complete details of the actual errors you are getting. If you want solutions, you need to provide that extra information so we don't have to imagine what the Python exception and traceback you are getting is. FWIW

Re: modify date in django twitter app

2010-03-08 Thread het.oosten
I forgot to mention that my desired output of the date is: 2010-02-22 20:46:03 On 8 mrt, 22:13, "het.oosten" wrote: > I am getting somewhere now: > > import datetime > import time > import twitter > > tweet  = twitter.Api().GetUserTimeline('username', count=3) > for s in tweet: >         s.date =

Re: modify date in django twitter app

2010-03-08 Thread het.oosten
I am getting somewhere now: import datetime import time import twitter tweet = twitter.Api().GetUserTimeline('username', count=3) for s in tweet: s.date = datetime.datetime(*(time.strptime( s.created_at,"%a %b %d %H:%M:%S + %Y" )[0:6])) print [x.text for x in tweet] print [y.date for

modes.ManyToManyField and Users

2010-03-08 Thread krayel
Right now I have model which is basically: class Student(models.Model): name = models.CharField(max_length=150) id = models.IntegerField(primary_key=True) and another model which refers to it: class ServiceHours(models.Model): students = models.ManyToManyField(Student) category = models.

Re: Adding a new convenience filter 'contains_any'

2010-03-08 Thread Phlip
> > And if the PEP8 told you to ... just jump off a cliff... would you? > > Sounds like you might benefit from actually reading it: This thread arc is about me lamenting the positive value of style guides, even those with wrong line-items. Nobody here has said to get creative with any style guide

Problems with django-ajax-filtered-fields and ManyToManyByRelatedField

2010-03-08 Thread Sandra Django
Hi friends, someone has worked with django-ajax-filtered-fields? I'm having problems with ManyToManyByRelatedField. The syntax is very simple, I think that it isn't the problem. I have an "Author" class that it has a ForeignKey field named "type", and I want to filter for this field in the form. In

Odd behaviour with forms and i18n

2010-03-08 Thread Martin Ostrovsky
Perhaps somebody could explain exactly what's going on. I have a form whose labels are translatable strings: class MyForm(forms.Form): field1 = forms.CharField(label=_('Label 1'), max_length=20) I generated the .po files, supplied the translations, generated the .mo files, added the proper m

validation on many2many fields

2010-03-08 Thread Alessandro Pasotti
Hello, I need to do both form level and model level validation (my app will be called by XML-RPC and it will also be used with the normal admin GUI) on a m2m relation. The problem is that I have a m2m between "Items" and "Categories", "Categories" are organized in a tree with MPTT django-mptt. I

Re: Scrape a file, then put it in the django database

2010-03-08 Thread Michael Lissner
Thanks Daniel. I guess that part makes sense, but what I'd really like to do is use the FileField itself to place the file in the right place. I thought that with a file that was submitted from a form field, that this was possible (and indeed the intended purpose). I'm confused why it seems like I

how to QuerySet.add(multiple objects)

2010-03-08 Thread Sentenza
Hi, i'd like to hang some fruits belonging to an 'apple plant' also onto another 'weird plant' -- for this i'm iterating over all fruits on the apple plant, like this (i'm starting with one apple as my_fruit): for more_fruit in my_fruit.apple_plant.fruit_set.all(): weird_plant.fruit_set.add(m

verbose_name for ManyToManyField

2010-03-08 Thread summea
I'm working my way through the Django Book and creating a simple books app inside the tutorial project. I have the following class: class Book(models.Model): ... def get_authors(self): return self.authors.all() And I am using that get_authors() method to find all authors for a p

Re: Migration sqlite3 (localhost) to MySQL (Shared-Hosting)

2010-03-08 Thread Daniel Roseman
On Mar 8, 5:10 pm, Egon Frerich wrote: > Daniel Roseman schrieb: > | On Mar 8, 3:02 pm, Egon Frerich wrote: > |> Hello, > |> > |> is there a HowTo for migrating a working test environment on localhost > |> with sqlite3 to a shared-hosting provider on Apache with MySQL? Chapter > |> 12 of the boo

Re: django & wsgi: what is the preferred webserver?

2010-03-08 Thread Javier Guerra Giraldez
On Sun, Mar 7, 2010 at 4:21 PM, Shawn Milochik wrote: > Have a look here: > > http://code.djangoproject.com/wiki/ServerArrangements > > In general, you should have two Web servers (e.g. Apache and nginx or > lighttpd). Apache (with mod_wsgi) to serve Django and nginx or lighttpd to > serve the sta

Re: Adding a new convenience filter 'contains_any'

2010-03-08 Thread James Bennett
On Mon, Mar 8, 2010 at 11:11 AM, Phlip wrote: > And if the PEP8 told you to ... just jump off a cliff... would you? Sounds like you might benefit from actually reading it: http://www.python.org/dev/peps/pep-0008/ -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Re: Adding a new convenience filter 'contains_any'

2010-03-08 Thread Phlip
> In this case, it's not just a team style guide - it's PEP8, which clearly > says: And if the PEP8 told you to ... just jump off a cliff... would 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

Re: Migration sqlite3 (localhost) to MySQL (Shared-Hosting)

2010-03-08 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel Roseman schrieb: | On Mar 8, 3:02 pm, Egon Frerich wrote: |> Hello, |> |> is there a HowTo for migrating a working test environment on localhost |> with sqlite3 to a shared-hosting provider on Apache with MySQL? Chapter |> 12 of the books tell

Re: Python's Class members ...

2010-03-08 Thread JF Simon
Thanks for your *really* interesting explanations. It seems more clear to me and I'm going to read all about derscriptors ! Python is a facinating language ... On 8 mar, 09:16, Masklinn wrote: > On 8 Mar 2010, at 09:01 , JF Simon wrote: > > > > > Hi dudes, > > > My object seems mysterious, as is

Re: Erro ao tentar importar DjangoGateway

2010-03-08 Thread Edgard Matos
Obrigado pela resposta Jorge! Eu instalei o Django através da seguinte instrução: python setup.py install --disable-ext Não instalei através do easy_install por não estar com o compilador do c aqui meu OSX. O engraçado é que se eu for no console do python e realizar o import, o import é feito sem

Re: radio on admin

2010-03-08 Thread gustavo
Sure Daniel, I have the admin showing only the "tipo"s label, not the choices! On 8 mar, 13:23, Daniel Roseman wrote: > On Mar 8, 4:12 pm, gustavo wrote: > > > > > Hello folks, > > > I am having a hard time trying to use a radio button field on admin. > > > I am using: > > > tipo = models.Integ

Re: ValueError, The view django_bookmarks.bookmarks.views.user_page didn't return an HttpResponse object.

2010-03-08 Thread Naveen Reddy
heres my code, but still its not working: from django.http import HttpResponse, Http404 from django.contrib.auth.models import User from django.template import Context from django.template.loader import get_template def main_page(request): template = get_template('main_page.html') variabl

Re: radio on admin

2010-03-08 Thread Daniel Roseman
On Mar 8, 4:12 pm, gustavo wrote: > Hello folks, > > I am having a hard time trying to use a radio button field on admin. > > I am using: > > tipo = models.IntegerField( >                                max_length=1, >                                choices = IMAGEM_TIPOS_CHOICES, >              

Re: gintare

2010-03-08 Thread Simon Brunning
On 7 March 2010 09:45, gintare wrote: > Hello, > > Is it possible in python access name of variable? "The same way as you get the name of that cat you found on your porch: the cat (object) itself cannot tell you its name, and it doesn't really care -- so the only way to find out what it's called

radio on admin

2010-03-08 Thread gustavo
Hello folks, I am having a hard time trying to use a radio button field on admin. I am using: tipo = models.IntegerField( max_length=1, choices = IMAGEM_TIPOS_CHOICES, ) where IMAGEM_TIPOS_CHOICES is a

Re: Migration sqlite3 (localhost) to MySQL (Shared-Hosting)

2010-03-08 Thread Daniel Roseman
On Mar 8, 3:02 pm, Egon Frerich wrote: > Hello, > > is there a HowTo for migrating a working test environment on localhost > with sqlite3 to a shared-hosting provider on Apache with MySQL? Chapter > 12 of the books tells nothing about migrating the database. I cannot > find something in the docume

Re: Database redesign for "user" table

2010-03-08 Thread Daniel Roseman
On Mar 8, 3:01 pm, Derek wrote: > I am working with a legacy database and would appreciate some advice. > > I have an existing "user" table, with some fields that overlap with the > design of Django's "user" table, and some fields that are "extra" to it.  I > understand that I can use Django's "us

Re: Prefixing an argument to date-based generic views

2010-03-08 Thread GJCGJC
Okay, here's where I've got so far. My problem with this is that, as will be immediately apparent, There's an awful lot being repeated here: from django.conf.urls.defaults import * from newssite.models import Entry, Category def story_archive(request, cat): # Look up the category (and raise

Migration sqlite3 (localhost) to MySQL (Shared-Hosting)

2010-03-08 Thread Egon Frerich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, is there a HowTo for migrating a working test environment on localhost with sqlite3 to a shared-hosting provider on Apache with MySQL? Chapter 12 of the books tells nothing about migrating the database. I cannot find something in the document

Database redesign for "user" table

2010-03-08 Thread Derek
I am working with a legacy database and would appreciate some advice. I have an existing "user" table, with some fields that overlap with the design of Django's "user" table, and some fields that are "extra" to it. I understand that I can use Django's "user" table and extend it to include these e

Re: Erro ao tentar importar DjangoGateway

2010-03-08 Thread Jorge Silva
Esse erro indica que o módulo PyAMF não está na PYTHON_PATH. Podes tentar adicioná-lo manualmente mas o ideal é usar o método easy_install que está descrito em http://pyamf.org/install.html Podes descrever o modo como instalaste o PyAMF? 2010/3/8 Edgard Matos > Caros, > > Estou tentando fazer

Re: how to start with django

2010-03-08 Thread Shawn Milochik
It all depends. Do you have a specific project you would like to develop with Django, or do you just want to generally learn how to use it for projects you haven't thought of yet? If you know exactly what you want to do, read "The Definitive Guide to Django, Second Edition" (cover to cover)

Erro ao tentar importar DjangoGateway

2010-03-08 Thread Edgard Matos
Caros, Estou tentando fazer uns testes com o PyAmf. Instalei a biblioteca normamente. Sendo que quando tento importar seus pacotes, não consigo. . Error was: cannot import name DjangoGateway O meu gateway está assim: from pyamf.remoting.gateway import DjangoGateway import TesteAMF.cadastros.mode

Re: unique slug creation and check

2010-03-08 Thread andreas schmid
it looks like what i want to do. did you set the slug field as blank=True or null=True? adamalton wrote: > Here's some code that I wrote a few days ago: > > class MyModel(models.Model): > #various fields and stuff here > > def save(self, *args, **kwargs): > if not self.slug: >

Re: is there any possibility for two settings.py

2010-03-08 Thread Gustavo Narea
Have a look at: http://packages.python.org/twod.wsgi/manual/paste-factory.html#multiple-configuration-files On Mar 8, 7:06 am, chiranjeevi muttoju wrote: > Hi friends, > i have two apps in my project, and i want to use two different settings for > each app. it means same project but i sud run tho

Re: is there any possibility for two settings.py

2010-03-08 Thread Shawn Milochik
You can definitely do this. Say you have a project called myproject, and apps named app1 and app2. You can do this (development example -- don't use runserver in production): ./manage.py runserver --settings=myproject.app1.settings 127.0.0.1:8080 ./manage.py runserver --settings=myproject.a

Re: unique slug creation and check

2010-03-08 Thread adamalton
Here's some code that I wrote a few days ago: class MyModel(models.Model): #various fields and stuff here def save(self, *args, **kwargs): if not self.slug: self.slug = self.make_slug() super(Project, self).save(*args, **kwargs) def make_slug(self):

Re: admin rows aren't ordered as expected

2010-03-08 Thread derek
On Mar 8, 2:46 pm, Wim Feijen wrote: > Hello, > > In my admin interface, the data isn't ordered as expected. What I get > is: > Provincie/Land   Type > Limburg     Provincie > Groningen  Provincie > Utrecht      Provincie > etc. > which clearly isn't alphabetical order, while I do specify that > p

Re: how to start with django

2010-03-08 Thread David Talbot
I would recommend the tutorial at http://docs.djangoproject.com/en/1.1/intro/tutorial01/ if you are just beginning - it gives a very good overview of the main features and programming ideas. On Mar 8, 7:47 am, Subhransu Sekhar Mishra wrote: > hi,i am subhransu and new to django . i want to know

Re: Maintaining Continuity (after editing) in the Admin interface?

2010-03-08 Thread derek
On Mar 8, 8:58 am, Russell Keith-Magee wrote: > On Mon, Mar 8, 2010 at 2:24 PM, Derek wrote: > > I have noticed that, if a change list has been filtered before a record is > > edited, the filter is not restored after the editing operation is complete. > > > a. Is there a way to automatically rest

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread felix
On Mar 8, 1:25 am, Graham Dumpleton wrote: > You don't say anything about what hosting mechanisms you are using for > each. local: django's runserver staging: mod_wsgi apache one thing I should do is test locally using wsgi Do you have any suggestions regarding question 2: how can I do a qui

Thread safe language switching?

2010-03-08 Thread Plovarna
Hello, I just developing my first aplication with internationalization. I need to get all verbose_name values of the model for each language defined in settings.LANGUAGES. I do it by this code defined inside model method : current_lang = get_language() names = {} for lang in settings.LA

Re: relative links to css, images, javascript -> problem

2010-03-08 Thread Dylan Evans
I use a STATIC variable in templates which i set in settings.py which points to the appropriate server or path. So the link is and STATIC is something like STATIC="192.168.1.5:8001" Of course i use lighttpd for static files On Mon, Mar 8, 2010 at 10:05 PM, Martin N. wrote: > I encountered probl

admin rows aren't ordered as expected

2010-03-08 Thread Wim Feijen
Hello, In my admin interface, the data isn't ordered as expected. What I get is: Provincie/Land Type Limburg Provincie Groningen Provincie Utrecht Provincie etc. which clearly isn't alphabetical order, while I do specify that provinces should be ordered that way. In my python manage.py

Re: how to start with django

2010-03-08 Thread jimgardener
grab the ebook written by James Bennet, one of the best ever written Subhransu Sekhar Mishra wrote: > hi,i am subhransu and new to django . i want to know how to start > django ?i have not done any project before. -- You received this message because you are subscribed to the Google Groups "Dj

Re: relative links to css, images, javascript -> problem

2010-03-08 Thread Carlos Ricardo Santos
I Just add a "site_media" path to urls.py *site_media = os.path.join( os.path.dirname(__file__), 'site_media' )* *(r'^site_media/(?P.*)$', 'django.views.static.serve', { 'document_root': site_media }),* Add to settings.py: *MEDIA_URL = '/site_media/'* and then: ** * * * * On 8 March 2010 12:0

relative links to css, images, javascript -> problem

2010-03-08 Thread Martin N.
I encountered problems when I try to adopt HTML page layouts into django templates. These HTML files often reference their CSS files like or because they expect these files (and images, javascript, ...) in a location relative to the current HTML document. Can I use such HTML and CSS in django w

Re: django vs tornado

2010-03-08 Thread Kenneth Gonsalves
On Monday 08 Mar 2010 3:09:51 pm Kenneth Gonsalves wrote: > > I'm testing django on tornado and didn't find any issue using the > > admin interface > > which uses csrf_token. I'm using latest django from svn and latest > > tornado from git. > > > > I last used the latest django and tornado about

ANN: twod.wsgi -- Better WSGI support for Django

2010-03-08 Thread Gustavo Narea
Hello, everybody. I'm very pleased to announce the first alpha release of twod.wsgi, a library to make WSGI a first-class citizen in Django applications. twod.wsgi allows Django developers to take advantage of the huge array of existing WSGI software, to integrate 3rd party components which suit

how to add author to entry,newbie doubt about IntegrityError

2010-03-08 Thread jimgardener
hi, I am more or less a beginner with django and databases.I was trying to set the author field of an entry from the request.user instead of letting the user select from a drop down list of users.I designed the models like class Entry(models.Model): pub_date=models.DateField(default=date.toda

Re: modify date in django twitter app

2010-03-08 Thread het.oosten
Thank you for the reply. When i add the [0] to tweet, the date conversion is only applied to the last tweet On 7 mrt, 23:24, Daniel Roseman wrote: > On Mar 7, 9:57 pm, "het.oosten" wrote: > > > > > I am almost done implementing tweets on my site using a tutorial which > > a found > > here:h

Re: is there any possibility for two settings.py

2010-03-08 Thread chiranjeevi muttoju
ya but i want to run both app separately means like different servers. we sud b able to stop one while other is still running. finally like two different projects. ok. is it possible..? On Mon, Mar 8, 2010 at 4:50 PM, Atamert Ölçgen wrote: > On Monday 08 March 2010 13:08:23 chiranjeevi muttoju w

Re: is there any possibility for two settings.py

2010-03-08 Thread Atamert Ölçgen
On Monday 08 March 2010 13:08:23 chiranjeevi muttoju wrote: > we have two applications, what we want to do is, one app should run at one > address and other app should run at different address. this is my > requirement. is it possible to put those two apps in the same > project...?(different apps b

Re: is there any possibility for two settings.py

2010-03-08 Thread chiranjeevi muttoju
we have two applications, what we want to do is, one app should run at one address and other app should run at different address. this is my requirement. is it possible to put those two apps in the same project...?(different apps but same project, we sud be able to run both apps separately with the

Re: how to start with django

2010-03-08 Thread schms
I found the following link useful: http://www.djangobook.com/ There is a nice tutorial: http://docs.djangoproject.com/en/dev/intro/tutorial01/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@go

Re: how to start with django

2010-03-08 Thread Jorge Silva
Read the Django Documentation. It is very well writen and contains a lot of useful examples. On Mon, Mar 8, 2010 at 7:47 AM, Subhransu Sekhar Mishra < sanu.innovat...@gmail.com> wrote: > hi,i am subhransu and new to django . i want to know how to start > django ?i have not done any project before

Using Cheetah Templates in django

2010-03-08 Thread srini
hi all, do anybody think that Using Cheetah Templates in django is more than any normal Html 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-us...@googlegroups.com. To unsubscribe from thi

Custom widget for a modelform field

2010-03-08 Thread Odd
I'm trying to write a custom select widget for a modelform field, but the render method of the widget doesn't seem to get called. This is how I define the modelform: class MyForm(ModelForm): class Meta: model=MyModel fields=('data',) widgets = { 'data': MyS

unique slug creation and check

2010-03-08 Thread andreas schmid
hi, im thinking about how to make my slug generation a bit more functional. I dont want my users to think or write their slugs so they have to be generated by a field in the model. usually this is the title field. Now the problem is that there is the possibility that a slug could be the same as o

Re: writing a webmail service

2010-03-08 Thread Dylan Evans
It is, but so is almost anything else. On Mon, Mar 8, 2010 at 8:01 PM, chels wrote: > > I am planning to (or atleast attempting to) write a webmail service > (like gmail, hotmail etc) using Python. I would like to know if Django > would be suitable for this. > > -- > You received this message be

writing a webmail service

2010-03-08 Thread chels
I am planning to (or atleast attempting to) write a webmail service (like gmail, hotmail etc) using Python. I would like to know if Django would be suitable for this. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: django & wsgi: what is the preferred webserver?

2010-03-08 Thread Kenneth Gonsalves
On Monday 08 Mar 2010 1:26:12 pm Rolando Espinoza La Fuente wrote: > Somebody else thinks that django on tornado could be a winning combination? > I used to - but have you tried it with the csrf_token? my server broke on that and I stopped using tornado. -- regards Kenneth Gonsalves Senior Asso

Re: django vs tornado

2010-03-08 Thread Kenneth Gonsalves
On Monday 08 Mar 2010 1:53:50 pm Rolando Espinoza La Fuente wrote: > > I have stopped using it and till I can get something else up am using > > nginx proxied to runserver - which is faster than tornado and handles the > > latest django svn ok. > > Could you explain more about the csrf_token issue

Filtering manager, customized by user

2010-03-08 Thread Valentin Golev
Hi there! I have a model, smth like this: class Action(models.Model): def can_be_applied(self, user): #whatever return True and I want to override its default Manager. But I don't know how to pass the current user variable to the manager, so I have to do smth like this: [act

how to start with django

2010-03-08 Thread Subhransu Sekhar Mishra
hi,i am subhransu and new to django . i want to know how to start django ?i have not done any project before. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from

Re: is there any possibility for two settings.py

2010-03-08 Thread Atamert Ölçgen
On Monday 08 March 2010 09:06:05 chiranjeevi muttoju wrote: > Hi friends, > i have two apps in my project, and i want to use two different settings for > each app. it means same project but i sud run those two apps separately. is > it possible..? if anyone of u guys know please reply me. And if u w

Re: is there any possibility for two settings.py

2010-03-08 Thread chiranjeevi muttoju
Hi swan thanks for ur reply. If we do like that shall we run those applications separately..?! i mean as different servers..?(like different projects) On Mon, Mar 8, 2010 at 12:45 PM, Shawn Milochik wrote: > Just specify an argument for --settings when you launch the server for each > instance.

Re: Scrape a file, then put it in the django database

2010-03-08 Thread Daniel Hilton
On 8 March 2010 07:45, mjlissner wrote: > I'm trying to write a program that scrapes all the pdfs off of this > page: > http://www.ca3.uscourts.gov/recentop/week/recprec.htm > > And then puts them onto my hard drive, with the reference to their > location in a FileField. > > I've defined a FileFie

Re: [Django] Error (EXTERNAL IP): /xml/cat/da-vinci-games

2010-03-08 Thread Alessandro Ronchi
This is the complete traceback of the error with the details of the http request. Maybe it can help to understand why it gives error only with some browsers and only sometimes. I can't debug it because it works with my browsers... http://dpaste.com/169364/ Any help? What can I check? 2010/3/3 Al

Re: django vs tornado

2010-03-08 Thread Rolando Espinoza La Fuente
On Thu, Mar 4, 2010 at 2:08 AM, Kenneth Gonsalves wrote: [...] > > I have stopped using it and till I can get something else up am using nginx > proxied to runserver - which is faster than tornado and handles the latest > django svn ok. Could you explain more about the csrf_token issue? I'm test

Re: Python's Class members ...

2010-03-08 Thread Masklinn
On 8 Mar 2010, at 09:01 , JF Simon wrote: > > Hi dudes, > > My object seems mysterious, as is my problem ... I'd like to > understand something (it's much more related to Python than Django). > > Take an example : > > class Image(models.Model): >email = models.ForeignKey('Email', verbose_na

Python's Class members ...

2010-03-08 Thread JF Simon
Hi dudes, My object seems mysterious, as is my problem ... I'd like to understand something (it's much more related to Python than Django). Take an example : class Image(models.Model): email = models.ForeignKey('Email', verbose_name=_(u'Email')) name = models.CharField(_(u'Name'), max_le