Re: Unable to establish odbc connection to MS SQL Server

2020-04-27 Thread Darren Williams
Lets On Apr 27, 2020 10:31 PM, "Gurmeet Kaur" wrote: Hi There, I have also implemented this in my project. The code in my settings.py is below. You could also try the same. DATABASES = { 'default': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'MyDbName', 'USER': 'user'

Re: Pass post data to UpdateView

2020-04-26 Thread Darren Williams
Talk to me On Sun, Apr 26, 2020, 18:18 Darren Williams wrote: > Ain't really sure learning myself but I look into it for you > > On Apr 26, 2020 8:02 AM, "'MH' via Django users" < > django-users@googlegroups.com> wrote: > > Hi > >

Re: Pass post data to UpdateView

2020-04-26 Thread Darren Williams
Ain't really sure learning myself but I look into it for you On Apr 26, 2020 8:02 AM, "'MH' via Django users" < django-users@googlegroups.com> wrote: Hi I do not know how to access request.POST, when I call UpdateView. Just to avoid a misunderstanding: I do not want to process the data after upd

numjobs returned from glassdoor API is not equal to it showed on the website

2016-11-25 Thread Darren Li
I am trying to get some company information from glassdoor by itsAPI, but i found the number of jobs returned from API is not equal to it showed on website for most companies. I am providing my api url and result as followed. I have two questions: 1. for 'Merkle', why numjobs on the website

Re: Django image upload not saving

2014-06-26 Thread Darren Spruell
tive path from the MEDIA_ROOT where you want images for that model stored. -- Darren Spruell phatbuck...@gmail.com > View: > > from models import Article, Edit > from forms import ArticleForm, EditForm > from forms import * > from PIL import Image > fro

Combining use of template tag + filter in same expression

2014-06-26 Thread Darren Spruell
description|truncatewords:2 %} Can this be made to work? Or is the combination of firstof and a filter on more than the last variable unsupported? Python 2.7.7 Django 1.6.5 -- Darren Spruell phatbuck...@gmail.com -- You received this message because you are subscribed to the Google Groups &

Re: Have browsers broken post-redirect-get? best practice now?

2013-10-03 Thread Darren Spruell
> email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/c

Re: Dealing with redundant JS inclusions at template levels

2013-09-30 Thread Darren Spruell
o-sekizai.readthedocs.org/en/latest/ Seems interesting, I'll look into it more. To be honest, I think I'm looking for a best practice rather than a solution; how are others managing redundant JS includes when combining their own projects and reusable apps? I imagine there's no app r

Dealing with redundant JS inclusions at template levels

2013-09-29 Thread Darren Spruell
this. -- Darren Spruell phatbuck...@gmail.com -- 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

Re: Executing validation on entry to class-based views

2013-09-29 Thread Darren Spruell
est at that point. >> >> What I'd like to implement: >> >> if not settings.SOMEAPP_SETTINGS.get('sender_address'): >> messages.error(self.request, "Configuration error: >> submission sender address not found. Configure SOMEAPP_SETTINGS in

Executing validation on entry to class-based views

2013-09-25 Thread Darren Spruell
What I'd like to implement: if not settings.SOMEAPP_SETTINGS.get('sender_address'): messages.error(self.request, "Configuration error: submission sender address not found. Configure SOMEAPP_SETTINGS in your project settings file.") return re

Handling temporary file storage with WizardView

2013-09-13 Thread Darren Spruell
ble is populated containing path from mkdtemp() to delete later 3. View processes form 4. View calls shutil.rmtree to delete temporary directory and file 5. View complete How far off of target am I? Is there a good way to do the above file resource management using WizardView? -- Darren Spruell

Warning about old install when upgrading via pip

2013-09-02 Thread Darren Spruell
jango Cleaning up... Is this an expected warning when upgrading Django via pip? And any reason I'd be seeing references to the system-wide install (outside of virtualenv) when I'm doing this upgrade within an active virtualenv? -- Darren Spruell phatbuck...@gmail.com -- You received

Re: Form Validation Error: 'No' value must be either True or False.

2013-05-03 Thread Darren Mansell
py file buried underneath everything, which did have the fields as BooleanField. Wow. 2 whole days to find that. On 3 May 2013 13:49, Darren Mansell wrote: > > > > On 3 May 2013 13:06, Tom Evans wrote: > >> On Fri, May 3, 2013 at 12:38 PM, Darren Mansell >> wrote: &

