Url logic

2013-12-15 Thread giuliano . bertoletti
Hello, I'm wondering how you would you organize the url layout in a following scenario Suppose I've a table of Authors and for each author a list of books. A book can have only one author, so I link the author with a foreign key. Now I could point to a particular author with a url like thi

Django Debug Toolbar 1.0 beta released

2013-12-15 Thread Aymeric Augustin
Hello, I'm happy to annonce that we're almost ready to release version 1.0 of the Debug Toolbar! Now we need your help to try the beta: https://github.com/django-debug-toolbar/django-debug-toolbar/releases/tag/1.0-beta The documentation is available on Read the Docs — make sure you read the "la

Re: Url logic

2013-12-15 Thread Drew Ferguson
Hi You can get at components passed in the url in views like this class AuthorView(DetailView): model = Author def get_context_data(self, **kwargs): context = super(AuthorView, self).get_context_data(**kwargs) slug = self.kwargs['slug'] So if you are adding a book you can do somethi

SelectDateWidget doesn't work after reload

2013-12-15 Thread voger
I am trying to make a sign up form and there I want to get the users birth date. I want to use the select date widget. in my models.py I have set a model field: birth_date = models.DateField(verbose_name='Birth Date') and my forms.py looks like this: from django import forms from django.forms

View decorators before CSRF verification?

2013-12-15 Thread Dalton Hubble
I have a function based view that should only respond to GET and HEAD requests so I used the @require_safe decorator. @require_safe def myview(request): # logic so the expected response from a POST request is a 405 Response Not Allowed. Using Postman to send a POST to the corresponding url,

Making sure I'm not missing out on some must have Django apps

2013-12-15 Thread Some Developer
Right so it has been quite awhile since I updated my list of must have Django apps. I was wondering if anyone had any suggestions? Currently I use the following in all my Django projects: Django Debug Toolbar debug_toolbar_htmltidy inspector_panel debug_toolbar_user_panel South Django Compresso

Re: Installing Django

2013-12-15 Thread Frederick Miller
Thank you, Mulianto. On Friday, December 13, 2013 1:10:04 AM UTC-5, Mulianto wrote: > > Frederick, > > Python installer on windows by default install in c:\python 2.x\ > > And all package like django and others will be under python folder install > in libs\site-package\ > > Better look to use vir

Re: Installing Django

2013-12-15 Thread Frederick Miller
Thank you, Mike. On Thursday, December 12, 2013 10:17:39 PM UTC-5, Mike Dewhirst wrote: > > Frederick > > On Windows, the easiest (decision-less) way to install Django is using pip > or easy-install. Get pip first if you haven't done so already. Django will > then end up in exactly the right pla

Re: Installing Django

2013-12-15 Thread Frederick Miller
Thank you, Thomas. On Thursday, December 12, 2013 5:08:19 PM UTC-5, Thomas wrote: > > On 12/12/13 1:55 PM, Frederick Miller wrote: > > For Windows XP, should Django be installed under the Python27 folder? > > Or should Django be on the root of the C: drive? > > I have no experience with Windo

Re: Installing Django

2013-12-15 Thread Frederick Miller
Thank you, Guddu. On Thursday, December 12, 2013 9:19:40 PM UTC-5, Guddu wrote: > > It goes into Lib\site-packages folder. > > Regards, > Anurag > > > On Thu, Dec 12, 2013 at 6:55 PM, Frederick Miller > > > wrote: > >> For Windows XP, should Django be installed under the Python27 folder? Or >>

Re: Making sure I'm not missing out on some must have Django apps

2013-12-15 Thread Sebastian Morkisch
Some short description of these plugins are appreciated. Maybe a link? Am Sonntag, 15. Dezember 2013 17:43:32 UTC+1 schrieb Some Developer: > > Right so it has been quite awhile since I updated my list of must have > Django apps. I was wondering if anyone had any suggestions? > > Currently I use

Re: Making sure I'm not missing out on some must have Django apps

2013-12-15 Thread Lee Hinde
I googled the list without any problem. On December 15, 2013 at 2:21:42 PM, Sebastian Morkisch (semo...@googlemail.com) wrote: Some short description of these plugins are appreciated. Maybe a link? Am Sonntag, 15. Dezember 2013 17:43:32 UTC+1 schrieb Some Developer: Right so it has been quite a

Re: Making sure I'm not missing out on some must have Django apps

2013-12-15 Thread Frank Bieniek
Hi, I would add some: django-userena - user self registration django-organizations - user and organizations django-guardian - object level permissions django-paranoia - paranoid security stuff django-cache machine / johnny-cache Thx Frank Am 15.12.13 17:43, schrieb Some Developer: Right so it ha

Re: Error Doing python manage.py syncdb in django pyBB

2013-12-15 Thread Frank Bieniek
django.utils.simplejson is deprecated; use json instead. Hi Alok, it seems pyBB is not django 1.6 compatible - simplejson got deprecated in 1.6 just my 2 cents Frank Am 14.12.13 15:15, schrieb Alok Nag: Hello Experts, I am newbie to Django/Python. I am trying to setup a forum app using py

Initial sql question

2013-12-15 Thread Larry Martell
My model is named foo, but my tables start with bar_ (I set the table names in the Meta class in my models). I have an initial sql file in app/foo/sql/blah.sql to initialize bar_blah, but it is not getting executed. Is this because of the difference in the model name and table prefix? -- You rece

Re: View decorators before CSRF verification?

2013-12-15 Thread Simon Charette
Hi Dalton, > Is this something to be bothered about? This is a request for advice and discussion rather than debugging a particular problem. I think I would prefer if there were a way for Django to check for view decorator compliance first because I think a 405 response is more descriptive and