Re: Model "created_by"

2011-07-13 Thread Nick Serra
That error just means you didn't add that field to the database and it can't find it. Verify the user_id field is on that table. On Jul 13, 2:40 pm, Petey wrote: > Hi! > > I've made a model in news application:http://pastebin.com/49VkFT14 > > I want it to save user who created

Multiple Databases

2011-07-05 Thread Nick
of these as customer specific databases). I will be using sqlite and want to save the path/ connection details of the dynamically created databases in one of the primary db's. Is this possible and if so what is the best approach to take? Thanks Nick -- You received this message because you

UpdateView help

2011-06-20 Thread Nick
)) 1) What do I do to get from the URL responder into the class- based view, to tell the view what object I want to edit? 2) Why do I get a "name 'get_object' is not defined" error when I run this code? Thanks!! Nick -- You received this message because you are subscribed to the

I18n on, l10n off, but django still translating date field

2011-05-26 Thread Nick Serra
Hey everyone, thanks for looking. I am developing a site that has spanish translations. I18n is working properly, but when I switch to spanish, my form output that has dates is in spanish. This is a problem because I am sending out staff emails on some forms, which cannot have spanish in them. So

Re: my models are remembering old fields that I have since deleted

2011-05-07 Thread Nick Arnett
On Sat, May 7, 2011 at 6:50 PM, George Silva <georger.si...@gmail.com>wrote: > Just drop the old tables and run syncdb again! I didn't think it was safe to assume that he wanted to throw away all of his data... Nick -- You received this message because you are subscribed to the Goog

Re: my models are remembering old fields that I have since deleted

2011-05-07 Thread Nick Arnett
reate your new tables, then copy the old data into the new tables and delete the old tables. If by "flushed" you mean you deleted the old tables (or the whole database), then something else is going on. Nick -- You received this message because you are subscribed to the Google Groups

Re: Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Nick
! :) Is this a bug I've just stumbled across, or should admin.autodiscover() always be after models are imported in urls.py? Thanks, Nick -- 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@google

Re: Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Nick
Hi, Yes sorry that wasn't clear. There is basically: page = get_object_or_404(models.Page, slug=level0) which varies depending on the number of "level" arguments passed into the view. So "page" will always be a lookup of a Page object. Thanks, Nick On May 2, 11:05 am, X

Strange problem with admin, ManyToMany and DEBUG=False

2011-05-02 Thread Nick
and restarted Apache just incase the changes weren't being loaded properly, but this gives the same behaviour. I'm using Django 1.2.5. Thanks, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: admin login fails

2011-04-19 Thread Nick Stinemates
On Tue, Apr 19, 2011 at 5:36 PM, pfc wrote: > I did try to delete the db and yes I had to create a new superuser > after, however this did not fix the problem. I also reset the db from > the command-line and same result. > Also, it is not a capslock issue, first

Re: Best Practice for Raw SQL

2011-04-13 Thread Nick Arnett
ntly you should also call this: transaction.commit_unless_managed() I'm doing a lot of that right now to vastly speed up a huge data import. Nick -- 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@go

Looking For A Solid Learning Tutorial

2011-04-13 Thread Nick Hird
a solid application step by step and see a finished working site and then take off and customize it on my own. I just haven't found any such tutorial. Thanks, --Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Accessing object ID in override of model save()

2011-04-01 Thread Nick
Is there a way to access what the ID of a new object being created in the admin? so if you wanted to ovveride the save and then do a get_or_create on another object in another model with a foreignkey back to the object you are creating you would have that ID at your disposal. -- You received

Re: idiotic foreignkey error

2011-03-31 Thread Nick
I needed to declare fk_name in the inline formsets. I still stand by the fact that it's an idiotic error message. Not helpful at all. On Mar 31, 2:26 pm, Nick <nickt...@gmail.com> wrote: > sorry, they have unique names. When i was writing this message out I > messed them up. the nam

