Entity has an event Lifecycle, how does Django do it?

2012-12-19 Thread Glyn Jackson
In other languages and frameworks I have used when you have an entity such as user. Each entity has an event lifecycle i.e. post update, pre update, post save etc The following code below is my first save using Django. But its looks very messy, it should be than user has a pre create for member

Re: Django community, is it active?

2012-12-19 Thread Glyn Jackson
@Cal Leeming some really useful information and very honest. I'm loving using Django! -- 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/-/6tebKj_Jg-wJ. To pos

Re: Django community, is it active?

2012-12-19 Thread Glyn Jackson
18, 2012 9:36:42 PM UTC, Glyn Jackson wrote: > > I'm hoping this is the right place to ask such questions, please forgive > me if not. > > I'm making a real time investment in learning another server side > language. I have 10 years ColdFusion, 5 years PHP, JAVA. Having

Re: Entity has an event Lifecycle, how does Django do it?

2012-12-20 Thread Glyn Jackson
[1]. In particular, > I'm guessing you're looking for the pre_save and post_save signals. > > [1] https://docs.djangoproject.com/en/dev/topics/signals/ > > Yours, > Russ Magee %-) > > On Wed, Dec 19, 2012 at 5:53 PM, Glyn Jackson > > wrote: > >> I

Code guidance please review.

2012-12-25 Thread Glyn Jackson
Hi, I'm new to Django and just need some guidance. Below is my attempt at creating a simple app that displays all transactions and lists the grand total called 'points' for a particular user. Now the following works and does just that, however, I'm not 100% if this is the 'correct' way nor rea

Re: Code guidance please review.

2012-12-26 Thread Glyn Jackson
ke1g, thank you for such a well written reply, clearly explained, I learn a lot. again thanks. The only bit I'm struggling to understand is the last part you state "The use of "thisPoints" in calculating "totalPoints" doesn't change "thisPoints". You can still enumerate it in the template, and

Re: Code guidance please review.

2012-12-28 Thread Glyn Jackson
thank you again Bill :0 makes perfect sense now. On Thursday, December 27, 2012 12:35:16 AM UTC, ke1g wrote: > > > > On Wed, Dec 26, 2012 at 3:50 PM, Glyn Jackson > > wrote: > >> ke1g, thank you for such a well written reply, clearly explained, I learn >> a lot.

Django admin save error: get_db_prep_value() got an unexpected keyword argument 'connection'

2013-01-03 Thread Glyn Jackson
I really struggling with my understanding of the following issue and how to resolve When I try and save (using the Django standard admin interface) I get the following error... TypeError at /admin/web/campaign/dc6eb21f-87fa-462f-88af-416cf6be37f

Django superstars I should be following?

2013-02-05 Thread Glyn Jackson
I'm looking for suggestions on who to follow on twitter. Who are the Django superstars, and the opinionated and guy/grils I should be following? :) Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Django superstars I should be following?

2013-02-05 Thread Glyn Jackson
thanks :) perfect. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@

Re: django tut 01

2014-07-28 Thread Glyn Jackson
You need to be a little more detailed about your error. When you say "Can't access database sqlite3" are you referring to permissions? Please post your settings. In the mean, time check you have the correct read/write permissions on the directory.Try "sudo python manage.py syncdb" (notice the

I'm getting obsessed! Where should I put this code?

2014-02-09 Thread Glyn Jackson
I'm getting obsessed! I have an API (TatstyPie) which saves a product. Every time this resource is saved I assign stock or rise an error if their is no stock. *get and allocate some stock:* stock = Stock.objects.filter(availability="Available", product=product)[:1].get() *check we have stock

Re: I'm getting obsessed! Where should I put this code?

2014-02-10 Thread Glyn Jackson
Thank you so much for all your comments, they were very helpful. After reading '*a lot*' I think I've found some calm. I decided to move all validation into validation.py. I then used these functions in both forms and the models i.e. mobile = PhoneNumberField(validators=[validate_mobile]) I

Re: heroku better for django?

2014-02-11 Thread Glyn Jackson
If you have a small app it's darn easy. I have personal experience with Amazon AWS which is by far a better choice. I wrote a guide on setup with Django if it helps: http://glynjackson.org/weblog/entry/django-15-deployement-amazon-ec2-ubuntu.html At the end of the day Heroku runs on AWS instance

Re: Django admin broken after putting into production

2014-02-11 Thread Glyn Jackson
> > Silly question, don't be offended, but have you run > collectstaticon > your production server? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Django Rest Framework create api-root ???

2014-06-20 Thread Glyn Jackson
The documentation explains this very well: http://www.django-rest-framework.org/tutorial/5-relationships-and-hyperlinked-apis -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send