Contact us form

2011-06-01 Thread Pulkit Mehrotra
I am trying to make a contact us form which will send a mail to me using the smtp server .It will load the thank you page after form submission .Everything is working something ,the thank you page is loading and i am not getting any errors ,but i am not getting the mails. here is my views.py fi

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Ryan
The model code still needs to stay in the model, it is just the save_model method had to be moved to the admin.py. I think the following is what you are looking for: models.py --- from django.db import models from django.contrib.auth.models import User class AuditedTable(models.Mod

getting 'NoneType' object is unsubscriptable errors

2011-06-01 Thread saureen adani
Hi, I am getting the following errors on some of the web pages --- 'NoneType' object is unsubscriptable Request Method: GET Request URL:http://nerd.hoonur.com/mypage/4605f1e14430950e07b74b5374472f00 Exception Type: Typ

Re: Chained forms

2011-06-01 Thread bruno desthuilliers
On May 31, 6:55 pm, Marc Aymerich wrote: > Hi!, > I'm writing an admin action. > This action needs to collect some information before execute the "final > task". > In order to collect this information the user should fill 3 consecutive > forms, (once they submitted one, another is rendered). > > M

Re: getting 'NoneType' object is unsubscriptable errors

2011-06-01 Thread Daniel Roseman
On Wednesday, 1 June 2011 08:48:13 UTC+1, saureen adani wrote: > > > Hi, > > I am getting the following errors on some of the web pages > > --- > > 'NoneType' object is unsubscriptable > > Request Method: GET > Request URL: > http://nerd.hoon

Re: Contact us form

2011-06-01 Thread Daniel Roseman
On Wednesday, 1 June 2011 08:01:33 UTC+1, Pulkit Mehrotra wrote: > > I am trying to make a contact us form which will send a mail to me using > the smtp server .It will load the thank you page after form submission > .Everything is working something ,the thank you page is loading and i am not >

Re: Model 'Child' is inherited from 'Parent', trying to filter to get only Child results with Parent.objects.filter(...)

2011-06-01 Thread robin
Yes that works, thank you. I've submitted a bug report here https://code.djangoproject.com/ticket/16135 The bug is that Parent.objects.filter(child__isnull=False) is not giving the result I expect. On Jun 1, 10:40 am, Matías Aguirre wrote: > This worked on on Django 1.2.5: > >     Parent.objects.

Re: Passing parameters to form class

2011-06-01 Thread skyde
Thank you very much! I had not realised the self.fields['vaihtoehdot'] part! Best regards, skyde On Jun 1, 12:01 am, "christian.posta" wrote: > Yes, you will want to do this within the __init__ method. > > Run the super class's init method first so that everything's > initialized as normal. > >

Re: getting 'NoneType' object is unsubscriptable errors

2011-06-01 Thread Tom Evans
On Wed, Jun 1, 2011 at 8:48 AM, saureen adani wrote: > > Hi, > > I am getting the following errors on some of the web pages > > 'NoneType' object is unsubscriptable > > Help would be highly appreciated ! This error occurs when you attempt to subscript a variable that is None. IE: >>> a=None >>>

Re: Does django 1.3 has a ubuntu deb package released!

2011-06-01 Thread Mike
I used: sudo apt-get install python-pip sudo pip install django On Apr 29, 7:29 pm, Korobase wrote: > Does django 1.3 has a ubuntu deb package released ! > I have googled but get none,Any one have done this? > Thanks. > > -- -- You received this message because you are subscribed to the Googl

django-schedule + location model

2011-06-01 Thread Mike
Hi all, I need to make a scheduling app and have found django-schedule: https://github.com/bartekgorny/django-schedule Not sure if it is the best choice, as the author seems to have disappeared, but the others I'd found looked too simplistic. I've installed the demo, and got it working. However

Re: Contact us form

2011-06-01 Thread Brett Hutley
It's probably your sendmail configuration on your server. Can you send email from the command-line? Try using the command "mail m...@email.com" You can also tell django to use a different mail server than localhost using the EMAIL_HOST, EMAIL_PORT, etc settings in your settings.py file. On 1 J

can't import flup.server.fcgi

2011-06-01 Thread Chenglong Chen
i saw this bug has been fixed after 1.1plpha version,but it appeared now windows xp django1.3 flup1.0.2 -- 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

Re: Passing parameters to form class

2011-06-01 Thread Derek
On Jun 1, 11:39 am, skyde wrote: > Thank you very much! I had not realised the self.fields['vaihtoehdot'] > part! > > Best regards, > skyde For what it's worth (as this question comes up from time to time and, occasionally, people actually search in the archives before asking again...), I'll add

Re: Passing parameters to form class

2011-06-01 Thread skyde
Thank you for the links! I had actually skimmed the first of those and I could not see at the time how it related to my problem. The second is very interesting and I'll try to read both of them asap. Rant begins... Most of my issues stem of poor understanding of python and not directly related to

Re: Passing parameters to form class

2011-06-01 Thread Derek
On 1 June 2011 14:13, skyde wrote: > Thank you for the links! > > I had actually skimmed the first of those and I could not see at the > time how it related to my problem. > The second is very interesting and I'll try to read both of them asap. > > Rant begins... > Most of my issues stem of poor

DeprecationWarning: A Field class whose get_db_prep_value method hasn't been updated to take `connection` and `prepared` arguments

2011-06-01 Thread tom
Hello, since I have upgraded to django 1.3 i see following errors: DeprecationWarning: A Field class whose get_db_prep_value method hasn't been updated to take `connection` and `prepared` arguments There are following packges installed: INSTALLED_APPS = ( 'debug_toolbar', # OK 'django.co

Re: django-profiles and get_absolute_url

2011-06-01 Thread Andrew Sledge
Patch was submitted here: https://bitbucket.org/ubernostrum/django-profiles/issue/10/user-names-cant-have-periods-etc#comment-502428 On May 31, 5:17 pm, Andrew Sledge wrote: > Thank you Matias. > > Your syntax was a little off, but you did solve it. Here is the > correct syntax: > > import profil

Freelance Python/Django Developers Required‏

2011-06-01 Thread Farhan Ahmed
Hi Everyone, I am looking for freelance Python/Django developers for a USA based company to work from home. Please contact at farhan_ahme...@odesk.com or fa_mali...@yahoo.com for more information. Thanks, Farhan http://pk.linkedin.com/pub/farhan-malik/34/361/221

Re: Chained forms

2011-06-01 Thread Marc Aymerich
On Wed, Jun 1, 2011 at 9:52 AM, bruno desthuilliers wrote: > On May 31, 6:55 pm, Marc Aymerich wrote: >> Hi!, >> I'm writing an admin action. >> This action needs to collect some information before execute the "final >> task". >> In order to collect this information the user should fill 3 consecu

Re: DeprecationWarning: A Field class whose get_db_prep_value method hasn't been updated to take `connection` and `prepared` arguments

2011-06-01 Thread Brendan Smith
i've also got this warning on a bone stock django install + mysql backend. I've started to just ignore it for now On Wed, Jun 1, 2011 at 9:08 AM, tom wrote: > Hello, > > since I have upgraded to django 1.3 i see following errors: > DeprecationWarning: A Field class whose get_db_prep_value method

Re: Contact us form

2011-06-01 Thread Pulkit Mehrotra
thank you that was helpful the settings were not correct django form is great -- 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/-/RWtBR3JNZ21DaHdK. To post to

Re: DeprecationWarning: A Field class whose get_db_prep_value method hasn't been updated to take `connection` and `prepared` arguments

2011-06-01 Thread tom
Hi, thanks for the quick response. Well, I am not seeing it, when I create a complete new project. regards, tom On 1 Jun., 16:07, Brendan Smith wrote: > i've also got this warning on a bone stock django install + mysql backend. > I've started to just ignore it for now > > > > > > On Wed, Jun 1,

adding objects via admin section from ipad/iphone

2011-06-01 Thread i...@webbricks.co.uk
i wonder if anyone has any suggestions around this issue. I'm using zinnia blog engine in a couple of sites. customer has had his head turned by an SEO genius (!) who reckons wordpress is far better for google search results than zinnia. customer starts thinking about moving back to wordpress. im

Re: adding objects via admin section from ipad/iphone

2011-06-01 Thread Tom Evans
On Wed, Jun 1, 2011 at 4:07 PM, i...@webbricks.co.uk wrote: > i wonder if anyone has any suggestions around this issue. > > I'm using zinnia blog engine in a couple of sites. customer has had > his head turned by an SEO genius (!) who reckons wordpress is far > better for google search results tha

Seeking a Django 1.3 and syslog configuration example

2011-06-01 Thread Rob
I'm having no luck finding any information on setting up syslog logging with Django 1.3 dictionary configuration. The Django documents don't cover syslog and the python documentation is less than clear and doesn’t cover dictionary config at all. I've started with the following but I'm stuck on how

mod_wsgi on cPanel/WHM gets easier

2011-06-01 Thread shacker
If you run a cPanel/WHM server, and have manually compiled mod_wsgi in the past, you know that updating apache/php for the rest of your server is a pain, since the easy_apache build script is unaware of the custom mod_wsgi module and discards it during compilation. And since you have enabled mod_w

Re: Seeking a Django 1.3 and syslog configuration example

2011-06-01 Thread Shawn Milochik
This should help out. It's for a file, not SysLogHandler, but the idea is the same. Just take any arguments you would normally pass to the handler if you were creating it programmatically and add them as keys to the dictionary: 'log_file': { 'level': 'DEBUG', '

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Lee
Ryan- that helps a ton, thanks much. I don't think created_by and updated_by should be foreign keys, because a user can be deleted but all of his record adds/updates need to persist. So I replaced those two lines with: created_by = models.CharField(blank=True,max_length=20,editable=False) updated_

Consistent Export

2011-06-01 Thread David Stolarsky
I am using Django as a content admin backend for a desktop application. The desktop application needs to cache the Django DB structure and uploaded files directory from the remote server running Django. This is accomplished with an "export" django app I wrote which serves up the DB as JSON (using c

column cannot be null

2011-06-01 Thread podio
I'm getting an error leaving a field blank but I have blank = True in the model IntegrityError at /admin/afiliados/afiliado/add/ (1048, "Column 'titular_id' cannot be null") Request Method: POST Request URL:http://localhost/mysite/admin/afiliados/afiliado/add/ Django Version: 1.3 Exception Typ

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Lee
Found the solution to display the audit fields in the change list and change form -- add these lines in admin.py: class Entity1Admin(AuditAdmin): list_display = ('title','created','created_by','updated','updated_by') readonly_fields = ('created','created_by','updated','updated_by') So now I j

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Ryan
That bit is the easy bit :p Just change request.user to request.user.username Ryan -- 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/-/RXpUd1BTX2E3RVVK. To po

column cannot be null

2011-06-01 Thread Ryan
blank = True means that a django form will not require a value, but the database still does so it's expected that you provide a value elsewhere. In order to allow a null entry into the database, you will need to add null = True to that definition aswell Hope this helps, Ryan -- You received

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Lee
Bingo! Everything's working. Here's the complete solution for others: models.py - from django.db import models from django.contrib import admin class AuditedTable(models.Model): created = models.DateTimeField(auto_now_add=True) created_by = models.CharField(blank=True,max_length=2

Re: Auditing Record Changes in All Admin Tables

2011-06-01 Thread Ryan
No problem. One final piece of advice would be to move the readonly_fields out of Entity1Admin and into AuditAdmin. That way you only have to define it once and inherit from it as with all the other options rather than re-defining it for each new model. Ryan -- You received this message bec

Re: save out a test database?

2011-06-01 Thread Margie Roginski
That's a good pointer, thanks. However I'm still confused about how I can actually dump out the data from my test run? For example, say I have a particular test and I want to dump the data at some certain point. I can put in pdb.set_trace() in the code to stop at the appropriate point, but what

Re: Django app for data management and visualization

2011-06-01 Thread Andre Terra
Hi Alessio, How are you? Your use case is *very* similar to mine, as our department also goes down the SAP-XLS-PPT path weekly and I'm in charge of making this task easier, faster and less error prone. Have you moved forward with this project at all? I'd love to take a look at some code, assuming

Re: spawning threads within test cases in django test framework

2011-06-01 Thread Duane Griffin
On 31 May 2011 22:01, Brian wrote: > I've got a django app with a periodically scheduled background task that > updates the database. I've written a bunch of tests for its principal class > that are run as part of the django unit test framework. I want to convert > the class to do its work using m

Re: save out a test database?

2011-06-01 Thread Kirill Spitsin
On Wed, Jun 01, 2011 at 11:59:28AM -0700, Margie Roginski wrote: > That's a good pointer, thanks. However I'm still confused about how I > can actually dump out the data from my test run? For example, say I > have a particular test and I want to dump the data at some certain > point. I can put i

Re: Overridden Admin Template Not Recognized

2011-06-01 Thread Lee
TEMPLATE_LOADERS has that line out of the box in 1.3 I moved my app before admin in INSTALLED_APPS but no help. Finally found the answer in this post: http://stackoverflow.com/questions/2263808/how-to-override-django-edit-inline-tabular-html-for-only-1-app Put tabular.html in myproject/templates

Re: spawning threads within test cases in django test framework

2011-06-01 Thread Kirill Spitsin
On Tue, May 31, 2011 at 02:01:00PM -0700, Brian wrote: > I've got a django app with a periodically scheduled background task that > updates the database. I've written a bunch of tests for its principal class > that are run as part of the django unit test framework. I want to convert > the class

Django 1.3 docs PDF

2011-06-01 Thread Oscar Carballal
Hello, I've just created a PDF (5.6MB, 1042 pages) with all the django 1.3 docs [|], just in case someone need it (sometimes it's useful to have the docs offline). Cheers, Oscar [1] http://clionesoftware.com/files/docs/django1.3.pdf -- You received this message because you are subscribed to th

Re: spawning threads within test cases in django test framework

2011-06-01 Thread Brian
Thanks for the replies. I realised that I could reorganise the code so that all the database updating was done in the main thread. Re TransactionTestCases, I knew I'd read something related to that but didn't find it when I went looking yesterday evening; it sounds like that would have worked i

Re: Django Admin static base.css ignored

2011-06-01 Thread Lee
This worked for me: settings.py -- STATIC_ROOT = '/path_to_my_project/static/' STATIC_URL = '/static/' STATICFILES_DIRS = ('/path_to_my_project/css/',) STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirecto

Re: Django 1.3 docs PDF

2011-06-01 Thread Jacob Kaplan-Moss
On Wed, Jun 1, 2011 at 4:47 PM, Oscar Carballal wrote: > I've just created a PDF (5.6MB, 1042 pages) with all the django 1.3 > docs [|], just in case someone need it (sometimes it's useful to have > the docs offline). Also see http://readthedocs.org/projects/django/, which has got links to PDF do

Can the admin be configured to save generic content types with the id of the base model of an inherited model

2011-06-01 Thread Nathan Geffen
Hi I hope this question isn't too obscure. I have a base model (not abstract) called BasicPost. I have a model inheriting from it called PostWithImage. BasicPost has a couple of generic relations. In models.py: class BasicPost(models.Model): ... authors = generic.GenericRelation(Ordered

Re: Django 1.3 docs PDF

2011-06-01 Thread Brice Leroy
Nice job Oscar. That goes straight into my iBook :) 2011/6/1 Oscar Carballal > Hello, > > I've just created a PDF (5.6MB, 1042 pages) with all the django 1.3 > docs [|], just in case someone need it (sometimes it's useful to have > the docs offline). > > Cheers, > Oscar > > [1] http://clionesoft