Re: idiotic foreignkey error

2011-03-31 Thread Nick
sorry, they have unique names. When i was writing this message out I messed them up. the names are arace, brace and crace. I think this has something to do with some relic inlinde formsets I was using a while ago. On Mar 31, 2:19 pm, Shawn Milochik wrote: > They need unique

idiotic foreignkey error

2011-03-31 Thread Nick
I have a model with 3 foreignkeys to another model. This has never been an issue for me before but now it's throwing an error: has more than 1 ForeignKey to My model looks like this: a_race = models.ForeignKey('Race', related_name='arace', blank=True) b_race = models.ForeignKey('Race',

Re: inlineformset_factory default values

2011-03-30 Thread Nick
: formset = CampaignFormSet(instance=r) here is the template {% for form in formset %} {{form.name.value}} {{form.party}} {{form.vote}} On Mar 30, 1:14 pm, Nick <nickt...@gmail.com> wrote: > I am using inlineformsets_factory on a form and every time I save > those fields that

inlineformset_factory default values

2011-03-30 Thread Nick
I am using inlineformsets_factory on a form and every time I save those fields that are not made available in the form are overridden to null values on save. How do i get it just to update those fields that are specifically listed in the form? -- You received this message because you are

Re: Accessing values in formset loops

2011-03-29 Thread Nick
I guess the bigger question is, can I access the values of the fields without spitting out a form field? On Mar 29, 2:45 pm, Nick <nickt...@gmail.com> wrote: > I am looping through a formset and attempting to add an additional > field to the form that is a multi select checkbox that

Accessing values in formset loops

2011-03-29 Thread Nick
I am looping through a formset and attempting to add an additional field to the form that is a multi select checkbox that has a value of the ID of the current iteration of the formset loop. So: model1: name = CharField ID = IntegerField FK = ForeignKey('model2') model2: name my

Re: extend User Model for custom fields

2011-03-25 Thread Nick Serra
Andre's solution is out of date. Calvin is correct, use the user profile model that is built into django auth. OP, the link you found is correct. On Mar 25, 11:39 am, Andre Terra wrote: > This is the correct way: > >

Re: A little help before I run down the wrong rabbit hole

2011-03-15 Thread Nick
Thanks, Shawn. That was the first question I had. There will likely be more to follow but I didn't want to chase the wrong solution from the start. On Mar 15, 3:02 pm, Shawn Milochik wrote: > You can use formsets, which can be passed querysets upon > initialization. If this

A little help before I run down the wrong rabbit hole

2011-03-15 Thread Nick
I am working on an election application. I am at the point where I would like to start putting together the data entry point for the app and would like a little advice on how to proceed. Here is a (simplified) version of my models: class Candidate(models.Model): f_name = models.CharField()

Re: Google app engine django 1.2 localization

2011-03-12 Thread Nick Rosencrantz
Many thanks for the idea! I'll try the setup you're referring to. Regards, Nick Rosencrantz On Mar 12, 9:48 am, Jiten Singh <jiten@gmail.com> wrote: > Hi Nick, > > While working with GAE I use django provided onhttp://allbuttonspressed.com, > it is django non rel i know you

Google app engine django 1.2 localization

2011-03-12 Thread Nick Rosencrantz
/django.po It still won't work. I'm considering why and welcoming any more advice or recommendation how to enable i18n features with django for google app engine. If any know-how is on this issue then kindly instruct here how to proceed. Regards, Nick Rosencrantz -- You received this message

Re: django 1.2 + Google app engine + templatetags

2011-03-07 Thread Nick Rosencrantz
Solved. -- 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 email to django-users+unsubscr...@googlegroups.com. For more options, visit this

Override AdminAuthentication form for custom auth in Django Admin

