Re: django.contrib.auth.models.User User model can't be saved

2009-03-27 Thread Malcolm Tredinnick
On Sat, 2009-03-28 at 13:45 +1100, Joshua Partogi wrote: > Dear all, > > I currently want to have a registration system. For that matter I will > be using the existing django.contrib.auth.models.User. > > So I created a form object as such: > class RegisterForm(ModelForm): > class Meta: >

django.contrib.auth.models.User User model can't be saved

2009-03-27 Thread Joshua Partogi
Dear all, I currently want to have a registration system. For that matter I will be using the existing django.contrib.auth.models.User. So I created a form object as such: class RegisterForm(ModelForm): class Meta: model = User And the view: def form(request): if request.method

Re: Django Admin Question

2009-03-27 Thread Wiiboy
I want to make it so that I can just add enter the ID, and it will mark it as accepted --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How do I define choices in ChoiceField

2009-03-27 Thread Joshua Partogi
Thanks for the hints guys. It works now. :-) On Mar 28, 12:49 am, Stephan John wrote: > Am Freitag, 27. März 2009 14:43:08 schriebJoshuaPartogi: > > > bel = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) > > it must be tuples: > > bel =

Re: send_mail and cc

2009-03-27 Thread Malcolm Tredinnick
On Fri, 2009-03-27 at 16:50 -0700, drakkan wrote: > Hi all, > > there is a way to send cc mail using django mail wrapper? > > reading the official docs: > > http://docs.djangoproject.com/en/dev/topics/email/#topics-email > > seems only possible to define to and bcc recipients but not cc,

send_mail and cc

2009-03-27 Thread drakkan
Hi all, there is a way to send cc mail using django mail wrapper? reading the official docs: http://docs.djangoproject.com/en/dev/topics/email/#topics-email seems only possible to define to and bcc recipients but not cc, thanks drakkan1000

Re: Confused by attribute error

2009-03-27 Thread Robocop
Also i don't comment until i put my code into production (bad habit, yes i know :x), so let me know if you need me to throw in some dirty comments to make it more readable. On Mar 27, 3:21 pm, Robocop wrote: > On Mar 27, 3:05 pm, Briel wrote: > > >

Re: Confused by attribute error

2009-03-27 Thread Robocop
On Mar 27, 3:05 pm, Briel wrote: > Hi. > It would be really helpful to be able to look at your function as > well. My > Guess is that the problem lies there, since this is happening when you > call the function. Even if the problem is within django it would be a > lot >

Re: Django wont display images on my CSS file

2009-03-27 Thread Dougal Matthews
Isn't it just because you don't have quotes around the image address? background: url('/site_media/header_background.gif') no-repeat top left; Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/ 2009/3/27 Brian Neal : > > On Mar 27, 7:33 am, Gath

Re: Confused by attribute error

2009-03-27 Thread Briel
Hi. It would be really helpful to be able to look at your function as well. My Guess is that the problem lies there, since this is happening when you call the function. Even if the problem is within django it would be a lot easier to find when looking through your function to see what it does.

Confused by attribute error

2009-03-27 Thread Robocop
Hello again, So i'm working on some of my old code, and a previously (or so i remember) function no longer works. When calling it my django page posts the error: AttributeError at /audit_sheets/TEST/ 'list' object has no attribute 'user' Request Method: POST Request URL:

Re: Can I alter a JS file with Django

2009-03-27 Thread Ross
Excellent - that gives me new enthusiasm to keep trying. Thanks for the link too. I'll play around with mime-types to see if I can get it to work! Ross. On Mar 27, 4:07 pm, Andy Mckay wrote: > On 27-Mar-09, at 11:44 AM, Ross wrote: > > > > > > > I'm a bit new to this, so

Re: Django wont display images on my CSS file

2009-03-27 Thread Brian Neal
On Mar 27, 7:33 am, Gath wrote: > Guys, > > Am having a problem in displaying images in my CSS file. > > I have a css file with the following class > > .header > { >  margin-left: auto; >  bla bla >  bla bla >  ... > background: url(/site_media/header_background.gif)

Re: Can I alter a JS file with Django

2009-03-27 Thread Andy Mckay
On 27-Mar-09, at 11:44 AM, Ross wrote: > > I'm a bit new to this, so don't be surprised if I'm way off base here. > > Is there any way for me to deliver a javascript that contains > templated content through Django? Or is Django somehow limited to > only rendering html content based templates.

Re: No admin-url match when DEBUG=False

2009-03-27 Thread Karen Tracey
On Fri, Mar 27, 2009 at 9:44 AM, Stephan John wrote: > > Am Freitag, 27. März 2009 14:28:28 schrieb Karen Tracey: > > On Fri, Mar 27, 2009 at 9:19 AM, Stephan John > wrote: > > > I registered the models with: > > > admin.site.register(Beitrag,

Re: Django wont display images on my CSS file

2009-03-27 Thread Sean Brant
In most of my projects I have a img, css, js folder. In my css file I reference images like this url(../img/path/to/img.jpg) in my css files. The ../ basically says start the path back one directory. Not sure if this is what's causing your problem. On Mar 27, 8:10 am, Martin Ostrovsky

Django site assets

2009-03-27 Thread foxbunny
Hi, I'd like to announce the very early pre-alpha version of Django site assets app. What it does is quite similar to what django-assets. The code is on gihub: http://github.com/foxbunny/django-site-assets/tree/master I coded this because I couldn't get django-assets to work on my box. Just

Re: Multiple ModelAdmins for a single Model

2009-03-27 Thread Dan Ward
I tried a number of ways, but still failed to get where I needed. I've created my own control panel now. On Mar 27, 1:18 pm, andybak wrote: > Did the proxy table solution that Alex suggested work out for you? > > That's the one I try just as soon as I upgrade to trunk (some

django-registration - getting activation key into message.

2009-03-27 Thread neri...@gmail.com
Hello, Looking at the code for the create_inactive_user method of models.RegistrationManager it looks like the activation key is auto generated and appended in the message sent to the user, however, the only portion of the message sent is the 'activation_email.txt' file. How do I get the rest of

Re: src-Path for .js or .img - Files in a Django-Project

2009-03-27 Thread Timothy
> > Take a look at this: > > http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs Hi Alex, thanks for this. It helps me. Timothy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Fulltext searching

2009-03-27 Thread Antoni Aloy
2009/3/26 Malcolm Tredinnick : > > On Thu, 2009-03-26 at 14:37 -0700, TheIvIaxx wrote: >> So i have been trying to get a solid search going in django.  I have >> seen things liek Whoosh and Solr or Lucene(sp?) which all add fulltext >> searching to your models.  Are

Re: login_required

2009-03-27 Thread juanefren
Thanks, that corrected the problem, (I was missing import in my ajax views). On Mar 12, 6:35 pm, Jacob Kaplan-Moss wrote: > On Wed, Mar 11, 2009 at 7:10 PM, juanefren wrote: > > Few times when I open any page in my site this error appears. > >

Re: src-Path for .js or .img - Files in a Django-Project

2009-03-27 Thread Alex Gaynor
On Fri, Mar 27, 2009 at 10:02 AM, Timothy <83...@gmx.de> wrote: > > Hi Folks > > project-name is "heller" > site-name is "personal" > > my directory-structure (in short) > > heller/ > personal/ > views.py > . > . > templates/ > personal/ >

src-Path for .js or .img - Files in a Django-Project

2009-03-27 Thread Timothy
Hi Folks project-name is "heller" site-name is "personal" my directory-structure (in short) heller/ personal/ views.py . . templates/ personal/ includes/ x.html y.html .

Comments & Forum app (all in one)

2009-03-27 Thread Norman
Hi, Is there any app that can be used as comment - under blog entries - and as forum - to see all blog comments ( /forum). regards, Normanek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: How do I define choices in ChoiceField

2009-03-27 Thread Briel
Hi. Choices is a tuple/list of tuples/lists, so in your case it would look like this: (('one', 'one'), ('two', 'two')) You can't use dictionaries. ~Jakob On 27 Mar., 14:43, Joshua Partogi wrote: > Hi all, > > Let me just get straight to the point > I tried these: > label

Re: How do I define choices in ChoiceField

2009-03-27 Thread Stephan John
Am Freitag, 27. März 2009 14:43:08 schrieb Joshua Partogi: > bel = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) it must be tuples: bel = forms.ChoiceField(choices=(('one', 'one'), ('two', 'two' ) ) --~--~-~--~~~---~--~~ You received this message

Re: No admin-url match when DEBUG=False

2009-03-27 Thread Stephan John
Am Freitag, 27. März 2009 14:28:28 schrieb Karen Tracey: > On Fri, Mar 27, 2009 at 9:19 AM, Stephan John wrote: > > I registered the models with: > > admin.site.register(Beitrag, BeitragAdmin) > > admin.site.register(Container, ContainerAdmin) > > > > It works fine in

How do I define choices in ChoiceField

2009-03-27 Thread Joshua Partogi
Hi all, Let me just get straight to the point I tried these: label = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) And received these: Exception Type: TemplateSyntaxError Exception Value:Caught an exception while rendering: too many values to unpack What was wrong

Re: How do I access an ID from a Foreign Key object?

2009-03-27 Thread Karen Tracey
On Fri, Mar 27, 2009 at 9:25 AM, Robert Chan wrote: > > Hey is this possible? > > I'm getting angry 500s back > > class TeamBulletin(models.Model): >team = models.ForeignKey(Team) >author = models.ForeignKey(User) >title = models.CharField(max_length =

Re: No admin-url match when DEBUG=False

2009-03-27 Thread Karen Tracey
On Fri, Mar 27, 2009 at 9:19 AM, Stephan John wrote: > I registered the models with: > admin.site.register(Beitrag, BeitragAdmin) > admin.site.register(Container, ContainerAdmin) > > It works fine in debug-mode. I have problems only if debug is false. > And those lines are

How do I access an ID from a Foreign Key object?

2009-03-27 Thread Robert Chan
Hey is this possible? I'm getting angry 500s back class TeamBulletin(models.Model): team = models.ForeignKey(Team) author = models.ForeignKey(User) title = models.CharField(max_length = 500, blank = False) body = models.TextField(blank = False) image =

Re: No admin-url match when DEBUG=False

2009-03-27 Thread Stephan John
Am Freitag, 27. März 2009 14:01:37 schrieb Karen Tracey: > On Fri, Mar 27, 2009 at 8:10 AM, Stephan John wrote: > > Hi all, > > > > I have some trouble with my Admin-URLs. When I set DEBUG=False (in the > > settings.py) I become this error (I've changed some lines in the

Re: Multiple ModelAdmins for a single Model

2009-03-27 Thread andybak
Did the proxy table solution that Alex suggested work out for you? That's the one I try just as soon as I upgrade to trunk (some of the admin template changes in trunk breaks my admin template overrides so I might hold off for the 1.1 release in case it changes some more) On Mar 24, 2:53 pm,

Re: show choice field title not value on template

2009-03-27 Thread Rajesh D
On Mar 27, 8:00 am, hc w wrote: > Hi, all > I defined a choice field in model like bellow:  >     sendchannel = models.CharField(max_length=1,choices=(('1','channel > 1'),('2','channel 2'))) > so how to  show the choice title but not value on template?  I scanned

Re: Django wont display images on my CSS file

2009-03-27 Thread Martin Ostrovsky
I spoke too soon. Re-reading your comment, it does seem to be entirely a CSS/HTML issue - not Django related. Since the inlined style works, Django is finding the image. Sorry about that misleading response. On Mar 27, 9:07 am, Martin Ostrovsky wrote: > Without

Re: Django wont display images on my CSS file

2009-03-27 Thread Martin Ostrovsky
Without seeing your settings.py file and urls.py, I can only guess, but you probably don't have serving static media setup correctly. If you're running this on the development server, you'll probably see a 404 next to /site_media/header_background.gif in the terminal window. This means Django

Re: No admin-url match when DEBUG=False

2009-03-27 Thread Karen Tracey
Please see my reply in the other thread with this same question. Karen --~--~-~--~~~---~--~~ 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

Re: No admin-url match when DEBUG=False

2009-03-27 Thread Karen Tracey
On Fri, Mar 27, 2009 at 8:10 AM, Stephan John wrote: > > Hi all, > > I have some trouble with my Admin-URLs. When I set DEBUG=False (in the > settings.py) I become this error (I've changed some lines in the file > ../django/core/handlers/base.py to see the error in

Admin: Inline relations and "through" models. How to display them within fields on admin pages?

2009-03-27 Thread StrongOrder
Hello! Sorry for the verbose title. I'm scratching my head trying to solve these two problems: 1. In my modeladmin class I have: inlines = [EmploymentInline, GraduationInline, ShiftInline] I want to group these and display them under a particular fieldset using: fieldsets = (

Django wont display images on my CSS file

2009-03-27 Thread Gath
Guys, Am having a problem in displaying images in my CSS file. I have a css file with the following class .header { margin-left: auto; bla bla bla bla ... background: url(/site_media/header_background.gif) no-repeat top left; } When i execute the template with this css, no image is

No admin-url match when DEBUG=False

2009-03-27 Thread Mawilo
Hi all, I have some trouble with my Admin-URLs. When I set DEBUG=False (in the settings.py) I become this error (I've changed some lines in the file ../django/core/handlers/base.py to see the error in no-debug- mode): Using the URLconf defined in project.urls, Django tried these URL patterns,

No admin-url match when DEBUG=False

2009-03-27 Thread Stephan John
Hi all, I have some trouble with my Admin-URLs. When I set DEBUG=False (in the settings.py) I become this error (I've changed some lines in the file ../django/core/handlers/base.py to see the error in no-debug-mode): Using the URLconf defined in project.urls, Django tried these URL patterns,

Re: Contrib comments and removing fields for private comments

2009-03-27 Thread Matthew Somerville
coulix wrote: > however i feel like i am heading the wrong way, i saw that if a user > si logged in the email and user field of comment model will be > automatically assigned. Yes, they are. > Therefore maybe i just have to custom the form template instead of > customising the forms.py and

show choice field title not value on template

2009-03-27 Thread hc w
Hi, all I defined a choice field in model like bellow:      sendchannel = models.CharField(max_length=1,choices=(('1','channel 1'),('2','channel 2'))) so how to  show the choice title but not value on template?  I scanned admin templates . seems something like dict(choices).get(). just

Re: Problem with Sum() function

2009-03-27 Thread eli
Thank You. regards. On 23 Mar, 23:58, Russell Keith-Magee wrote: > On Tue, Mar 24, 2009 at 12:17 AM, eli wrote: > > > How to pass to the Sum() function (ORM) more than one field? > > > My problem: > > > class Model1(models.Model): > >    name

Contrib comments and removing fields for private comments

2009-03-27 Thread coulix
Hi, I am trying to have a simple comment form for loged in user with only one textArea field, I went the way of COMMENTS_APP = 'private_comments' insettings and using my own forms.py with the following code: class PrivateComment(CommentForm): def __init__(self, *args, **kwargs):