Cleaned Data Different Access?

2011-06-01 Thread Robin
In a Form subclass, why do we have to use self.cleaned_date['fieldname'] in the clean_fieldname() method and self.cleaned_data.get("fieldname") in the clean() method for the form overall? In the clean_fieldname() method, we're looking up the cleaned python object / value in the cleaned_data dictio

Re: Django 1.3 docs PDF

2011-06-01 Thread Gath
Good stuff, thanks. On Jun 2, 12:47 am, Oscar Carballal wrote: > Hello, > > I've just created a PDF (5.6MB, 1042 pages) with all the django 1.3 > docs [|], just in case someone need it (sometimes it's useful to have > the docs offline). > > Cheers, > Oscar > > [1]http://clionesoftware.com/files/d

Re: Django 1.3 docs PDF

2011-06-01 Thread Oscar Carballal
Didn't know that django had a page on readthedocs.org. But even when the RTD API generates the same document, it has one fault, the content index, sometimes it does not generate it (I've come up with this issue when generating the PDF by hand using the RTD code, I had to run pdflatex two times to g

Re: Rendering django message stops script

2011-06-01 Thread Gabe
Anyone any suggestions, please? Gabe On 29 Maj, 17:29, Gabe wrote: > Hi, > > my problem is that I have somewhere in my .html file this code: > > {% if messages %} >     >         {% for message in messages %} >         {{ > message }} > >         {% endfor %} >     >     {% endif %} > > In on