Re: Little baffled: object has no attribute 'save' only when running tests.

2014-11-24 Thread Detectedstealth
Never mind I need some sleep I named my TestCase with the same name as my model... I can't believe I didn't see that. class FishType(TestCase): On Monday, November 24, 2014 2:31:33 PM UTC-8, Detectedstealth wrote: > > When writing a test to just try and create an object from my model

Little baffled: object has no attribute 'save' only when running tests.

2014-11-24 Thread Detectedstealth
When writing a test to just try and create an object from my model I get the following error: line 10, in test_saving_and_retrieving_fishtypes test2.save() AttributeError: 'FishType' object has no attribute 'save' tests.py from django.test import TestCase from trip.models import

Re: Django 1.5 sendemail when doing password reset

2013-01-15 Thread Detectedstealth
Found the issue, there was no from_email but still have no idea why I got that error for there not being an email. PasswordResetForm save send_mail(subject, message, from_email, [to_email]) On Tuesday, January 15, 2013 7:28:03 PM UTC-8, Detectedstealth wrote: > > Hi, > &

Django 1.5 sendemail when doing password reset

2013-01-15 Thread Detectedstealth
Hi, For some reason when trying to use password reset I am getting the following message: SMTPDataError: (550, 'Administrative prohibition') However when I send emails from other areas in the application I don't have this issue. What can be causing this? -- Regards, Bruce -- You received

Image upload remove old files - is there a better way then mine?

2012-12-19 Thread Detectedstealth
Hi, For my application I created a custom ImageField (code below) as I need to automatically generate a few different sets of thumbnails. I read the posts on the requests for Django to delete old images when uploading, and was blown away to see the request for that feature turned down. I still

Re: ImageField in admin always required

2012-12-16 Thread Detectedstealth
Thanks required=False is what I needed :). "ImageField is not required as expected" Isn't that what you want? :) Yes that is exactly what I wanted but also wanted to display the actual setting the required=False allows me to have my cake and eat it too :). Not sure why required vs blank,

Re: django-registration fork for 1.5?

2012-12-16 Thread Detectedstealth
You really don't need a fork I am using the latest dev build of django and the only thing you need to change is the direct_to_template in the urls.py to use the new class based views and everything else works as is, I even have a custom user. On Wednesday, December 12, 2012 2:44:53 PM UTC-8,

Re: ImageField in admin always required

2012-12-12 Thread Detectedstealth
ImageField however I get errors __init__() got an unexpected keyword argument so I guess I can't use them options. If I comment out the def formfield_for_dbfield(self, db_field, **kwargs): then the ImageField is not required as expected. On Thursday, December 6, 2012 2:47:57 PM UTC-8, Detectedste

ImageField in admin always required