2011-03-03 Thread Nick Serra
Hey everyone, thanks for looking. Running into a problem getting the Django Admin working with a custom auth system. Have everything working, but I cannot get the admin to use my custom auth app to login. I am not running a custom auth backend, but an entirely different auth app in my project.

Populating charfield with ID's from many to many

2011-03-01 Thread Nick
I am trying to populate a CharField with id's from a many-to-many field. I am doing this by overriding the save method on the model save and using the default django admin for data entry, however, it requires 2 saves in order to get the data from the many-to-many field to populate the varchar

Re: Django Job Opportunity at IDLE GAMES (The Social Game Changers)

2011-02-23 Thread Nick Arnett
On Wed, Feb 23, 2011 at 12:35 PM, Aliciasf <startuprecrui...@gmail.com>wrote: ...and (iv) the Tempting system... > That's the whole thing, isn't it? ;-) Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Android mail? (Re: [tueysuezseftali:76683] [android-developers] Select mp3 to play?)

2011-02-17 Thread Nick Arnett
Anybody on django-users know why this mail is coming to our group? It's strange - the "To" header is android-developers, but the reply-to is django-users. I can't quite tell if it is a Google Groups problem or the person posting ( nikola1...@gmail.com). Nick On Thu, Feb 17, 2011

Re: View file not processing any new additions

2011-02-09 Thread Nick
Nevermind. I was checking the template for one view and editing another. Idiotic. yeesh. On Feb 9, 12:12 pm, Nick <nickt...@gmail.com> wrote: > Additionally, > > if I change any of the other elements in the view, say: es = > ExamplTESTFORFAULT.object.all() it doesn't raise a

Re: View file not processing any new additions

2011-02-09 Thread Nick
Additionally, if I change any of the other elements in the view, say: es = ExamplTESTFORFAULT.object.all() it doesn't raise an error. Only when there is a syntax error. On Feb 9, 11:53 am, Nick <nickt...@gmail.com> wrote: > I have a view for an application that loops through a

View file not processing any new additions

2011-02-09 Thread Nick
I have a view for an application that loops through a queryset and cleans the data for a certain kind of output but leaves all the DB data in tact as it was entered for archiving purposes. There are multiple conditional checks that are working fine but anything new I've added or subtracted from

Re: Django API efficient enough for filtering tens of millions of records?

2011-01-18 Thread Nick Arnett
cates, producing a bulk insert to load into the database. Bulk inserts will be FAR more efficient than using Django. Nick -- 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.c

Re: automated testing: how to generate human-verifiable views?

2011-01-04 Thread Nick Stinemates
think. Nick On Tuesday, January 4, 2011, Jennifer Bell <jenniferlia...@yahoo.ca> wrote: > Hi, > > I'm trying to figure out the best way of doing something I'd like > to partially automate staging testing by generating a sequence of > human verifiable views, with the goal

string format date in query