Re: Form Validation Error: 'No' value must be either True or False.

2013-05-03 Thread Darren Mansell
On 3 May 2013 13:06, Tom Evans wrote: > On Fri, May 3, 2013 at 12:38 PM, Darren Mansell > wrote: > > > > Another bit of info, just in case anyone is currently looking at this.. > > > > The error is coming from > > > /usr/local/lib/python2.7/dist-packa

Re: Form Validation Error: 'No' value must be either True or False.

2013-05-03 Thread Darren Mansell
e *msg = self.error_messages['invalid'] % value* raise exceptions.ValidationError(msg) So it's failing validation because it's seeing the field as a BooleanField, when I quite obviously have set it as a CharField. I'm absolutely stuck. On 3 May 2013 11:1

Re: Form Validation Error: 'No' value must be either True or False.

2013-05-03 Thread Darren Mansell
x27;t work On 3 May 2013 10:35, Darren Mansell wrote: > Hi all. Really really confused by this one. Can someone show me where I'm > being stupid please? > > Standard Django 1.5.1 app with MySQL. Trying to save to a VARCHAR(3) > column with a forms.CharField form field and

Form Validation Error: 'No' value must be either True or False.

2013-05-03 Thread Darren Mansell
o from. Strangely, it works fine using the development server, but this error happens when using Apache + mod_wsgi. I've rebooted the server, restarted everything, tried changing collation etc. Could anyone suggest anything? Any extra logging etc I can turn on somewhere to show where th

Seeking pattern for building URLs with all query parameters intact

2012-11-25 Thread Darren Spruell
submissionlogs, 'search_form': search_form, 'more_query_params': more_query_params, }, context_instance=RequestContext(request)) What are better ways to handle this? -- Darren Spruell phatbuck...@gmail.com -- You received this message because you are subscribed to the Googl

Options for migrating from django.contrib.markup for rST

2012-11-24 Thread Darren Spruell
arkup http://packages.python.org/django-markup/ ...although this project seems a bit dated. -- Darren Spruell phatbuck...@gmail.com -- 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@googl

Using subclass of RegexValidator for form field

2012-06-27 Thread Darren Spruell
"reference URL", blank=True, help_text="(Optional) Reference URL", validators=[URLValidator]) Here, entering "foo" into the field for reference_url outputs a validation error on the form if I enter "foo". What am I missing? Thanks. -- Darren Spruell phatb

Handling multiple parameters on URI via GET

2012-01-27 Thread Darren Spruell
h:i A" }} {% endfor %} {% endif %} {% if submissionlogs.has_previous %} << {% endif %} Page {{ submissionlogs.number }} of {{ submissionlogs.paginator.num_pages }} {% if submissionlogs.has_next %} >> {% endif %}

Re: How to use ManyToMany model relations to track user membership?

2011-09-09 Thread Darren
It sounds like you want to specify a custom many-to-many relationship table using the manytomany.through option. Check out https://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-manytomany for an example. On Sep 9, 12:10 am, jollyroger wrote: > Hi. > > Can someone please tell, what

Re: Cost model field

2011-03-19 Thread Darren
Oops! Thankyou :) (tedious name for it though, although I do concede it's Python's invention.) On Mar 18, 9:29 pm, Kenneth Gonsalves wrote: > On Fri, 2011-03-18 at 17:57 -0700, Darren wrote: > > I want to store costs (prices) in my DB. The obvious field type is > > Int

Cost model field

2011-03-18 Thread Darren
x27;hello' and using this in a template like this: {{ item.price.h }} But this doesn't work, it doesn't even call my h() function. Can anyone point me in the right direction? Thankyou :-) Darren -- You received this message because you are subscribed to the Google Groups "

Re: Integrating User Profile with Auth

2010-09-12 Thread darren
nstance']) >profile.save() > post_save.connect(create_profile, sender=User) > > HTH, > Justin > > On Sep 11, 8:45 pm, darren wrote: > > I think that my main problem was that I was expecting the save to the > model > > form to actually cre

Re: Integrating User Profile with Auth

2010-09-11 Thread darren
I think that my main problem was that I was expecting the save to the model form to actually create the profile. Here's what I ended up with in my view. 86 @login_required 87 def createProfile(request): 88 UserProfile.objects.get_or_create(user=request.user)[0] 89 if request.method ==

Re: Integrating User Profile with Auth

2010-09-11 Thread darren
Thanks. That helped me figure it out. I'll post my solution back later today/tonight. On Sat, Sep 11, 2010 at 12:37 AM, Shawn Milochik wrote: > I think you just may be missing a call to get_profile() in this view. > You can just do that and do a try block with an except block for > DoesNotExi

Integrating User Profile with Auth

2010-09-10 Thread darren
I am following the information in the docs to add fields to maintain, in addition to the ones Auth already maintains. I'm starting with the docs here: So far, I have a model form I've created b

Re: Admin site not formatted

2010-07-11 Thread Darren
I have had that happen a long time ago. I think my problem was that apache didn't gave permission to the CSS. I know that's not much to go on. But, maybe it will help. Darren On Jul 10, 2010, at 12:50 PM, octopusgrabbus wrote: > Using Apache and not the built-in Django web

Re: Tutorial problems

2010-06-27 Thread Darren
If you are using apache on Debian Linux, /etc/init.d/apache restart. Other Linux distros and Mac look for apachectrl. Darren On Jun 27, 2010, at 9:49 AM, zippzom wrote: > How does one go about restarting the server? > > Thanks in advance! > > On Jun 25, 10:37 pm, Michae

ordering fields in admin form

2010-06-12 Thread darren
I'm sure the answer is probably documented clearly somewhere. But, I can't find it. I would like to change the ordering of a field in a form on the admin site based on the model below. The "game" column is several records long. I would like to order desc. I've tried adding a META class to my m

Re: Unable to import libxml2mod from the python script

2010-06-03 Thread Darren
Go to /usr/local/bin and do ls -l and see if python is a sym link. If so, see where it points and verify it points to python25. Your modules are here: /usr/local/lib/python2.5/site-packages Verify that the python executable matches. Darren On Jun 2, 2010, at 9:38 PM, Superman wrote

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Darren
Just grasping at straws here, but could it have anything to do with permissions or the python path? I don't fully understand how imports work. But, those are things I'd explore first. Darren On Jun 2, 2010, at 8:57 AM, Superman wrote: I have a django site that is integrated w

Re: best approach to solve statistical problem

2010-05-27 Thread darren
table of data here: rankintornadoes.com. I would still like to know if this would be the recommended Django way. Any advice would be welcome. Darren On Thu, May 27, 2010 at 2:19 PM, darren wrote: > I'm looking for ideas on the best way to approach this problem. > Should I write ra

db problems after upgrading

2010-05-27 Thread darren
idn't turn out to be what I wanted anyway because I couldn't add additional records due to those constraints. For example: Error: One or more models did not validate: links.extra_link: Field 'tourn_name' under model 'Tournament' must have a unique=True constraint. Ho

Re: best approach to solve statistical problem

2010-05-27 Thread darren
e this because some columns are mutually exclusive. You can't have a walk and a strike out at the same 'at bat'. On Thu, May 27, 2010 at 2:19 PM, darren wrote: > I'm looking for ideas on the best way to approach this problem. > Should I write raw SQL, stay with the ORM or even m

best approach to solve statistical problem

2010-05-27 Thread darren
I'm looking for ideas on the best way to approach this problem. Should I write raw SQL, stay with the ORM or even mix Javascript with either ORM or SQL? I want to keep up with player stats for a baseball team.  I've been reading up on aggregates and annotations.  And, I'm getting somewhere with it

Re: Make MPs answer to us

2010-05-05 Thread Darren Mansell
On 6 May 2010 07:41, Darren Mansell wrote: > > > On 6 May 2010 00:35, Russell Keith-Magee wrote: > >> On Thu, May 6, 2010 at 3:04 AM, Darren Mansell >> wrote: >> > >> > It's election day tomorrow. This is a great web site for lots of info &g

Re: Make MPs answer to us

2010-05-05 Thread Darren Mansell
On 6 May 2010 00:35, Russell Keith-Magee wrote: > On Thu, May 6, 2010 at 3:04 AM, Darren Mansell > wrote: > > > > It's election day tomorrow. This is a great web site for lots of info > about what's really going on: > > [http://www.38degrees.org.uk] > &

Make MPs answer to us

2010-05-05 Thread Darren Mansell
It's election day tomorrow. This is a great web site for lots of info about what's really going on: [http://www.38degrees.org.uk] Darren -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

heads up

2010-05-04 Thread darren
I thought I would pass this along in case it helps anyone. A recent update on my Mac broke my python symlink. I have my /usr/bin/python pointing to /usr/local/bin/python2.6 via a symlink. My modules are located in /usr/local/lib/python2.6. If you are experiencing a problem with importing module

modelForm ordering

2010-04-20 Thread darren
I am not able to figure out how to order the records that fill the drop down list in a model form. On line 112 below, I have attempted to order the Rotation model by player. But, the drop down list that is created for me is not ordered that way. I also tried relocating line 112 to within the Met

Re: conditional join with foreign key [SOLVED]

2010-04-15 Thread darren
I found exactly what I was looking for in the docs, http://www.djangoproject.com/documentation/0.96/model-api/#many-to-one-relationships. Using limit_choices_to={column_in_related_table_as_string : value_as_string} did exactly what I was looking for. Hope this helps someone else. Darren On

conditional join with foreign key

2010-04-14 Thread darren
ot;. Since this is not a view that I've written, I'm not sure how to approach this. I was figuring that if I wrote the view, I would do something like this (warning, I may not have that syntax quite right): players = Stat.objects.filter(Person__type='Player') TIA, Darr

EuroPython 2010 registration and talk submissions now open!

2010-03-19 Thread Darren
Greetings djangonauts! EuroPython 2010 - 17th to 24th July 2010 EuroPython is a conference for the Python programming language community, including the Django, Zope and Plone communities. It is aimed at everyone in the Python community, of all skill levels,

Re: Adding Fields To Querysets

2010-03-12 Thread Darren
] return render_to_response('people.html', { 'people':people }) {% for person in people %} {{ person.name }} {% for c in person.calcs %} {{ c }} {% endfor %} {% endfor %} - is this what you're after? Darren On Mar 11, 5:10 

Database connection handling problem

2009-08-20 Thread Darren Platt
ire_date" > %s )' 'SELECT (1) AS "a" FROM "django_session" WHERE "django_sessio n"."session_key" = %s ' It then closes the database and *after* closing, tries the call stack below which seems to blow up because the database isn'

Re: Exception in transaction block hidden by "InternalError: transaction aborted ..." exception

2009-08-18 Thread Darren
any thoughts on this? thanks, darren On Aug 17, 2:57 pm, Darren wrote: > Hi > > My app saves data in a method with "@transaction.commit_manually". > > My code had a bug - a field in a model was the wrong datatype for what > was passed in, so I got a DataError exce

Exception in transaction block hidden by "InternalError: transaction aborted ..." exception

2009-08-17 Thread Darren
: # save data here except BaseException as e: traceback.print_exc() # prints psycopg2.InternalError traceback transaction.rollback() else: transaction.commit() I'm sure there's a way to get the original, DataError, excep

Dynamic App Creation

2009-07-07 Thread Darren Mansell
this kind of thing? Darren --~--~-~--~~~---~--~~ 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 group, send em

Overriding block tags in included templates?

2009-07-07 Thread Darren
Hi guys, Chasing my tail a bit here, hoping you can help me. say I have a base.html: - {% include 'header.html' %} -- header.html: - {% block title %}Default title{% endblock title %} - And a child detail.html --- {

User Authentication Redirect Loop

2009-07-06 Thread Darren Mansell
25252525252525252525252525253Fredirect_to%252525252525252525252525252525253D/login/%25252525252525252525252525252525253Fredirect_to%25252525252525252525252525252525253D/login/%2525252525252525252525252525252525253Fredirect_to%2525252525252525252525252525252525253D/ The page isn't redirecting p

Re: How to group_by..

2009-06-08 Thread Darren
Nice, thanks for the update, Russell and Alex ! -d On Jun 5, 10:10 pm, Russell Keith-Magee wrote: > On Sat, Jun 6, 2009 at 7:55 AM, Alex Gaynor wrote: > > > On Fri, Jun 5, 2009 at 12:03 PM, Darren wrote: > > >> That's cool. You don't happen to have an update

Re: How to group_by..

2009-06-05 Thread Darren
That's cool. You don't happen to have an updated estimate of the 1.1 release date by any chance? Thanks, Darren On Jun 5, 12:35 pm, Russell Keith-Magee wrote: > On Sat, Jun 6, 2009 at 12:20 AM, Darren wrote: > > > Fantastic, thanks! > > > This is 1.1 only t

Re: How to group_by..

2009-06-05 Thread Darren
Fantastic, thanks! This is 1.1 only though correct? Cheers :) Darren On Jun 5, 11:39 am, Russell Keith-Magee wrote: > On Fri, Jun 5, 2009 at 11:24 PM, Darren wrote: > > > Hey, > > > Would anyone be able to to help me convert this SQL to Django code? > > > SELECT

How to group_by..

2009-06-05 Thread Darren
Hey, Would anyone be able to to help me convert this SQL to Django code? SELECT A.a, COUNT(B.b) FROM A, B WHERE A.id = B.a_id GROUP BY A.id ORDER BY A.id; Thanks! Darren --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

forms with ajax - how to use ModelForm?

2009-06-03 Thread Darren
y question is, is it worth using all the Django gubbins when the alternative appears very simple? Thanks! Darren --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: forms with ajax - how to use ModelForm?

2009-06-03 Thread Blogposts Darren
(obviously, the second example omits the clean_data() call by accident! question still applies..) --~--~-~--~~~---~--~~ 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

manage.py syncdb Ignoring Models

2009-03-25 Thread Darren Mansell
I'm just trying to do a bit of home development on Ubuntu 9.04 which has Python 2.6. When trying to populate the database from the models it's randomly ignoring model definitions. I have no idea what's going on but the deprecation warning of sets may be to do with it? Output of ./manage.py syncdb

Re: What's the most scalable Django deployment out there currently?

2009-03-25 Thread Darren Mansell
On Wed, Mar 25, 2009 at 5:09 AM, Alex Gaynor wrote: > > > On Wed, Mar 25, 2009 at 1:06 AM, Graham Dumpleton < > graham.dumple...@gmail.com> wrote: > >> >> >> >> On Mar 25, 3:45 pm, Alex Gaynor wrote: >> > On Wed, Mar 25, 2009 at 12:43 AM, Adam V. wrote: >> > >> > > Curse (http://www.curse.com/)

Re: Working With ModelForms

2009-03-24 Thread Darren Mansell
That was a great help thanks. I also used the copy() method on the request.POST dict and I could redirect to the same view. Cheers. On Mar 24, 2009 3:43 PM, "Thomas Guettler" wrote: Hi, my guess: You need to redirect after POST. if you give request.POST to the Form, it will overwrite the valu

File Browser and Editor with Django,any help?

2008-07-04 Thread Darren Lee
Hi,all I am new to this community. these days My leader give me a mission ,describe as below: the httpd server was installed under a linux server ,and the it use Django tech. I should add the web server with a funtion like Windows Explorer and Editor in the WebBrowser like firefox. any o

Re: i'm tired

2008-02-09 Thread Darren Redmond
try placing the word python in front of the line: python django-admin.py startproject mysite newbiedoobiedoo wrote: > I did exactly what you said here. > The very first instruction on the tutorial failed: > django-admin.py startproject mysite > > The error was > "bash: django-admin.py: command

Re: fundamental issues with configuring Apache and mod_python

2007-01-31 Thread darren
Thanks I took your configuration and was able to configure mine accordingly. I still don't completely understand it, but at least I can get to the admin page and the poll page. And, now I can finish the tutorial. I don't think that I have some permissions correct though because my pages don't h

Re: confused about licensing

2006-05-30 Thread Darren Redmond
Nicola, Thanks for the prompt response. Let's hope the explanation keeps our legal team happy, otherwise I need another database. cheers Darren tekNico wrote: >> I have been using django with postgres on windows while builiding my >> application for the last month or s

confused about licensing

2006-05-30 Thread Darren Redmond
tgres backend? worried ;) Darren --~--~-~--~~~---~--~~ 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 group, send

Re: 'str' object has no attribute 'write' Exception

2006-05-25 Thread Darren Redmond
this helps cheers Darren Mary Adel wrote: > dear all > > i have this error:Request Method: > > GET Request URL: http://127.0.0.1:8000/xmlmenu/ > Exception Type: AttributeError Exception Value: 'str' object has no > attribute 'write' Exception > Locat