Comment post not allowed (400)

2012-02-13 Thread coded kid
Hey guys, when I include the django comments form in the template I want to use it, After visting the page, I can only see "POST" and "PREVIEW" button and the form itself is not showing. So I clicked on the 'POST" button to see what's next. After clicking it, I get this: Comment post not allowed

Comments form customization

2012-02-13 Thread Fabio Natali
Hi everybody, I am using comments app from contrib in Django 1.3. In my website I let only authenticated users to leave a comment so I'd like to get rid of those "name", "email" and "url" fields that come with the standard comment form. Indeed, I already know the name and email of current

Admin inline for inherited model cant find pointer to parent model

2012-02-13 Thread Demetrio Girardi
I have a child model that I wish edit inline in the admin site. When trying to save edits I get a MultiValueDictKeyError: "Key 'childmodel_set-0-parentmodel_ptr' not found in " It seems to me the admin is trying to get the reference to the parent model from the form data. How can I fix this? Do

Re: Comments form customization

2012-02-13 Thread Vovk Donets
It's not really great solution, but maybe it will give you a hint: you can add/remove fileds to the form on the fly. And for not logged in users show all fields, but for authenticated only subset of the all form fields. 2012/2/13 Fabio Natali > Hi everybody, > > I am using

Re: Comments form customization

2012-02-13 Thread Fabio Natali
On 02/13/2012 10:52 AM, Vovk Donets wrote: It's not really great solution, but maybe it will give you a hint: you can add/remove fileds to the form on the fly. And for not logged in users show all fields, but for authenticated only subset of the all form fields. Ehi Vladimir, thank you for

Re: Comments form customization

2012-02-13 Thread coded kid
Hey Fabio, How do you get your comment form to display? Been fighting with this for the past 5hrs. Please any idea? Thanks. On Feb 13, 11:12 am, Fabio Natali wrote: > On 02/13/2012 10:52 AM, Vovk Donets wrote: > > > It's not really great solution, but maybe it will give you a

Re: Admin inline for inherited model cant find pointer to parent model

2012-02-13 Thread Demetrio Girardi
Looking more into this, my parent model has a primary key field named 'code'. The inline forms do show the 'code' field for the child model instances, and the data is in the formset's querydict: QueryDict <... u'childmodel_set-0-code': [u'...'] ...> However the table column name for the

Re: complete for dropdown box in admin

2012-02-13 Thread Anoop Thomas Mathew
Hi, http://harvesthq.github.com/chosen/ Hope this helps. Thanks, Anoop Thomas Mathew atm ___ Life is short, Live it hard. On 13 February 2012 12:17, kenneth gonsalves wrote: > hi, > > I need a widget in admin to autoselect (I do not know what it is called) > a

error

2012-02-13 Thread xina towner
Hi, I get this message when I try to acces to the admin page: AlreadyRegistered at /admin The model Location is already registered does anybody know which is the problem? -- Gràcies, Rubén -- You received this message because you are subscribed to the Google Groups "Django users" group.

django admin templates: filter hides table contents

2012-02-13 Thread Gelonida N
Hi, I wanted to know whether anybody modified the django admin templates such, that the filter div could be hidden. At the moment the containing the filters may hide the contents of the table. As I can imagine, that I'm not the only one who might have large tables and doesn't like, that part

Comments Link- How to?

2012-02-13 Thread coded kid
Hi Guys, How can I link to “Django Comment form”, so that when a user clicks on the “Comment Link Name” It will display the Comment Form on the same page with the post. I hope you get my point? If you do please answer and if you don’t ask me to explain further. -- You received this message

sqlite3 database error

2012-02-13 Thread Marcus Maximus
Hey guys, i am using sqlite3 for my django app. BUT I have problems installing it. Here are my configs: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME':

Re: complete for dropdown box in admin

2012-02-13 Thread kenneth gonsalves
On Mon, 2012-02-13 at 17:15 +0530, Anoop Thomas Mathew wrote: > http://harvesthq.github.com/chosen/ > Hope this helps. > > looks just like what I wanted. And this helps too: http://bradmontgomery.net/blog/chosenjs-in-the-django-admin/ -- regards Kenneth Gonsalves -- You received this

Re: Comments Link- How to?

2012-02-13 Thread Babatunde Akinyanmi
Please Rephrase. I don't get the part of "comment link name" On 2/13/12, coded kid wrote: > Hi Guys, How can I link to “Django Comment form”, so that when a user > clicks on the “Comment Link Name” It will display the Comment Form on > the same page with the post. I hope

Re: sqlite3 database error

2012-02-13 Thread Babatunde Akinyanmi
After specifying the path to where you want your sqlite database to be i.e db name setting, after your syncdb, the database will be created automatically if it doesn't already exist in the path you stated. On 2/13/12, Marcus Maximus wrote: > Hey guys, > > i am using

Re: error while testing

2012-02-13 Thread Sandro Dutra
Think it's a name conflict with the model Location, probably it's registered 2 times in "admin.py" (line 4), or try to change the model name. 2012/2/13 xina towner : > I'm getting this error when I try to do my tests, can anybody help me > please? > > Traceback (most recent

Re: sqlite3 database error

2012-02-13 Thread ajohnston
Try changing the slashes form \ to / On Feb 13, 4:50 am, Marcus Maximus wrote: > Hey guys, > > i am using sqlite3 for my django app. BUT I have problems installing > it. Here are my configs: > > DATABASES = { >     'default': { >         'ENGINE':

Re: sqlite3 database error

2012-02-13 Thread ajohnston
Sorry. To be clearer, I should have said. In your db file name: C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell-win32- x86-3071000\test.db try changing the \ to / See: https://docs.djangoproject.com/en/dev/ref/settings/#name -- You received this message because you are subscribed to the

Re: sqlite3 database error

2012-02-13 Thread Stanwin Siow
Try this: >> DATABASES = { >> 'default': { >> 'ENGINE': 'django.db.backends.sqlite3', # Add >> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. >> 'NAME': 'test.db', # Or path to database >> file if using sqlite3. >> 'USER':

Re: error while testing

2012-02-13 Thread xina towner
Lots of Thanks :) On 13 February 2012 13:52, Sandro Dutra wrote: > Think it's a name conflict with the model Location, probably it's > registered 2 times in "admin.py" (line 4), or try to change the model > name. > > 2012/2/13 xina towner : > > I'm

Re: sqlite3 database error

2012-02-13 Thread ajohnston
Also 'Webseite' in your file path may be misspelled? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Comments Link- How to?

2012-02-13 Thread coded kid
Okay. Just like this. Comment Link Name Where "Comment Link Name" is the name you want to give to your link. So when a user click on it, it should show the comment form on the same page. I hope you now get my point? On Feb 13, 1:26 pm, Babatunde Akinyanmi wrote: >

Re: Comments form customization

2012-02-13 Thread Fabio Natali
On 02/13/2012 11:44 AM: Yeah, thanks for the reply. I followed the doc but it's not working for me. [...] Hi there! If you have an object my_object passed by your view to your template, I think you can write: {% load comments %} {% get_comment_count for my_object as comment_count %} {%

Re: Comments form customization

2012-02-13 Thread Fabio Natali
On 02/13/2012 11:12 AM, Fabio Natali wrote: http://stackoverflow.com/questions/1456267/django-comments-want-to-remove-user-url-not-expand-the-model-how-to/4766543#4766543 This link worked fine for me. :-) -- Fabio Natali FNstudio http://fnstudio.it fabio_natali@skype -- You received this

Re: Mod_Wsgi + Apache 2.2 + Threads + httplib2

2012-02-13 Thread sbrandt
mod_wsgi doesn't support print, does it? Its usage should raise an exception. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Comments Link- How to?

2012-02-13 Thread Babatunde Akinyanmi
Oh ok. Just render the comments as usual then use jquery of pure javascript to hide it by default. Tie the link to the onclick event such that it triggers the unhiding of the comment div. Simple. On 2/13/12, coded kid wrote: > Okay. Just like this. Comment > Link Name

Model field that links to a page ID, or external URL

2012-02-13 Thread Diederik van der Boor
Hi, In CMS interfaces I generally encounter a problem with URL fields. In most situations, the following options need to be supported: - An URL to an external page (Django's URLField can handle that) - An URL to an internal page (e.g. Django CMS) - An URL to an other model (e.g. article) How

Re: django-admin.py startproject doesn't work

2012-02-13 Thread James Jang
Is "django-admin.py" file in the directory, "Django-1.3.1"?? (If not copy or move the file from in "Django-1.3.1/django/bin/" to "Django-1.3.1/".) On 2월13일, 오후4시02분, raddy wrote: > I have windows7 OS and have installed Python27 and Django1.3.1 > I have also set the

Re: sqlite3 database error

2012-02-13 Thread Tom Evans
On Mon, Feb 13, 2012 at 4:01 PM, Dennis Lee Bieber wrote: > On Mon, 13 Feb 2012 01:50:12 -0800 (PST), Marcus Maximus > wrote: > > >>        'NAME': 'C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell- >>win32-x86-3071000\test.db',              

Django setup on Win7 - can't import some things

2012-02-13 Thread LostInTheTrees
I am trying to get started with Django and having some trouble. I'm using Django 1.2 to reserve the ability to go to Google's app engine if I want. I have python 2.7 installed and working on Win7. I unstalled Django 1.2 using the install script and it copied Django into the site-packages

Re: django-admin.py startproject doesn't work

2012-02-13 Thread jak.plopelor
I don't know, but on ubuntu it's call just 'django-admin' without the. py -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Django setup on Win7 - can't import some things

2012-02-13 Thread Brett Epps
Hi Bob, It sounds like you're using the 1.3 or later version of the tutorial. Class-based generic views were added in 1.3. Try this link for the correct version: https://docs.djangoproject.com/en/1.2/intro/tutorial01/ (Note the 1.2 in the URL.) Hope that helps, Brett On 2/13/12 10:35 AM,

RE: Django setup on Win7 - can't import some things

2012-02-13 Thread Bob Carlson
I guess that's it. I was conscious of the different tutorial versions, but must have gotten onto the wrong one at some point. Cheers, Bob -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Brett Epps Sent: Monday, February 13, 2012

RE: Django setup on Win7 - can't import some things

2012-02-13 Thread Bob Carlson
I'm now on the 1.2 tutorial, but a similar error message is coming up. The urls.py file is from django.conf.urls.defaults import * from polls.models import Poll info_dict = { 'queryset': Poll.objects.all(), } urlpatterns = patterns('', (r'^$',

RE: django-admin.py startproject doesn't work

2012-02-13 Thread Bob Carlson
I had this problem. I read about *.pth files and found one for the PIL library. I put a file called django.pth in .../site-packages/. I put one line in the pth file: "django\bin". I am confused about the pth file though. Should I have more directories in there? Cheers, Bob -Original

Re: Django setup on Win7 - can't import some things

2012-02-13 Thread Bill Freeman
Are you sure that you don't have something like: ... urlpatterns = patterns('polls.views', ... instead of the empty string first argument to patterns that you show? On 2/13/12, Bob Carlson wrote: > I'm now on the 1.2 tutorial, but a similar error message is coming up. The >

Re: Model field that links to a page ID, or external URL

2012-02-13 Thread Jonathan Paugh
On 02/13/2012 11:09 AM, Diederik van der Boor wrote: > Hi, > > In CMS interfaces I generally encounter a problem with URL fields. > In most situations, the following options need to be supported: > - An URL to an external page (Django's URLField can handle that) > - An URL to an internal page

Re: error

2012-02-13 Thread Jonathan Paugh
On 02/13/2012 06:51 AM, xina towner wrote: > Hi, I get this message when I try to acces to the admin page: > > AlreadyRegistered at /admin > > > The model Location is already registered > > > does anybody know which is the problem? > This is a horrible, horrible problem which I've worked

Re: django-admin.py startproject doesn't work

2012-02-13 Thread Jonathan Paugh
On 02/13/2012 11:01 AM, Dennis Lee Bieber wrote: > On Sun, 12 Feb 2012 23:02:20 -0800 (PST), raddy > wrote: ... > Can you run ANY python script (.py) file by typing its name on the > command line?... Say something that does nothing more than: > > print "I'm running"

Custom constraints on User fields

2012-02-13 Thread Nicolas Bazire
Hi, I'm looking for the right way to add custom constraints on some fields in the User model provided by django.contrib.auth. I'm not only talking about form validation, but also database constraints (for instance, unique). Basically what I want to do is make the field "email" mandatory and

Re: Custom constraints on User fields

2012-02-13 Thread Shawn Milochik
You can override and customize the forms, then manually add the unique indexes to your database. Django doesn't provide much index functionality and adding indexes to your database manually may be required for something like this or performance. Whenever possible update the related code

Re: Custom constraints on User fields

2012-02-13 Thread Nicolas Bazire
On Feb 13, 9:16 pm, Shawn Milochik wrote: > You can override and customize the forms, then manually add the unique > indexes to your database. Overriding the forms is only part of the problem. For instance, forms are not used with Model.objects.create(). I want to enforce

Re: Custom constraints on User fields

2012-02-13 Thread Shawn Milochik
On 02/13/2012 03:25 PM, Nicolas Bazire wrote: On Feb 13, 9:16 pm, Shawn Milochik wrote: You can override and customize the forms, then manually add the unique indexes to your database. Overriding the forms is only part of the problem. For instance, forms are not used with

Re: Custom constraints on User fields

2012-02-13 Thread Nicolas Bazire
On Feb 13, 9:27 pm, Shawn Milochik wrote: > On 02/13/2012 03:25 PM, Nicolas Bazire wrote: > > > On Feb 13, 9:16 pm, Shawn Milochik  wrote: > >> You can override and customize the forms, then manually add the unique > >> indexes to your database. > > >

Re: Custom constraints on User fields

2012-02-13 Thread Shawn Milochik
It's probably related to the 80/20 rule. No tool or framework is going to be 100% what you need. Use it for the 80%. When your needs can't be handled by the tool, you can choose to twist yourself into a pretzel within the constraints of the tool or break free and do it the "manual" way --

Re: Creating a hospital erp (hospital management) in Django

2012-02-13 Thread Saadat
Thank you Python_junkie I've created the poll app and I'm working on this Hospital ERP thing. I've also created the database schema and put some dummy values for testing. Then I created the models using 'inspected' command and saved the models in models.py file. Now I'm confused where to put the

Re: Creating a hospital erp (hospital management) in Django

2012-02-13 Thread Saadat
Thanks Richard House, Its my final project and I have to create something new. So I cannot work on something that has already been built. Thanks again. On Feb 10, 6:27 pm, Richard House wrote: > Hi Saadat, > Rather than creating something new, have you looked at contributing

Re: Creating a hospital erp (hospital management) in Django

2012-02-13 Thread Saadat
Hi Patricio I dont understand what you mean by System Development methodology. What exactly do you want me to let you know? Thanks On Feb 10, 6:59 pm, Patricio Valarezo wrote: > El 10/02/12 8:26, Python_Junkie escribi : > > > > > > > > > > > I had not completed my

Re: Creating a hospital erp (hospital management) in Django

2012-02-13 Thread Saadat
Yeah, the project is to be written in Django and it was meant to be written in Django only. On Feb 10, 7:05 pm, Python_Junkie wrote: > Is the project referenced in this link written in Django. > > Was your goal for your class project to write a Django app? > > On

RE: Django setup on Win7 - can't import some things

2012-02-13 Thread Bob Carlson
Thanks. That cleared the View Does Not Exist error. It was left over from the a previous state of the tutorial. Cheers, Bob -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Bill Freeman Sent: Monday, February 13, 2012 12:32 To:

Re: How can I know when the third multiple is reached in an arbitrarily long list

2012-02-13 Thread Shawn Milochik
You can use the divisibleby template tag in combination with a forloop.counter (both explained on this page): https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#divisibleby -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: How can I know when the third multiple is reached in an arbitrarily long list

2012-02-13 Thread Jason
Thank you so much Shawn - you saved the day there! -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Bsqh5-j2Q34J. To post to this group, send email to

error while running django-admin.py

2012-02-13 Thread WebServices
django-admin.py startproject throwing error - Syntax error -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Creating a hospital erp (hospital management) in Django

2012-02-13 Thread Ovnicraft
On Fri, Feb 10, 2012 at 5:58 AM, Saadat wrote: > Hello All, > I'm in my final year of computer science engineering and for my final > year project, i'm creating a hospital erp. I'm a bit confused about > where to start from. Any sort of help will be appreciated. Thanks a > lot.

Re: error while running django-admin.py

2012-02-13 Thread Kejun He
hi, paste the traceback. Maybe reinstall django can resolve the problem. On Tue, Feb 14, 2012 at 7:44 AM, WebServices wrote: > django-admin.py startproject throwing error - Syntax error > > -- > You received this message because you are subscribed to the Google

Re: Creating a hospital erp (hospital management) in Django

2012-02-13 Thread Python_Junkie
Now that you have your file >>models.py place this file in the app folder after creating your app 1. python manage.py start app My_Erp (for example) 2. a blank models.py file will be created, overwrite this with your models.py 3. run the command to sync the database, assuming that your

Populating a list in a form based on a relationship

2012-02-13 Thread dimz25
Hi all, I'm new to django/python. I have been looking through the docs since several days but cannot get it to work. This is probably some common stuff to handle. Here's the situation: My app should display a form based on the Report model. A Report has several fields (reference, na, items) A

Re: Populating a list in a form based on a relationship

2012-02-13 Thread Shawn Milochik
You override the __init__ of the form object and set the .choices property of the form field representing the items. -- 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