2010-12-29 Thread Nick
I am using a little raw SQL to pull out a count of events by month. I am able to retrieve the correct information but am getting the month value in numerical form rather than an actual name. So instead of January I get a 1. Here is query: dates = markers.extra(select={'month':

Re: Full text indexing in small site

2010-12-26 Thread Nick Arnett
f you are using MySQL, its indexing is probably sufficient. You'll need to store your text in a MyISAM table to do so. Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@google

Re: Creating initial Security/Auth objects with syncdb

2010-12-22 Thread Nick Serra
Could just put the group in the initial data for sync db. Look up django fixtures. It will load data into the database from a json feed on syncdb. On Dec 21, 1:50 pm, "Mark (Nosrednakram)" wrote: > Hello, > > I would like to install an auth_group with my application and

Re: English translation for error message?

2010-12-22 Thread Nick Serra
http://translate.google.com/#auto|en|%20list%20index%20out%20of%20range On Dec 21, 6:10 pm, Bill Freeman wrote: > On Tue, Dec 21, 2010 at 5:53 PM, Jonathan Hayward < > > > > > > christos.jonathan.hayw...@gmail.com> wrote: > > [jhayw...@cmlnxbld01 invdb]$ python manage.py shell

Re: Problem with simple file upload.

2010-12-22 Thread Nick Serra
I'm too lazy to check, but i'm pretty sure the name of your file input needs to match the name of the form field. Also, try troubleshooting. Use print statements in the view to see if the file object is being posted, etc. On Dec 21, 11:54 pm, vivek_12315 wrote: >

Re: Serialize Data for JSON output

2010-12-20 Thread Nick
This sounds like it is an issue with your JS for your carousel. If you are needing to get your JSON directly into your JS code then you can just make gallery_thumbs_json_s list as a variable {'caro_list': gallery_thumbs_json_s} and then just call it in your template On Dec 20, 9:16 am, Dave

redirecting on SMTP error

2010-12-20 Thread Nick
I have an app with some SMTP errors that are getting tricky. Our network team is working on our email servers for the next few days and it is affecting the auto-notifications portion of the app. Right now i am getting a 550 'relay not permitted' error. How can I trap this error and redirect upon

Admin inline adding one too many extra rows to the form

2010-12-14 Thread Nick
I have three models. Two are inlines of another model in the Admin. I have their extra parameters set to 0 so: class model1(admin.StackedInline): model = Model1 extra = 0 class model2(admin.StackedInline): model = Model1 extra = 0 class model3(admin.ModelAdmin): inline = [

Conditional inline for django admin

2010-12-13 Thread Nick
I am working with an app that has several different models that are connected to a central model via a ForiegnKey. I'd like to display a certain inline based on a value from the central model. Ex. model1 some_field central = ForeignKey(CentralModel) model2 some_field central =

Re: Create new entry on first save of different model

2010-12-09 Thread Nick
Nevermind. I think I got it. On Dec 9, 3:57 pm, Nick <nickt...@gmail.com> wrote: > Thanks for the reply. I'm working on the override. How to I affect a > model from the save of another model. > > On Dec 9, 3:37 pm, Ilian Iliev <il...@i-n-i.org> wrote: > > > Hi

Re: Create new entry on first save of different model

2010-12-09 Thread Nick
o record in Model2. > > -- > eng. Ilian Iliev > Web Software Developer > > Mobile: +359 88 66 08 400 > Website: ilian.i-n-i.org > > On Thu, Dec 9, 2010 at 11:21 PM, Nick <nickt...@gmail.com> wrote: > > I am working on a project in which I need to evaluate a f

Create new entry on first save of different model

2010-12-09 Thread Nick
I am working on a project in which I need to evaluate a field in one model and based on its values add entries to another model. I don't quite now how to succinctly put that into words which is why searching for a solution has been so annoying. Here is my example Type_Choices = ( ('Person',

Re: Key 'buscar' not found in "

2010-11-25 Thread Nick Arnett
rgets to > "http://localhost:8000/search/?page=2; > instead of something like this: > "http://localhost:8000/search/?option_value1=7_value2=3=2; > There is any way to maintain the searchred url and indicate wich is > the next page? You need to pass that variable to the te

Re: CI

2010-11-16 Thread Nick Lo
Hi Johannes, You may be interested in this project: https://github.com/kmmbvnr/django-hudson Cheers, Nick On Nov 14, 5:36 am, Johannes Nel <johannes@gmail.com> wrote: > answering my own questions here: > > By the looks of things I will stick with hudson for now, I found som

Excessive tmp table creation for mysql

2010-11-09 Thread Nick
Yesterday I received a warning from our DB monitoring system stating that my django DB had an excessive amount of temp tables created. Here is the error: * Nagios 2.10 * Notification Type: PROBLEM Service: mysql_tmp_disk_tables Host: Address: State: WARNING Date/Time: Mon Nov 8

Re: Manual ordering

2010-10-20 Thread Nick
Worked like a charm. This was a limited case so I won't be needing any checks to ensure that the ID's are all in the queryset since there are only 5 or 6. Thanks again. On Oct 20, 10:44 am, Shawn Milochik wrote: > Given a tuple/list of primary keys named ordered_ids and a

Manual ordering

2010-10-20 Thread Nick
I am working on the output for some data and I would like to manually assign the order as there is no field that I can order by that will give me the desired output. Is there a way to manually declare the order of output based on the PKs of an entry? -- You received this message because you are

MySQL locking problem

2010-10-14 Thread Nick Arnett
ody` = 'This is the | +-+-+-+---+-+--++--+ Anybody have suggestions for tracking this down? Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: What is the best way to implement time-based / cronjob actions in a Django app?

2010-10-13 Thread Nick Arnett
ead of importing *, I usually just import the models I need for that script. I like keeping all that housekeeping stuff separate from the web app. Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Escaping text for raw SQL?

2010-10-12 Thread Nick Arnett
> > def sqlesc(s): > return replace("'", "''") Am I going brain dead, or isn't there more than just quotation marks that need to be replaced? This code is a back-end processing script, so there is no danger of SQL injection by anybody (except me). Nick -- You r

Re: Escaping text for raw SQL?

2010-10-12 Thread Nick Arnett
On Tue, Oct 12, 2010 at 9:00 AM, Javier Guerra Giraldez <jav...@guerrag.com>wrote: > On Tue, Oct 12, 2010 at 10:46 AM, Nick Arnett <nick.arn...@gmail.com> > wrote: > > Anybody know a good way to do this? > > Words.objects.filter(foo__in=mylist) Didn't even

Escaping text for raw SQL?

2010-10-12 Thread Nick Arnett
ape function exposed in Django. Anybody know a good way to do this? TIA, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send e

Re: Full Text Search

2010-10-01 Thread Nick Arnett
On Fri, Oct 1, 2010 at 3:52 AM, Alessandro Ronchi < alessandro.ron...@soasi.com> wrote: > > > On Fri, Oct 1, 2010 at 3:35 AM, Steve Holden <holden...@gmail.com> wrote: > >> On 9/30/2010 8:26 PM, Nick Arnett wrote: >> > Brain is mush, though. >> >

Re: Full Text Search

2010-09-30 Thread Nick Arnett
Django/MySQL full text and parametric search and they loved it... so it's on my mind. If you don't get a real answer by tomorrow afternoon, I may be conscious again then. You have to use one of the alternative approaches to search, as I recall. Brain is mush, though. Nick -- You received th

Re: problem with saving a form

2010-09-27 Thread Nick Serra
You're just all around doing it wrong. A ModelForm is used so that you don't have to individually list all the fields you need, it is based off the model. What is the code for your Model? And also, I'd reread the form reference from the start. On Sep 26, 5:25 pm, Marc Aymerich

Re: Universal form

2010-09-24 Thread Nick Arnett
if your users aren't allowed to see any page without logging in. See http://www.mail-archive.com/django-develop...@googlegroups.com/msg06473.html <http://www.mail-archive.com/django-develop...@googlegroups.com/msg06473.html> Nick On Fri, Sep 24, 2010 at 8:23 AM, Tran Cao Thai <jaso

Why does extending a class create so much overhead?

2010-09-19 Thread Nick
I'm still a newbie to django but I think I want to start working on my first real project and I'm kind of confused about extending another application's features without creating overhead. I started to investigate flat pages because I planned to have a few flat pages however I wanted to add a few

Re: Django and third party python apps, best practices for path locations?

2010-09-15 Thread Nick
and learning how to use it. On Sep 15, 11:01 pm, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > On 16/09/2010 12:06pm, Nick wrote: > > > Yes and no. I'm familiar with the term but haven't read up on it > > enough to wrap my head around installing it and getting it set

Re: Django and third party python apps, best practices for path locations?

2010-09-15 Thread Nick
, 9:50 pm, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > Nick, > > yes...and no. > > Have you looked at using Virtualenv?http://pypi.python.org/pypi/virtualenv > > On Thu, Sep 16, 2010 at 1:44 AM, Nick <iregisteratwebsiteswitht...@gmail.com > >

Django and third party python apps, best practices for path locations?

2010-09-15 Thread Nick
Let's say you have Python installed to D:/dev/python2.6 Is it wise/common practice to put django and other third party python libraries (like pygments or markdown) in the python2.6/Lib/site- packages/ directory while putting your actual projects in a completely separate location off the python

Re: syncdb problem - windows, sqlite

2010-09-15 Thread Nick
This seems to happen when you specify an incorrect path to the database in NAME. Fix: Use the correct path. :D It looks like you spelled 'frameworks' incorrectly. On Sep 15, 12:03 pm, Aju wrote: > Hi, > > I am using the Django tutorial (Windows xp, python 2.5.4, django

Re: Tools to ease template/ui development

2010-09-15 Thread Nick
I would go with PyCharm. Unfortunately it's not free but for $49 I don't think you'll find anything better. It has really solid template highlighting and code complete along with the best Python/Django support I've seen yet. I'm still new to Django but I did spend a fair bit of time looking for

Re: contrib.comments, admin section [unable to see comments]

2010-09-14 Thread Nick
cey <kmtra...@gmail.com> wrote: > On Tue, Sep 14, 2010 at 12:52 PM, Nick < > > > > > > iregisteratwebsiteswitht...@gmail.com> wrote: > > Hello, > > > I tried to troubleshoot this with Google and #django on IRC but I'm > > coming up empty. I've been

contrib.comments, admin section [unable to see comments]

2010-09-14 Thread Nick
Hello, I tried to troubleshoot this with Google and #django on IRC but I'm coming up empty. I've been following the practical django projects second edition book using django 1.2.3 on a local server. I have added 'django.contrib.comments' to my settings file + adjusted my urls.py file just like

Re: prepopulated_fields problem (+admin CSS issues)

2010-09-14 Thread Nick
titles. As for my second question. Can you not help because you haven't experienced this issue, or is it something you just don't have a problem with? On Sep 14, 11:20 am, "nick.l...@gmail.com" <nick.l...@gmail.com> wrote: > Nick, > > I can answer you first question...

prepopulated_fields problem (+admin CSS issues)

2010-09-14 Thread Nick
ith a 1000 pixel white space before it shows the sidebar. Thanks, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to d

Re: Strange problem accessing JS for admin

2010-08-25 Thread Nick Tankersley
Holden <st...@holdenweb.com> wrote: > On 8/25/2010 9:54 AM, Nick wrote: > > Stranger still, I can get to the /media/js/admin/ > > RelatedObjectLookups.js but not the jquery library > > > > > > On Aug 24, 4:51 pm, Nick <nickt...@gmail.com> wrote: > >

Re: Strange problem accessing JS for admin

2010-08-25 Thread Nick
Stranger still, I can get to the /media/js/admin/ RelatedObjectLookups.js but not the jquery library On Aug 24, 4:51 pm, Nick <nickt...@gmail.com> wrote: > I have a model set up to use collapsable inlines but for some reason > the path to my js files is acting very strange. &g

Strange problem accessing JS for admin

2010-08-24 Thread Nick
I have a model set up to use collapsable inlines but for some reason the path to my js files is acting very strange. I can find the core.js at http://mysite.com/media/js/core.js but when i try to reach any other js http://mysite.com/media/js/inline.min.js I get a server error

Re: manage.py syncdb not working

2010-08-24 Thread Nick Arnett
I can modify the old table manually to match how Django would have done it automatically (and then drop the temporary table). Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@google

Re: Stucked in Tutorial 3

2010-08-22 Thread Nick
the problem is on the return HttpResponse (t.render(c)) line. Check that your indentation is correct On Aug 22, 9:51 am, craphunter wrote: > Hi, > > I am very new in Django and Python. I am stucked in Tutorial 3 in part > "Write views that actually do something". > > I don't

Re: adding a summary field to a model

2010-08-19 Thread Nick
You need to look at overriding the model's save method in order to add data from one field to another dynamically. http://docs.djangoproject.com/en/dev/topics/db/models/#overriding-model-methods On Aug 19, 2:03 am, djnubbio wrote: > Sorry for wasting your

Re: How to create custom form widgets ?

2010-08-18 Thread Nick
Here's an example: http://joshourisman.com/2008/11/19/custom-fields-and-widgets-django-forms/ Another good way to go would be to look at the django widgets in the source code and follow their example On Aug 18, 1:44 pm, ydjango wrote: > I am using a 3rd party javascript

Re: Foreignkeys and variables in a view

2010-08-17 Thread Nick
This appears to be working. Thanks a lot Steve, I really appreciate the help. On Aug 17, 9:07 am, Nick <nickt...@gmail.com> wrote: > Thanks, Steve. I'll implement this today and see what happens. > > On Aug 16, 9:46 pm, Steve Holden <holden...@gmail.com> wrote: > > &g

Re: Foreignkeys and variables in a view

2010-08-17 Thread Nick
Thanks, Steve. I'll implement this today and see what happens. On Aug 16, 9:46 pm, Steve Holden <holden...@gmail.com> wrote: > On 8/16/2010 10:30 PM, Nick Tankersley wrote:> Thank you again for your > replies. They've been full of usefull > > information about how to clean u

Re: Ordering in the admin

2010-08-16 Thread Nick Serra
> > I'm going to read about filtering a little more, feels like it's > close... > (I also tried to put film_id in the parens after filter and got a "too > many values" error.) > So much to learn, thanks for all your help, > Wendy > > On Aug 16, 4:00 p

Re: Ordering in the admin

2010-08-16 Thread Nick Serra
er.first_name }} > {{filmmaker.last_name}} >                         {% endfor %} >                   {% endwith %} > > Thanks, > Wendy > > On Aug 16, 2:13 pm, Nick Serra <nickse...@gmail.com> wrote: > > > Can you list your models.py for me? What exactly do

Foreignkeys and variables in a view

2010-08-16 Thread Nick
I have a view that handles elections/races. That view takes a request object and then based on that object sends the information to a specific template. For each election/race there is a subset of candidates based on the initial candidate_set from that race. I would like to know how to filter

Re: Ordering in the admin

2010-08-16 Thread Nick Serra
gt; My Filmmaker Object has a first name and last name. > I'm not sure where to start on this one, any help would be greatly > appreciated. > Thanks, > Wendy > > On Aug 16, 12:45 pm, Wendy <we...@mutantfactory.com> wrote: > > > > > Thanks, Nick, I just figured that

Re: Ordering in the admin

2010-08-16 Thread Nick Serra
;we...@mutantfactory.com> wrote: > Thanks Nick, > I tried the first solution first. > You're right, the many to manys aren't editable on that page, but the > problem is, I'm not seeing another admin page for the new join model: > > class FilmmakerPosition(models.Mode

Re: query evaluation problem

2010-08-16 Thread Nick
How about using an autofield? http://docs.djangoproject.com/en/dev/ref/models/fields/#autofield On Aug 16, 12:25 pm, Alec Shaner wrote: > Regarding your issue with get_next, could be because you're invoking the > method when you define default=get_next(). Try it with just

Re: django queryset get only one result for one column pair

2010-08-14 Thread Nick
http://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct Distinct() may be what you're looking for to returns distinct values for each problem. Or, petter yet, you could use .latest() So Submission.objects.all().latest('problem').distinct()

Django psycopg2 installation issue

2010-08-13 Thread Nick
This is actually related to psycopg2, OS X and Postgres but I was hoping someone in here has seen the same issue. I recently installed PostgresPlus 8.4, Django dev (1.4?), and psycop2 version 2.2.0 on my imac OS X 10.6.4 When i try to run dbshell from the command line I get an error that reads

Re: How to check for m2m orphans before deleting an object?

2010-08-13 Thread Nick Serra
Look into the clear() method on many to many relations. Calling .clear() before a delete will remove all relations between the models and allow you to delete the category only. You might be fighting the django admin on this though, so this would be best implemented in a custom solution. Not sure

Re: Ordering in the admin

2010-08-13 Thread Nick Serra
You can go two directions with this. First, you could use a intermediate model for the many to many join, which would allow you to specify extra field on the join, in this case the order. Read up on this here:

Re: dynamic forms and custom methods

2010-08-12 Thread Nick
. On Aug 12, 9:30 am, Steve Holden <holden...@gmail.com> wrote: > On 8/12/2010 8:36 AM, lingrlongr wrote: > > > > > Hi Nick, > > > Thanks for the reply.  Yes, the department weights will be used in a > > grading scheme.  One department may be 25% (0.25), etc...

Re: dynamic forms and custom methods

2010-08-11 Thread Nick
Are you trying to create a save function that evaluates all the weights and returns an error if they are more than 1? On Aug 10, 3:17 pm, lingrlongr wrote: > I 'm trying to create a form dynamically.  This works just fine, but > there's no way for the form to offer any

Re: filter users by group

2010-08-11 Thread Nick
You can subclass the User admin and then unregister the default admin and register your new subclassy admin (subclassy is a word) in admin.py: from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User class MyNewUserAdmin(UserAdmin): list_filter =

Re: overwrite the save method

2010-08-11 Thread Nick
You override the save in two places, in the form itself or in the view. Either one would work, you could combine the two as well. the form save override would look something like def save(self): formatform = super(FormFormat, self).save(commit=False) if formatform.boolean1 and

Re: forms tutorials

2010-08-11 Thread Nick
The best option would be to break off of the tutorials for a bit and try to build something out on your own. The documentation for forms is quite extensive. I recommend getting comfortable with inlines and formsets http://docs.djangoproject.com/en/1.1/topics/forms/ On Aug 11, 1:39 pm, Jagdeep

Re: django-tables with ID

2010-08-10 Thread Nick
You could just write the table out in full in the template and use JavaScript to sort the rows. On Aug 10, 2:55 pm, "Mike W." wrote: > Hi, > > I'm trying to use django-tables to display the output in a grid-like > view.  I'd like a user to be able to choose a row and send it

Re: I did something wrong while registered

2010-08-09 Thread Nick Arnett
fix it. > > Have you looked at the headers of a pair of messages to see if you are receiving them on different email addresses? If so, just unsubscribe with one of them. If not, well, you need further help! Nick -- You received this message because you are subscribed to the Google G

Re: Querying in a loop - cached results?

2010-08-08 Thread Nick Arnett
_thread/thread/e25cec400598c06dfor >> more explanation. > > Ah, I didn't think of that. Didn't even think about the fact that there are transactions going on behind the curtain. I'll look into that. Nick -- You received this message because you are subscribed to the Google Group

Re: Querying in a loop - cached results?

2010-08-08 Thread Nick Arnett
On Sun, Aug 8, 2010 at 11:52 AM, Daniel Roseman <dan...@roseman.org.uk>wrote: > > > Where is this query running - in a view, or an external script? And > how is the data being added to the db? In both cases -- adding data and analyzing -- it is an external script, using the

Querying in a loop - cached results?

2010-08-08 Thread Nick Arnett
maybe if I explicitly deleted the data, that would work. Any ideas what's going on or how to solve this? TIA, Nick -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

<    1   2   3   4   5   6   7   >