django chat?

2011-11-17 Thread william ratcliff
Hi, I've started a new site called StudyBrunch, where we offer a chance for online studygroups with video conferencing, screen sharing etc. I'd like to keep the groups small to be maneageble. I will offer a basic session on Django (from tutorial) for people who are interested on Saturday eveni

Re: Problem with get_absolute_url

2011-11-17 Thread Jian Chang
yes, you need the decorator @models.permalink 2011/11/15 Rubén Dugo Martín > You forget the decorator: > > @models.permalink > def get_absolute_url(self): > return ('blog_post_detail', None, { >'year': self.publish.year, >'month': self.publish.strftime('%b').lower(), >

Deploy Django to hostmonster

2011-11-17 Thread Tran Bac Son
Hello, I'm new in Django. I had write my own website by Django but I got problems in deploying it to hostmonster. The detail of my problem is: http://stackoverflow.com/questions/8156173/django-cant-run-in-hostmonster Please help me to point out what wrong. Many thanks tbson -- You received this

Re: Strange new error

2011-11-17 Thread Mike Dewhirst
On 18/11/2011 9:48am, Gchorn wrote: Is hard drive corruption like this a common occurrence, and can it be avoided? http://en.wikipedia.org/wiki/Hard-disk_failure http://static.googleusercontent.com/external_content/untrusted_dlcp/labs.google.com/en//papers/disk_failures.pdf ymmv mike -- You

Re: Strange new error

2011-11-17 Thread Gchorn
You were absolutely right. I used the built-in disk utility for OSX to verify the drive and it was corrupt. I then tried to use said utility to repair the disk but it couldn't, and recommended a reformat instead. Yikes. Was it fate that this happened literally a day after I started using Time Ma

Re: Custom admin changelist queryset

2011-11-17 Thread Ivo Brodien
Well the admin.ModelAdmin expects to be working, for one model only (knowing about its table structure). Can you tell us what you goal here is? Probably you want to show more information than there is in one model? You can create methods in your model and use them to show more information like

Custom admin changelist queryset

2011-11-17 Thread bax...@gretschpages.com
I'm trying to combine a subset of two models and pass them to an admin change list: class FeaturedItemsAdmin(admin.ModelAdmin): def queryset(self, request): qs1 = Foo.objects.filter(featured=True) qs2 = Bar.objects.filter(featured=True) . do stuff to combine ... re

Django FormWizard - How do you dynamically create a formset based on previous step

2011-11-17 Thread Steven Klass
Hi All, (Sorry for the cross post to Stackoverflow as well - I'm really pulling my hair out on this one!) Posted on http://stackoverflow.com/questions/8172398/django-formwizard-how-do-you-dynamically-create-a-formset-based-on-previous-st I've seen [this][1] post and it's not working (in part bec

Re: How to specify a tuple in django models?

2011-11-17 Thread Bill Freeman
See unique_together in https://docs.djangoproject.com/en/1.3/ref/models/options/ On Thu, Nov 17, 2011 at 1:09 PM, Han Qi wrote: > Hi Djangoers: > > I am new to Django and I wonder how specify a tuple as unique key( or > primary key) > For example I have a table with rows (id, name, last_name) and

How to specify a tuple in django models?

2011-11-17 Thread Han Qi
Hi Djangoers: I am new to Django and I wonder how specify a tuple as unique key( or primary key) For example I have a table with rows (id, name, last_name) and I want that the pair (name, last_name) to be unique. Thanks! -- You received this message because you are subscribed to the Google Group

Re: AJAX + CSRF only works on Chrome, but not on Firefox and Safari.

2011-11-17 Thread Kyu
@Jesse Heitler: I don't use an underscore in my domain name. @Tom Evans: I'm just running the website locally (localhost:8000) using "runserver" command. I set the Firefox preference to allow 127.0.0.1 cookies, but it still gives an 403 error. Thanks, Kyu On Nov 17, 6:10 am, Tom Evans wrote:

Re: Date_Field min_value

2011-11-17 Thread Tom Evans
Doh! My bad, he sent two copies of it, one *was* bad and had Reference headers, but I'd already deleted that one. Sorry Tom On Thu, Nov 17, 2011 at 2:32 PM, Tom Evans wrote: > On Thu, Nov 17, 2011 at 2:15 PM, Derek wrote: >> Michael >> >> Please don't an existing thread and change the topic; s

Re: Date_Field min_value

2011-11-17 Thread Tom Evans
On Thu, Nov 17, 2011 at 2:15 PM, Derek wrote: > Michael > > Please don't an existing thread and change the topic; start a new > discussion of your own. > For more on mailing list etiquette, please read: > https://code.djangoproject.com/wiki/UsingTheMailingList > Think you need to check your mail

Re: Date_Field min_value

2011-11-17 Thread Derek
Michael Please don't an existing thread and change the topic; start a new discussion of your own. For more on mailing list etiquette, please read: https://code.djangoproject.com/wiki/UsingTheMailingList On Nov 17, 6:17 am, Michael Nacharov wrote: > Hello Django Expets! > In one of my Django app,

Re: IntegrityError: bookings_business.slug may not be NULL on .create()

2011-11-17 Thread Tom Evans
On Thu, Nov 17, 2011 at 12:48 PM, Mario Gudelj wrote: > Hi guys, > I have this issue I can not work out for the life of me. I would really > appreciate it if someone could help. > This is my model: > class Business(models.Model): >     ... >     slug = models.SlugField("Slug", max_length=255, uniq

Re: AJAX + CSRF only works on Chrome, but not on Firefox and Safari.

2011-11-17 Thread Tom Evans
On Thu, Nov 17, 2011 at 9:40 AM, Kyu wrote: > Hi, I'm doing very basic AJAX operation using Django 1.3.1. > > 1) First of all, I copied the AJAX + CSRF snippet (https:// > docs.djangoproject.com/en/1.3/ref/contrib/csrf/#ajax) to my *.js file > loded by the every HTML page. > > 2) HTML defines the

Re: AJAX + CSRF only works on Chrome, but not on Firefox and Safari.

2011-11-17 Thread Jesse Heitler
This is a long shot, but do you happen to have an underscore in your domain name? Some browsers choke on that character and refuse to return cookies. -Jesse On Nov 17, 9:40 am, Kyu wrote: > Hi, I'm doing very basic AJAX operation using Django 1.3.1. > > 1) First of all, I copied the AJAX + CSRF

Re: DateField min_value

2011-11-17 Thread Andre Terra
You can also override the save method in the model to prevent bad dates (i.e. > your maximum date) to be saved to the database, if by any chance your use case doesn't include users filling out a nice, simple html form. Cheers, AT On Thu, Nov 17, 2011 at 5:07 AM, Babatunde Akinyanmi wrote: > -1

AJAX + CSRF only works on Chrome, but not on Firefox and Safari.

2011-11-17 Thread Kyu
Hi, I'm doing very basic AJAX operation using Django 1.3.1. 1) First of all, I copied the AJAX + CSRF snippet (https:// docs.djangoproject.com/en/1.3/ref/contrib/csrf/#ajax) to my *.js file loded by the every HTML page. 2) HTML defines the subject, email, and message fields, but there's no form.

IntegrityError: bookings_business.slug may not be NULL on .create()

2011-11-17 Thread Mario Gudelj
Hi guys, I have this issue I can not work out for the life of me. I would really appreciate it if someone could help. This is my model: class Business(models.Model): ... slug = models.SlugField("Slug", max_length=255, unique=True, blank=False) I have the following function in the models

Re: controlling user access

2011-11-17 Thread Mario Gudelj
Thanks for the responses guys. I'll be making a different admin interface for these users and leave the django admin for myself. The admin for these other users will be on http://business1.myurl.com/console/, http://business2.myurl.com/console/and so on. So, the only way I can think of achieving

Re: (fundamental) problem with password reset in 1.x: URL's become too long

2011-11-17 Thread Tom Evans
On Thu, Nov 17, 2011 at 9:44 AM, Bram de Jong wrote: > The angle bracket thing is new to me: how exactly does this help? You > do mean regular < and > right? > > So > > > > Should be better than > > http://www.google.com > > ? > Yep, exactly. Well behaved email clients wil

Re: (fundamental) problem with password reset in 1.x: URL's become too long

2011-11-17 Thread Bram de Jong
On Wed, Nov 16, 2011 at 2:39 PM, Andre Terra wrote: > Since url shorteners have already been suggested, how about the possibility > of writing a shorter url pattern in urls.py. Would something like > http://www.freesound.org/r/1-123-a12345678ed12345d123/ be good enough for > you? Sure, we could d

Re: controlling user access

2011-11-17 Thread Ivo Brodien
Do you want to use the admin for administration? You should not, since the admin is designed to be used by people that can be trusted, although it can be done, by overriding queryset method of the ModelAdmin. As stated before, make a page where a user selects the business and afterwards you que

AW: controlling user access

2011-11-17 Thread Szabo, Patrick (LNG-VIE)
To Clarify...you dont really need to make diffrent authentifications you just have to make a clever query ;-)= Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Szabo, Patrick (LNG-VIE) Gesendet: Donnerstag, 17. November 2011 09:41 An: django-users@googleg

AW: controlling user access

2011-11-17 Thread Szabo, Patrick (LNG-VIE)
Hi, Well if i understand you correctly it doesnt sound so hard. Every user can have one or more businesses and every artikel can have on business. So you just query for all articles where the business matches one of the businesses the user belongs to. Hope that helps Patrick V

controlling user access

2011-11-17 Thread Mario Gudelj
Hi Djangoers, I have a problem on my hands I'm not sure how to approach and would appreciate your guidance. I'm building a site that will host articles for separate businesses and each business will have a user who needs to log in and administer article that only belong to a particular business.