Re: Anyone using django tabs ?

2013-06-20 Thread tony gair
The answer I think is no , ah well. On Thursday, 20 June 2013 09:28:39 UTC, tony gair wrote: > > I am trying django tabs for my site navigation and was wondering is I have > to list multiple tabs in the html file thats inherits from base.html > > {% if request.us

Anyone using django tabs ?

2013-06-20 Thread tony gair
I am trying django tabs for my site navigation and was wondering is I have to list multiple tabs in the html file thats inherits from base.html {% if request.user.is_superuser %} {% activetab "topnav" "home" %} {% activetab "topnav" "admin" %} {% endif %} or can I say {% if request.use

Re: readonly_fields

2013-06-19 Thread tony gair
Ah thanks that explains that I'll look into changing the readonly attribute on the widget, is there a list of widgets do you know as some of these are choice fields i.e. non text and non integer fields On Wed, Jun 19, 2013 at 1:26 PM, Timster wrote: > Where are you setting that? readonly_fi

readonly_fields

2013-06-19 Thread tony gair
I have tried to use readonly_fields in a form to designate fields that the user is not allowed to change. class Meta readonly_fields = [user] e.g. However when I show the form the user can edit them.doh, btw I do want to display, but not to edit! -- You received this message be

Re: database -> model -> charting

2013-06-10 Thread tony gair
, tony gair wrote: > > I tried that on 1.5 and tried my code out in a 1.4 install. I get the same > error. Interestingly in stack overflow they mention this problem at > http://stackoverflow.com/questions/8644060/caught-typeerror-while-rendering-init-got-an-unexpected-keyword-argu

Re: database -> model -> charting

2013-06-10 Thread tony gair
I tried that on 1.5 and tried my code out in a 1.4 install. I get the same error. Interestingly in stack overflow they mention this problem at http://stackoverflow.com/questions/8644060/caught-typeerror-while-rendering-init-got-an-unexpected-keyword-argument and chartit in its own code seems to

Re: database -> model -> charting

2013-06-10 Thread tony gair
TypeError at /heating/chart/ __init__() got an unexpected keyword argument 'use_decimal' Request Method: GET Request URL: http://127.0.0.1:8000/heating/chart/ Django Version: 1.5.1 Exception Type: TypeError Exception Value: __init__() got an unexpected keyword argument 'use_decimal' Exception Loca

Re: database -> model -> charting

2013-06-08 Thread tony gair
After trying this I find a problem with the types it can use. For example it does not seem to like BigIntegerField unless there is something else I am doing wrong. Thinking about it, maybe I am letting chartit do too much for me but I do like the idea of something doing the hard thinking for me

Re: database -> model -> charting

2013-06-07 Thread tony gair
Been trying out a couple over the last few hours. I have to say, the one you mention seems streets ahead of anything else, and its documented really well, which is the clincher for me. Many thanks for that super helpful info! On Friday, 7 June 2013 11:33:07 UTC+1, Christian Schulz wrote: > > Whe

database -> model -> charting

2013-06-07 Thread tony gair
I would like to hear peoples opinions on third party django charting apps, with various considerations. My primary consideration would ease of use by a django noob. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: getting information from a many to many model from user

2013-06-07 Thread tony gair
class function ? On Thursday, 6 June 2013 13:02:02 UTC, Daniel Roseman wrote: > > On Thursday, 6 June 2013 11:00:40 UTC+1, tony gair wrote: > >> >> >> >> I use the Userena app to manage my users but I want the superuser to >> choose the organisation for

getting information from a many to many model from user

2013-06-06 Thread tony gair
I use the Userena app to manage my users but I want the superuser to choose the organisation for them so they cannot wonder around other organisations information. I can either create a foreign key in their profile to point to the organisation but then I expect they can change it, which woul

Re: CBVs and logging a user

2013-06-04 Thread tony gair
lpatterns) > > (Since the error message complains that main.urls has no url patterns in > it.) > > If you don't expect to use such a module, check your existing urls.py > files for a url pattern that does include('main.urls'), or something close. > > > On Tue,

Re: CBVs and logging a user

2013-06-03 Thread tony gair
my URLS_CONF points to my urls.py in my main project directory. The error only once I press the login button, the form is validated, the user then(correctly ) is authenticated then it fails with the error when I try to redirect it to a view. On Monday, June 3, 2013 2:45:09 PM UTC, tony gair

CBVs and logging a user

2013-06-03 Thread tony gair
I'm getting an error Request URL: http://127.0.0.1:8000/heating/login/?next=/heating/orglv/ Django Version: 1.5.1 Exception Type: ImproperlyConfigured Exception Value: The included urlconf main.urls doesn't have any patterns in it my login form and view has been modified to work off email and p

Re: django , python and ides

2013-06-03 Thread tony gair
Got to say that this looks very promising. Theres also a Django plugin too. dddjjjannnggooo! On Saturday, June 1, 2013 9:01:00 PM UTC, Doug S wrote: > > Hey I just ran into a new opensource Python IDE that looks interesting > that wasn't around when I commited to Aptana > Ninja-ide > http:

django , python and ides

2013-05-31 Thread tony gair
Python and Django are not my first languages and currently I am using it like I would a compiled language inside gedit on debian wheezy. I was actually quite surprised to find a lot of people using it on windows and macs when I went to my local python user group but enough digression!. I was wo

CBVs and using existing forms for user authentication etc

2013-05-31 Thread tony gair
I'm trying to write my first django app using cbv's and good practice ala 2 scoops! (thanks for all the help so far in this forum btw!) I have constructed the app using django braces and CBV's and have noticed that I can only authenticate into my app through the admin panel. I suspect that dj

Re: django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
not i get an error 'type object 'PremisesCreateView' has no attribute 'as_view' #urls.py ), url( regex=r'premuv/(?P\d+)/$', view=PremisesUpdateView.as_view(), name="premuv" ), do you know what I would substitute as_view() for , thank

Re: django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
django! On Thursday, 30 May 2013 11:14:27 UTC, Tom Evans wrote: > > On Thu, May 30, 2013 at 9:57 AM, tony gair > > wrote: > > > > I am using CBV / django braces for authentication. My user authorisation > > model inherits abstractuser and adds a few fields which are

Re: linking the logged in user to other models to filter query sets -( noobie )

2013-05-30 Thread tony gair
with the line self.user = kwargs.pop('user') do I need to import anything to access that the value 'user' ? On Wednesday, 29 May 2013 15:16:32 UTC, Tom Evans wrote: > > On Wed, May 29, 2013 at 3:29 PM, tony gair > > wrote: > > > > > &

django 1.5 abstractuser / accessing information of logged on user

2013-05-30 Thread tony gair
I am using CBV / django braces for authentication. My user authorisation model inherits abstractuser and adds a few fields which are foreign keys to two other models organisation and premises. When a form initialises I want to be able to examine the details of the user logged in , look to see

Re: linking the logged in user to other models to filter query sets -( noobie )

2013-05-29 Thread tony gair
2 UTC, Tom Evans wrote: > > On Wed, May 29, 2013 at 3:29 PM, tony gair > > wrote: > > > > > > I've done a basic django app with a user which contains an organisation > and > > premises foreign key inside the user model which has been inherited >

linking the logged in user to other models to filter query sets -( noobie )

2013-05-29 Thread tony gair
I've done a basic django app with a user which contains an organisation and premises foreign key inside the user model which has been inherited using the features of django 1.5. I use the organisation id and premises id inside other models which I would like to present themselves providing th

listing objects in a html file

2013-05-28 Thread tony gair
This file is used to print out the name of the premises with an update link , however I wanted to add a list of premises with the in_use flag set to false. Can anyone tell me what I am doing wrong? {% extends "base.html" %} {% block content %} Premises {% unusedpremises = [] %} {% for prem

newbie- delete confirmation

2013-05-16 Thread tony gair
I'm making a cbv with django braces I'm wanting to delete a record with a confirm form , does anyone know of an exampple to show me how to do this -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi