Non ForeignKey field type as

2008-07-07 Thread [EMAIL PROTECTED]
Hello, I'm building my first Django project and was wanting to know how to add a field type to the admin page. I would like the Details.project_type field to be displayed as a select box but it's not a foreign key, how do I go about this? Thanks, Jason from django.db import models class

Re: Using validators against model fields

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 21:34 -0700, Ayaz Ahmed Khan wrote: > I have a model with a CharField against which I have defined a > validator, thus: > > class Info(models.Model): > text = models.CharField(validator_list=[validators.isOnlyDigits]) > > When using a ModelForm of that Model in a

Using validators against model fields

2008-07-07 Thread Ayaz Ahmed Khan
I have a model with a CharField against which I have defined a validator, thus: class Info(models.Model): text = models.CharField(validator_list=[validators.isOnlyDigits]) When using a ModelForm of that Model in a view, Django fails to apply the validators.isOnlyDigits validation check. If

querying an object

2008-07-07 Thread Adi
I have two models class Meet(models.Model): submitted=models.BooleanField(default=False) class MeetParticipationSession(models.Model): meet=models.ForeignKey(Meet) submitted=models.BooleanField(default=False) question 1: How do i find Meet objects that don't have a MeetSession pointing

Re: asynchronous operations

2008-07-07 Thread Joseph Heck
Look into using a queue system of some form. Django-queue-service (http://django-queue-service.googlecode.com/) was developed to enable this but there's similiar mechanisms in use through many sites. Either developed internally, or using heavier-duty queuing mechanisms. -joe On Mon, Jul 7, 2008

Re: Calendar of Events

2008-07-07 Thread bedros
I was looking for the same thing and found the following http://www.3captus.com/download/django_calendar have not tried it yet, but there's a demo on the same website. On Jul 7, 6:34 pm, Mario <[EMAIL PROTECTED]> wrote: > Thank you. I managed to install the event calendar model in Django. I

Re: "ColorField"?

2008-07-07 Thread Leaf
Also note - when I say this, I'm talking about something that can plug in to the admin interface. Just clearing that up. Regards, Leaf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

"ColorField"?

2008-07-07 Thread Leaf
Does anyone know if there is such thing as a ColorField - something that stores a hex value and has a JavaScript-powered color picker beside it? If there is, where can I get it? If there isn't, how would I go about writing one? Regards, Leaf --~--~-~--~~~---~--~~

Re: newforms-admin: root() takes exactly 3 arguments (2 given)

2008-07-07 Thread Juanjo Conti
furby escribió: [...] > admin.site.root() takes 3 arguments: self, request, url. There is no > way to specify arguments in urls.py, so I have no idea how to fix > this. Any help would be appreciated. Thanks. > Yes there is. You can use regex groups: (r'^admin/(.*)', site1.root), The string

Re: newforms-admin: root() takes exactly 3 arguments (2 given)

2008-07-07 Thread Arien
On Mon, Jul 7, 2008 at 6:31 PM, furby <[EMAIL PROTECTED]> wrote: > > here's my urls.py: > * > 1 from django.conf.urls.defaults import * > 2 from django.contrib import admin > 3 from wizcal.app.models import site1 > 4 > 5 urlpatterns = patterns('', > 6 #

runserver with manage.py works but doesn't work with django-admin.py

2008-07-07 Thread Daehee
so it's odd that my new project works with "python manage.py runserver" but gives me an error when i do "django-admin.py runserver." how is this possible? btw the error is below: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/Current/bin/

newforms-admin: root() takes exactly 3 arguments (2 given)

2008-07-07 Thread furby
has anyone else seen this? * TypeError at /admin/ root() takes exactly 3 arguments (2 given) Request Method: GET Request URL:http://www.wizcal.com/admin/ Exception Type: TypeError Exception Value:root() takes exactly 3 arguments (2 given) * here's my urls.py: * 1

What's the best way to simulate a request?

2008-07-07 Thread Andrew
Here's the situation: I'm creating an RESTful internal API as an app in our project. Our 'main' app (we'll call it main) is a client of the API app. Since we're building the API piece by piece as we use it, the emphasis on all of this is simple simple simple -- with our eye on eventually opening

Re: Calendar of Events

2008-07-07 Thread Mario
Thank you. I managed to install the event calendar model in Django. I can add the events and event categories and display using the default templates. My next question is ~ how do I display the calendar assuming I'm using the default templatetag that came with the application? I added {% load

getting a manytomany field in date based archive index

2008-07-07 Thread mccomas . chris
Hey, I have date based generic views, in the archive_index view I'm displaying the most recent blog entries, I'm trying to get the category for each, which is a ManyToMany field. {% for entry in latest %} {{ entry.title }} {{ entry.body }} Category: {% for categories in entry.get_category_list

Re: Calendar of Events

2008-07-07 Thread Rob Hudson
Google is your friend: http://code.google.com/p/django-event-calendar/ On Jul 7, 2:13 pm, Mario <[EMAIL PROTECTED]> wrote: > Hello, > > I’m a NOOB and I was wondering if there are any calendars of event > model that will allow a user to click on a specific date with the > associated listing of

string indices must be integers error in admin - don't know where to start debugging

2008-07-07 Thread Jon Loyens
Hi everyone, I've got a problem and I don't even know where to start debugging it... there seems to be a difference between the way my app is behaving between my local environment and my deployment environment. Hopefully you guys can give me some idea where to start. I've written a small PR

URL templatetag with URL naming not working

2008-07-07 Thread Kimus Linuxus
hi, My named URLs using the URL templatetag are not working when I try it in the apache with mod_python. If I try manage.py runserver it works fine. tough in the home page even with apache also works fine the templatetag. using reverse() from shell works fine also. My testing site is here:

Re: Inserting html into a page dynamically

2008-07-07 Thread Peter Herndon
Django is an excellent framework for developing web applications, but it doesn't do away with the need for JavaScript. In your case, I would very much use JavaScript to make the HTML dynamic. I've done much the same, though on a smaller scale, in my own apps. Django gives you a very easy means

Re: Inserting html into a page dynamically

2008-07-07 Thread Mike Caldwell
Why not just use AJAX, and then have a save button to submit and save in your database. On Mon, Jul 7, 2008 at 2:48 PM, Bear <[EMAIL PROTECTED]> wrote: > > Hi > > I'm new with Django and I can't figure out a method to do what I want, > that is to say inserting html dynamically in my page (I'm

Calendar of Events

2008-07-07 Thread Mario
Hello, I’m a NOOB and I was wondering if there are any calendars of event model that will allow a user to click on a specific date with the associated listing of events. Any suggestions or recommendations are appreciated. Thank you. Goober --~--~-~--~~~---~--~~

Re: looking to override some admin save features

2008-07-07 Thread Peter Herndon
Bumping doesn't help, and just makes you look impatient. If you want a more immediate answer, log in to the #django IRC channel on freenode. Aside from that, it sounds like you want the newforms-admin branch. Search for that on the wiki. ---Peter Herndon On 7/7/08, [EMAIL PROTECTED] <[EMAIL

Inserting html into a page dynamically

2008-07-07 Thread Bear
Hi I'm new with Django and I can't figure out a method to do what I want, that is to say inserting html dynamically in my page (I'm not very good in english so I'll do my best to explain it with an example) Let's say the goal of the page is to let the user build a "storyboard". A storyboard is

Re: looking to override some admin save features

2008-07-07 Thread Karen Tracey
On Mon, Jul 7, 2008 at 3:46 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > bump. > Your original post was less than an hour before your "bump"! Your question is also pretty vague. People might be more likely to try to help if you give a specific example of what you need to do, what

Re: ForeignKey with 0 meaning Null

2008-07-07 Thread rui
Nick, Maybe only your print isn´t working. Look at this class: http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py#L982 If you really want to check if it is working, do: fp = open("/writable/path/to/log.txt", "w") class

Re: looking to override some admin save features

2008-07-07 Thread [EMAIL PROTECTED]
bump. On Jul 7, 3:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > a brief description of what I am trying to do: > > developing a project where I would like to keep django intact allowing > for seamless SVN updates of django.  However, I need to add a bit of > functionality in the

ForeignKey with 0 meaning Null

2008-07-07 Thread Nick Craig-Wood
I'm adapting a legacy database for use with Django and I've come across a problem I haven't been able to solve! The database has ForeignKey fields which are sometimes 0, meaning there is no related row in the other table. If this database used NULL instead of 0 then I could use

looking to override some admin save features

2008-07-07 Thread [EMAIL PROTECTED]
a brief description of what I am trying to do: developing a project where I would like to keep django intact allowing for seamless SVN updates of django. However, I need to add a bit of functionality in the saves of a few admin functions. Basically I just need to audit some actions (modifying

Re: Unexplainable syntax error

2008-07-07 Thread Daniel Ellison
Errors like that usually indicate errors further up in your code. if you have pasted line 10 properly, you're just missing a closing parenthesis. On Jul 7, 2:43 pm, Leaf <[EMAIL PROTECTED]> wrote: > After resolving the URLConf problem, I wrote some views without > templates to make sure that I

asynchronous operations

2008-07-07 Thread [EMAIL PROTECTED]
Certain events require another operation to run. But it doesn't need to happen immediately. I'm curious what people use for message passing / job queuing. Right now, I run cronjobs that run routine background processes, but also some operations which should really be event driving. I was

Re: Unexplainable syntax error

2008-07-07 Thread Karen Tracey
On Mon, Jul 7, 2008 at 2:43 PM, Leaf <[EMAIL PROTECTED]> wrote: > > After resolving the URLConf problem, I wrote some views without > templates to make sure that I had the syntax right. When I tried to > visit localhost:8000/styles/css/classic-b-and-w/ again, I recieved the > error "SyntaxError

Re: Approvation by superuser

2008-07-07 Thread bruno desthuilliers
Haku a écrit : > Hello! > I'm a big django superfan, i just love it! > > I'm trying to find a solution to my problem, but no luck or (maybe) > I'm too dumb to find it by myself. Anyway, what if i need to set up > some kind of "superuser approval system"? > > For example, I want my publisher to

Unexplainable syntax error

2008-07-07 Thread Leaf
After resolving the URLConf problem, I wrote some views without templates to make sure that I had the syntax right. When I tried to visit localhost:8000/styles/css/classic-b-and-w/ again, I recieved the error "SyntaxError at /styles/css/classic-b-and-w/ - invalid syntax (views.py, line 12)". The

common problem: set author, update date on save

2008-07-07 Thread felix
I'm using newforms-admin This is a very common situation: on saving a Post wish to set the author to be request.user wish to set created_on and updated_on perhaps wish to set request ip address but it is actually the form object that does the saving. but IMO none of these things are on the

Re: Field class: Difference between blank and null

2008-07-07 Thread Karen Tracey
On Mon, Jul 7, 2008 at 1:49 PM, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > > Hi, > > I want one on my models to have an optional field. After checking the > code in the Field class, there are two promising params to __init__(): > blank=False, null=False > > What's the difference between both

Re: Field class: Difference between blank and null

2008-07-07 Thread phillc
blank will store a string as a string with nothing in it null will store a string as null you should use blank http://www.djangoproject.com/documentation/model-api/#null says you shouldnt use null unless you have a specific reason to On Jul 7, 1:49 pm, Fernando Rodríguez <[EMAIL PROTECTED]>

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 17:55 +0100, Chris Hoeppner escribió: > Yeah, the book makes you comment those, but makes you uncomment them > again in the next (or the next) chapter =) I guess that's what happens when you're in a hurry and start skipping what you shouldn't. Serves me well. ;-)

Field class: Difference between blank and null

2008-07-07 Thread Fernando Rodríguez
Hi, I want one on my models to have an optional field. After checking the code in the Field class, there are two promising params to __init__(): blank=False, null=False What's the difference between both and which one should I use? Thanks! :-)

Re: Extending the user system

2008-07-07 Thread mccomas . chris
thanks you guys. one more quick question. i have a field in User is_student, it's a Boolean field. in my course model i want to setup a field so that many students can be added to that course, using a manytomany (since courses have multiple students and students have multiple courses). how can

Re: pluggable django ticketing app?

2008-07-07 Thread Nikolay Panov
I've just asked about Django HelpDesk application in django-russian (http://groups.google.com/group/django-russian/) googlegroup. It works! Regards, Nikolay. On Mon, Jul 7, 2008 at 21:27, chefsmart <[EMAIL PROTECTED]> wrote: > > May I know how you found out about this software? > > On Jul 7,

Re: my form "didn't return an HttpResponse object."

2008-07-07 Thread rui
Remember to always _return_ a HttpResponse from your view. def myview(request): return HttpResponse("Hello World") or def myotherview(request): return render_to_response("mytemplate.html", locals()) Cheers and good luck. -- Rui On Mon, Jul 7, 2008 at 12:14 PM, Malcolm Tredinnick

Re: Approvation by superuser

2008-07-07 Thread Evert
> I'm trying to find a solution to my problem, but no luck or (maybe) > I'm too dumb to find it by myself. Anyway, what if i need to set up > some kind of "superuser approval system"? > > For example, I want my publisher to write and article, which will be > stored in the db as "unapproved" and

Re: pluggable django ticketing app?

2008-07-07 Thread chefsmart
May I know how you found out about this software? On Jul 7, 9:12 pm, "Nikolay Panov" <[EMAIL PROTECTED]> wrote: > At the moment I trying to adapthttp://www.jutdahelpdesk.com/for ours project. > > Regards, >  Nikolay. > > On Sun, Jul 6, 2008 at 09:05, chefsmart <[EMAIL PROTECTED]> wrote: > > >

Re: Extending the user system

2008-07-07 Thread brydon
As well, you may need to consider a signal for User.post_save that creates, or saves, a user profile when a User is touched. http://code.djangoproject.com/wiki/Signals On Jul 7, 12:04 pm, Alessandro <[EMAIL PROTECTED]> wrote: > 2008/7/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > > > >  yes,

Re: tweaking auth, making usernames unique within a company

2008-07-07 Thread brydon
Yes! The idea being using dynamic subdomains as the entry point into a mult- tenant application. Each tenant, or company, should have their own unique sets of usernames. Any suggestions on how you'd do that without hacking User? username is set to "unique=True" so the only thing I can see is

Project Management App

2008-07-07 Thread Chris Hoeppner
Hey there! I wonder if anyone knows if there's an app resembling ActiveCollab (or Basecamp, for illustration's sake) that I could plug into a django project. If not, would it be a worthy project with an audience? Chris --~--~-~--~~~---~--~~ You received

Re: pluggable django ticketing app?

2008-07-07 Thread chefsmart
Those are some good recommendations. Thanks. Currently checking out these suggestions. On Jul 6, 10:05 am, chefsmart <[EMAIL PROTECTED]> wrote: > Does anyone know of a pluggable django ticketing app? Something like > the apps used by webhosts for online support?

Re: Still unable to log into the admin interface

2008-07-07 Thread Chris Hoeppner
Yeah, the book makes you comment those, but makes you uncomment them again in the next (or the next) chapter =) On 07/07/2008, at 17:44, Fernando Rodríguez wrote: > > El lun, 07-07-2008 a las 12:30 -0400, Karen Tracey escribió: > > > >> >> [snip] >> >> MIDDLEWARE_CLASSES = [] #(

Re: tweaking auth, making usernames unique within a company

2008-07-07 Thread felix
do you mean that you want someone to be able to have a duplicate username as long as they are at a different company ? if so, why ? maybe that requirement should just be worked around. but there is certainly a way to do it without hacking User. -f;lix On Jul 7, 4:58 pm, brydon <[EMAIL

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 12:30 -0400, Karen Tracey escribió: > > [snip] > > MIDDLEWARE_CLASSES = [] #( >#'django.middleware.common.CommonMiddleware', >#'django.contrib.sessions.middleware.SessionMiddleware', >

Re: Still unable to log into the admin interface

2008-07-07 Thread Karen Tracey
On Mon, Jul 7, 2008 at 12:13 PM, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > > El lun, 07-07-2008 a las 07:02 -0700, urukay escribió: > > > > never faced this kind of problem before :S..maybe if u write down or > upload > > somewhere ur settings.py file > > Here it is: > > [snip] > >

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 07:02 -0700, urukay escribió: > > never faced this kind of problem before :S..maybe if u write down or upload > somewhere ur settings.py file Here it is: --- #

Re: pluggable django ticketing app?

2008-07-07 Thread Nikolay Panov
At the moment I trying to adapt http://www.jutdahelpdesk.com/ for ours project. Regards, Nikolay. On Sun, Jul 6, 2008 at 09:05, chefsmart <[EMAIL PROTECTED]> wrote: > > Does anyone know of a pluggable django ticketing app? Something like > the apps used by webhosts for online support? > > >

Re: pluggable django ticketing app?

2008-07-07 Thread Peter Herndon
Hi all, The Django-NYC users' group is working on an issue tracker, at http://code.google.com/p/django-issues. If you are interested in contributing, please let me know, and I'll add you to the committers. Please see the django-nyc google discussion group for some additional context on the

Re: Extending the user system

2008-07-07 Thread Alessandro
2008/7/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > yes, but when i do that it doesn't show up anywhere in the admin. i'm > not getting any errors and running it in development mode right now. > > class UserProfile(models.Model): > url = models.URLField() > home_address =

Re: Extending the user system

2008-07-07 Thread mccomas . chris
yes, but when i do that it doesn't show up anywhere in the admin. i'm not getting any errors and running it in development mode right now. class UserProfile(models.Model): url = models.URLField() home_address = models.TextField() phone_numer = models.PhoneNumberField()

Re: my form "didn't return an HttpResponse object."

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 08:10 -0700, joshuajonah wrote: > I'm not sure where I'm going wrong here. I have a form, when i submit > it, even blank if gives me this error. I have tried changing it to > POST and then back to a GET submit, but it still doesn't get the > response. > > Here's the debug

my form "didn't return an HttpResponse object."

2008-07-07 Thread joshuajonah
I'm not sure where I'm going wrong here. I have a form, when i submit it, even blank if gives me this error. I have tried changing it to POST and then back to a GET submit, but it still doesn't get the response. Here's the debug page with bonus GET vars too! (this way both POST and GET vars are

Re: tweaking auth, making usernames unique within a company

2008-07-07 Thread brydon
Ok, no responses.let's try this another way Is there a way to swap out the model class that represents User? brydon On Jul 4, 3:24 pm, brydon <[EMAIL PROTECTED]> wrote: > Hey, > > I'm assuming I can always fork auth and modify the User class > directly, however, I'd prefer to avoid

Re: Extending the user system

2008-07-07 Thread brydon
Have you already read about extending the user system through creating your own AUTH_PROFILE_MODULE? http://www.djangoproject.com/documentation/authentication/#storing-additional-information-about-users brydon On Jul 7, 10:27 am, [EMAIL PROTECTED] wrote: > Would it be proper to use the

Re: Error in URL configuration

2008-07-07 Thread Eric Abrahamsen
Hi Leaf, The error message you want is the one just below the one you cited in your email. Namely this: Exception Value: Error while importing URLconf 'dj_styles.urls': No module named details.urls.default If you look in your dj_styles/urls.py, it looks like you've got this line: from

Re: Error in URL configuration

2008-07-07 Thread Matthias Kestenholz
On Mon, 2008-07-07 at 07:31 -0700, Leaf wrote: > I received an error when I tried to access my "Dj Styles" program over > the dev server. To make sure that my URLConf worked properly, I typed > in the address localhost:8000/styles/css/classic-b-and-w/, in an > attempt to get a View Does Not Exist

Re: Usability: stripping white space from form fields

2008-07-07 Thread Norman Harman
Karen Tracey wrote: > On Fri, Jul 4, 2008 at 3:51 AM, Greg Fuller <[EMAIL PROTECTED] > > wrote: > > I want to mention what I consider to be a usability issue with Django > forms. It has to do with there being no option to strip leading and > trailing

Error in URL configuration

2008-07-07 Thread Leaf
I received an error when I tried to access my "Dj Styles" program over the dev server. To make sure that my URLConf worked properly, I typed in the address localhost:8000/styles/css/classic-b-and-w/, in an attempt to get a View Does Not Exist error to confirm that I properly configured the URLS.

Extending the user system

2008-07-07 Thread mccomas . chris
Would it be proper to use the django admin/user system and just extend it to have staff bios, etc? We're going to have it setup that our faculty will have admin access, with limited permissions to login and upload some class lectures (ppt files), edit their class info, etc. Since they'll already

Djangonauts in Bucks County PA (or surrounding areas)

2008-07-07 Thread djworth
Hi Fellow Djangonauts, We are trying to form a local users group for Django users in Bucks County PA (or surrounding areas). I wanted to post a message to this group to see if could drum up some interest. At the moment we are thinking of monthly meetings on evenings and/or weekends. If you

Re: permalink with multiple generic views

2008-07-07 Thread mccomas . chris
thanks! On Jul 7, 9:32 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-07-07 at 06:28 -0700, [EMAIL PROTECTED] wrote: > > i found a post from a while back that basically said if you're using > > the same generic view type with two different urls you couldn't use > > the

Re: problem with mail

2008-07-07 Thread Ramdas S
I just did that. You are right! Thanks On Mon, Jul 7, 2008 at 7:24 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > Hi, > > On Jul 7, 5:58 am, "Ramdas S" <[EMAIL PROTECTED]> wrote: > > I do not have an SMTP server on myserver. > > > > But the mail settings (SMTP settings) is absolutely right,

Re: Simple object creation in postgresql with django views code...

2008-07-07 Thread RossGK
Oops - posted too quickly - the lack of change to the DB is actually a more recent manifestation. From the code posted, the 'not working' issue was just that the print statements wouldn't yield any output on the console at all. I guess when django has trouble with the code it ignores it and

Re: Simple object creation in postgresql with django views code...

2008-07-07 Thread RossGK
Sorry - the issue is that no change occurs to the database - I am using pgAdminIII to inspect the database, and so can see if an entry gets created in my table. Here's the dbpart of the settings.py file seems pretty featureless... DATABASE_ENGINE = 'postgresql_psycopg2' #

Re: Get an absolute URL including host

2008-07-07 Thread Rajesh Dhawan
Hi Florian, Florian Lindner wrote: > Hello, > > how can I get an absolute URL including a hostname (e.g. > http://www.example.org/dir/doc.html) > in a template. I have an object which get_absolute_url I can use but > what is the best way of getting the hostname in the template? Here's a

Re: Still unable to log into the admin interface

2008-07-07 Thread Karen Tracey
On Mon, Jul 7, 2008 at 7:04 AM, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > > Hi, > > I followed the advice I got here, and added > django.contrib.auth > django.contrib.contenttypes > django.contrib.admin > > to settings.py and included the following pattern to urlsp.py: > (r'^admin/',

Re: Still unable to log into the admin interface

2008-07-07 Thread urukay
never faced this kind of problem before :S..maybe if u write down or upload somewhere ur settings.py file Fernando Rodríguez wrote: > > > El lun, 07-07-2008 a las 04:24 -0700, urukay escribió: >> >> did u create user during SYNCDB? > > yes and i got no errors. > >> >> >> Fernando

Re: problem with mail

2008-07-07 Thread Rajesh Dhawan
Hi, On Jul 7, 5:58 am, "Ramdas S" <[EMAIL PROTECTED]> wrote: > I do not have an SMTP server on myserver. > > But the mail settings (SMTP settings) is absolutely right, since it works > perfectly of my laptop and of another server. It looks like a DNS resolution problem on your server. Are you

Approvation by superuser

2008-07-07 Thread Haku
Hello! I'm a big django superfan, i just love it! I'm trying to find a solution to my problem, but no luck or (maybe) I'm too dumb to find it by myself. Anyway, what if i need to set up some kind of "superuser approval system"? For example, I want my publisher to write and article, which will

Re: custom manager method example return a queryset instead of a list

2008-07-07 Thread Rajesh Dhawan
Hi Christopher, > In the example > http://www.djangoproject.com/documentation/model-api/#manager-names > there custom method with_counts() returns a list > How do i get it to return a queryset See the entry_count example in the DB API in this section:

Re: permalink with multiple generic views

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 06:28 -0700, [EMAIL PROTECTED] wrote: > i found a post from a while back that basically said if you're using > the same generic view type with two different urls you couldn't use > the permalink decorator, is that still the case with the SVN release? > > we have our normal

permalink with multiple generic views

2008-07-07 Thread mccomas . chris
i found a post from a while back that basically said if you're using the same generic view type with two different urls you couldn't use the permalink decorator, is that still the case with the SVN release? we have our normal news table for the school's news, but we also have students blogging

Re: MediaTemple Containers

2008-07-07 Thread mccomas . chris
I have one of the beta Django containers on MT, and I also have an account on WebFaction, I love MT, but they're severely lacking with the Django containers, IMO. WebFaction is amazing compared to MT if you plan to use shared hosting On Jul 7, 6:20 am, Niall McCormack <[EMAIL PROTECTED]>

Re: how to seperate view file into different files

2008-07-07 Thread Matthias Kestenholz
On Mon, 2008-07-07 at 06:00 -0700, laspal wrote: > Hi, > I have a app called crm in which I have (model.py, views.py , > forms.py, urls.py and __init__.py) > > Now the problem is my code has become too big to handle in 1 file. > So I wanted to know how can I separate my views.py into multiples

Re: django.contrib.comments and "dynamic vars"

2008-07-07 Thread Matthias Kestenholz
On Mon, 2008-07-07 at 15:08 +0200, Matthias Kestenholz wrote: > On Mon, 2008-07-07 at 05:57 -0700, Aljosa Mohorovic wrote: > > when using django.contrib.comments how can i use dynamic vars? > > in current page context i have object_type="news.News" and > > object_id="2" so i would like to do

Re: django.contrib.comments and "dynamic vars"

2008-07-07 Thread Matthias Kestenholz
On Mon, 2008-07-07 at 05:57 -0700, Aljosa Mohorovic wrote: > when using django.contrib.comments how can i use dynamic vars? > in current page context i have object_type="news.News" and > object_id="2" so i would like to do something like {% > get_comment_count for object_type object_id as

how to seperate view file into different files

2008-07-07 Thread laspal
Hi, I have a app called crm in which I have (model.py, views.py , forms.py, urls.py and __init__.py) Now the problem is my code has become too big to handle in 1 file. So I wanted to know how can I separate my views.py into multiples files. My models is as follows: Industry: Deals:

django.contrib.comments and "dynamic vars"

2008-07-07 Thread Aljosa Mohorovic
when using django.contrib.comments how can i use dynamic vars? in current page context i have object_type="news.News" and object_id="2" so i would like to do something like {% get_comment_count for object_type object_id as comment_count %} couldn't find any info on

custom manager method example return a queryset instead of a list

2008-07-07 Thread Christopher Clarke
Hi Guys In the example http://www.djangoproject.com/documentation/model-api/#manager-names there custom method with_counts() returns a list How do i get it to return a queryset Regards Chris --~--~-~--~~~---~--~~ You received this message because you are

Re: ImageField error

2008-07-07 Thread Molly
Milan, Thanks a lot, that fixed my problem :) Molly On Jul 7, 12:49 am, "Milan Andric" <[EMAIL PROTECTED]> wrote: > On Sun, Jul 6, 2008 at 3:12 PM, Molly <[EMAIL PROTECTED]> wrote: > > > Millan, > > > I'm doing this in dev environment with the built in webserver. No it's > > not a mod_python

Re: Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
El lun, 07-07-2008 a las 04:24 -0700, urukay escribió: > > did u create user during SYNCDB? yes and i got no errors. > > > Fernando Rodríguez wrote: > > > > > > Hi, > > > > I followed the advice I got here, and added > > django.contrib.auth > > django.contrib.contenttypes > >

newforms-admin, forms.ModelForm, formtools.preview

2008-07-07 Thread d-rave
Has anyone successfully got formtools.preview working with forms.ModelForm so that the form fields are populated from the model. If so, do you have an example?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Still unable to log into the admin interface

2008-07-07 Thread urukay
did u create user during SYNCDB? Fernando Rodríguez wrote: > > > Hi, > > I followed the advice I got here, and added > django.contrib.auth > django.contrib.contenttypes > django.contrib.admin > > to settings.py and included the following pattern to urlsp.py: > (r'^admin/',

Re: Foreign Key problem

2008-07-07 Thread rui
blog.id dosen´t do the trick ? Smith, you should look at ManyToMany relationships. These wiil make you models more readable and easy to deal with. Give a look here: http://www.djangoproject.com/documentation/model-api/ Cheers -- Rui On Mon, Jul 7, 2008 at 8:07 AM, smith <[EMAIL PROTECTED]>

Foreign Key problem

2008-07-07 Thread smith
hi As I am new to django I am having a lots of problem.. So my query is: class Blog(models.Model): name = models.CharField(maxlength=100) class Entry(models.Model): blog = models.ForeignKey(Blog) headline = models.CharField(maxlength=255) class content(models.Model): name =

Still unable to log into the admin interface

2008-07-07 Thread Fernando Rodríguez
Hi, I followed the advice I got here, and added django.contrib.auth django.contrib.contenttypes django.contrib.admin to settings.py and included the following pattern to urlsp.py: (r'^admin/', include('django.contrib.admin.urls')), I also included from django.contrib.auth.models import

Re: MediaTemple Containers

2008-07-07 Thread Niall McCormack
Yeah, I've tried contacting sales but they're a bit cagey too. I wonder if they're waiting for the 1.0 release On 4 Jul 2008, at 07:30, j.gosier wrote: > > I'm not sure, I just submitted a support ticket the other day asking > (mt) the very same question and they were mum on it. > > > >

Re: problem with mail

2008-07-07 Thread Ramdas S
I do not have an SMTP server on myserver. But the mail settings (SMTP settings) is absolutely right, since it works perfectly of my laptop and of another server. On Mon, Jul 7, 2008 at 2:13 PM, Alaa Salman <[EMAIL PROTECTED]> wrote: > > > > On Jul 7, 10:49 am, "Ramdas S" <[EMAIL PROTECTED]>

RE: sidebar app

2008-07-07 Thread Mat
With regards to putting it in just the base.html file, look into inclusion tags http://www.djangoproject.com/documentation/templates_python/#inclusion-tags Not used them before but I think they are what you need. I've used similar things in other frameworks and they save a bunch of code and

Re: Logout when Leaving

2008-07-07 Thread Christopher
Not sure how I missed that :) Thanks On Jul 7, 11:22 am, rui <[EMAIL PROTECTED]> wrote: > I think the option: SESSION_EXPIRE_AT_BROWSER_CLOSE on settings.py > would help you. > Give it a try. > > More information on this > here:http://www.djangoproject.com/documentation/sessions/ > > -- > The

Re: Logout when Leaving

2008-07-07 Thread rui
I think the option: SESSION_EXPIRE_AT_BROWSER_CLOSE on settings.py would help you. Give it a try. More information on this here: http://www.djangoproject.com/documentation/sessions/ -- The world is just awesome. Boom De Yada! On Mon, Jul 7, 2008 at 6:17 AM, Christopher <[EMAIL PROTECTED]>

Logout when Leaving

2008-07-07 Thread Christopher
Is there a way to automatically log a user out when leaving the website? At the moment when the user logs in and leaved the site and comes back the user is still logged in. What is the best way to overcome this? I want the user to have to log in each time they come to the website. Thanks for

Re: Syntax error: "can't assign to operator"

2008-07-07 Thread bruno desthuilliers
On 5 juil, 04:33, Leaf <[EMAIL PROTECTED]> wrote: > Okay. I'll run a quick find-and-replace to set all my identifiers to > use underscores instead of hyphens. I'm not that familiar with Python, > so I assumed that it would recognize hyphens as a seperator and not a > minus sign. There are very

Re:

2008-07-07 Thread Alaa Salman
On Jul 7, 10:49 am, "Ramdas S" <[EMAIL PROTECTED]> wrote: > Hi, > > I have this curious error that has been bothering me on a new server. This > is a simple program that sends out an email using an smtp server hosted > elsewhere. > > This sowks perfectly on my desktop with same mail settings,

  1   2   >