2012-12-06 Thread Detectedstealth
Hi, I have a picture for my custom user declared as follows: class CustomUser(AbstractBaseUser): picture = models.ImageField(upload_to='profile_pictures', null=True, blank=True) In admin I use the image class CustomUserAdmin(UserAdmin): fieldsets( ('Profile details', {

Re: Multiple stackinline all sharing relation need assistance

2012-12-06 Thread Detectedstealth
) On Thursday, December 6, 2012 1:41:21 PM UTC-8, Detectedstealth wrote: > > Hi Andrew, > > I think you are right the queryset is a must. However how do I find the > selected user inside the queryset, I don't want the logged in user. For > example if I go to edit user ID 2 in t

Re: Multiple stackinline all sharing relation need assistance

2012-12-06 Thread Detectedstealth
.admin.ModelAdmin.queryset > > - Andrew. > > > > On Thursday, December 6, 2012 2:50:43 PM UTC+8, Detectedstealth wrote: >> >> See the attachment. >> >> The dropdown is showing a work experience that was added by a different >> user. The dropdown should onl

Multiple stackinline all sharing relation need assistance

2012-12-05 Thread Detectedstealth
Hi, I have a custom user who has work experience, and for each work experience there can be multiple recommendations for the work experience. My models: CustomUser class WorkExperience(models.Model): user = models.ForeignKey(CustomUser, verbose_name=_('user profile')) company =

Re: Django 1.6-dev Custom User admin.StackedInline - Bug

2012-12-04 Thread Detectedstealth
UPDATE: This is fixed with the latest git code pull. I pulled approx. 5mins ago. On Saturday, December 1, 2012 2:03:03 PM UTC-8, Detectedstealth wrote: > > Hi I just found when creating a custom user then using a StackedInline > everything will show up as expected however, when I

Re: django1.5 subclass AbstractUser, How to get a password-(re)set field in admin

2012-11-29 Thread Detectedstealth
Hi Russel, I have followed https://docs.djangoproject.com/en/dev/topics/auth/#a-full-example then added: password = ReadOnlyPasswordHashField(label=_("Password"), help_text=_("Raw passwords are not stored, so there is no way to see " "this user's password, but

Re: DATABASE in settings file not working

2012-02-17 Thread Detectedstealth
Ok it looks like there is an issue with my desktop. I did everything from scratch on my labtop (also running opensuse) and changes to the settings file now work On Feb 17, 9:05 pm, Detectedstealth <bruce.w...@gmail.com> wrote: > I am starting to wonder if it is an opensuse bug. I am

Re: DATABASE in settings file not working

2012-02-17 Thread Detectedstealth
I am starting to wonder if it is an opensuse bug. I am thinking about switching back to Ubuntu. On Feb 17, 9:04 pm, Detectedstealth <bruce.w...@gmail.com> wrote: > Yeah I have tried removing settings.pyc and __init__.pyc it > regenerates the *.pyc files but still is not reading

Re: DATABASE in settings file not working

2012-02-17 Thread Detectedstealth
t while I was typing my reply > > your message had already been delivered to the group. > > > On 2/17/12, Detectedstealth <bruce.w...@gmail.com> wrote: > > > I can connect with the same credentials that isn't the problem. > > > > The problem is if I set a

Re: DATABASE in settings file not working

2012-02-17 Thread Detectedstealth
then restart the server (That works on ubuntu). > > Also you should consider creating a separate user instead of using root. > > On 2/17/12, Detectedstealth <bruce.w...@gmail.com> wrote: > > > > > > > > > > > Hi, > > > I am just coming back to

Re: DATABASE in settings file not working

2012-02-17 Thread Detectedstealth
I have it working, however I need to provide the settings file when running all commands: python manage.py runserver --settings=settings On Feb 17, 6:11 am, Detectedstealth <bruce.w...@gmail.com> wrote: > Hi, > > I am just coming back to django development after a while

DATABASE in settings file not working

2012-02-17 Thread Detectedstealth
Hi, I am just coming back to django development after a while of developing with pyramid. I have taking over an application. For some reason with the newest version of django it is not reading the password I set in settings: DATABASES = { 'default': { 'ENGINE':

Re: Django, Python, AJAX position

2010-11-30 Thread Detectedstealth
If we are able to work from home then I will for sure provide my resume. Home = Canada On Nov 30, 7:37 am, Bita Bita wrote: > My client  is in an immediate need for a front end engineer who knows > Django, Python, AJAX, and/or html5 . This is a full time position with > a

Slug for some terms not working

2010-11-29 Thread Detectedstealth
I am completely at a loss here and have no idea what the problem is: A slug was created for the term escape. So website.com/projects/ escape/ url patterns: url(r'^projects/(?P[-\w]+)/$', 'views.projectslug', name='view_project_slug'), view: def projectslug(request, slug): """Displays the

Django Games

2010-11-24 Thread Detectedstealth
Has anyone ever used django to allow people to add games to there site like facebook has? So allow them to create an application, generate the api key's, then load there game into an iframe. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: UserProfile

2010-10-13 Thread Detectedstealth
Take a look at my site: http://www.wcfree.com you will have to register etc but once you are done let me know if that is what you are looking for with user profiles and having the image available etc... If so I can help you. PS: Make sure to email me your username after you are finished so i can

Need suggestions for autocomplete profile

2010-10-01 Thread Detectedstealth
Hi, I am using autocomplete on my site for country, state/province and city. Problem: Some people type USA instead of United States. NY instead of New York etc... Question: How can I make an auto complete field not accept anything except the data that is pulled from the database? -- You