unable to access another field in cleaned_data from clean_

2008-12-30 Thread hotani
I have 2 fields I'm working with in a custom clean method: - case_no - county the clean method is for case_no, so I have this: -- def clean_case_no(self): d = self.cleaned_data form_case_no = d['case_no'] form_county = d['county'] ... -- The form fails with KeyError on 'county'. How

Re: unable to access another field in cleaned_data from clean_

2008-12-30 Thread hotani
-- Update -- If I make the clean method for 'county', it works. I guess county comes after case_no so both are accessible by that time. Weird, but I can deal with it. However, that brings me to the 2nd issue with this process: Whatever is accessed in the clean method is no longer accessible for

Re: unable to access another field in cleaned_data from clean_

2008-12-30 Thread hotani
Thanks Karen - I think that got it. At least it's looking better than it has been. Apparently the missing field from 'cleaned_data' was caused by the wonky way I had it set up before. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

getting "duplicate key violates unique constraint" error from form even with "unique_together" in model

2009-01-02 Thread hotani
I have 3 fields that need to be unique together: office, county and case_no. In the "Case" model, I have the following: -- class Case(models.Model): office = models.ForeignKey(Office, editable=False) county = models.ForeignKey(County) case_no = models.CharField(max_length=20) ...

Re: getting "duplicate key violates unique constraint" error from form even with "unique_together" in model

2009-01-02 Thread hotani
This is from the 500 error: -- IntegrityError at /case_edit/2651074/ duplicate key violates unique constraint "case_no_office_county_unique" -- I'm using the latest SVN build (9692). This is what I used to create the constraint (since this was added long after the table was created from

Re: getting "duplicate key violates unique constraint" error from form even with "unique_together" in model

2009-01-02 Thread hotani
Could this be a problem with the editable=False setting? The record I am attempting to duplicate is a duplicate office/county/ case_no entry. However, it is also a duplicate county/case_no. It seems like even with the form validation ignoring 'office' it would catch the county/case_no dupe? I

Re: getting "duplicate key violates unique constraint" error from form even with "unique_together" in model

2009-01-03 Thread hotani
Thanks Karen, that fixes the problem in the django admin. At least now I know that everything is ok on the database and model fronts. However, in my own form it is still not validating this relationship. Here is what I have right now: in a forms.py file there is a base form for the Case model:

Re: getting "duplicate key violates unique constraint" error from form even with "unique_together" in model

2009-01-03 Thread hotani
well, doy. I just noticed that when attempting to create a form from a model I called forms.Form instead of ModelForm. I'll mess with it some more and see what happens. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: using javascript to update a ChoicesField: getting "not one of the available choices."

2007-07-24 Thread hotani
Ah nice. That will do the trick. Thanks! --~--~-~--~~~---~--~~ 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

update 2nd model via first when saved

2007-09-05 Thread hotani
I am attempting to avoid writing a custom admin page. There are at most two people that will be updating the database, and this seems like a great job for the django admin area. However, for this to work I need a way to update a 2nd model (a history table) when another model is updated. Is this

two apps in project using comments. Skip 'posted.html'?

2007-09-13 Thread hotani
First off, this is only working at all because one app is using free comments while the other is using the standard non-free comment system. Which means they can use separate templates (free_preview.html vs preview.html). This is all great until I come to the common template, 'posted.html'.

Re: Django new comments framework error

2008-10-01 Thread hotani
It's back! No error on dev server, but crashing like crazy on test with same old crap: >> Caught an exception while rendering: Reverse for '> 0x2ae96d979410>' with arguments '()' and keyword arguments '{}' not found It alternates between that and: >> Caught an exception while rendering: No

separate datetime into two fields a la admin area?

2008-07-21 Thread hotani
Since loading the most recent updates from svn, the one piece that is broken for me is where I had a datetime field split into two on a form using generic update. I had basically copied the method from the old admin area which used oldforms. For a datetime field called "date," the date field

newforms generic and hidden fields in form

2008-07-25 Thread hotani
I had a form that was working with oldforms generic and had some hidden fields. After the newforms-admin merge and newforms-generic, the hidden fields are being passed as NULL. In 'BackwardsIncompatibleChanges,' it says "You'll probably need to update any templates used by these views." So what

Re: upload is working, but how to store the path in the imagefield?

2008-08-19 Thread hotani
I'm using svn 2204, and "save_FOO_file" does not seem to exist any more. Nor is it in the documentation anywhere that I've been able to find. Is someone successfully using this on a recent build? More importantly, if save_FOO_file no longer exists, what takes its place? Here is an example of

Re: upload is working, but how to store the path in the imagefield?

2008-08-19 Thread hotani
Thanks Malcolm--reading now. One fix to my post - I'm using svn 8444. Was in the wrong project when i checked. On Aug 19, 3:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-08-19 at 14:22 -0700, hotani wrote: > > I'm using svn 2204, and "save_FOO

Re: Django new comments framework error

2008-08-26 Thread hotani
No idea. I seem to be getting the same thing. The comments upgrade has caused all kinds of meltdowns in my applications. For one, updating the SQL failed. PostgreSQL was complaining because it was updating fields set to "NOT NULL" with null values. I changed the query to accommodate for this,

Re: Django new comments framework error

2008-08-26 Thread hotani
s are showing up now and not exploding. On Aug 26, 11:21 am, hotani <[EMAIL PROTECTED]> wrote: > No idea. I seem to be getting the same thing. > > The comments upgrade has caused all kinds of meltdowns in my > applications. For one, updating the SQL failed. PostgreSQL was > compl

updated comments (svn 8557+) with logged in users

2008-08-26 Thread hotani
What is the best way to do this? It is not included in the new docs, and the default form elements include required fields for name and e- mail address. Obviously if the user is logged in we don't need this. Before I go hacking the form to shreds, I wanted to see if someone had a better idea.

Re: updated comments (svn 8557+) with logged in users

2008-08-26 Thread hotani
Fixed after poking around a bit. I found that by sending "user_id" in a hidden field, the comment system is able to figure out who it is. On Aug 26, 12:49 pm, hotani <[EMAIL PROTECTED]> wrote: > What is the best way to do this? It is not included in the new docs, >

Re: Django new comments framework error

2008-08-26 Thread hotani
Well it happened again when I uploaded the comment changes to another server. Here's the fix: go to /django/contrib/comments and wipe out the .pyc files: sudo rm */*.pyc that finally fixed it. On Aug 26, 11:37 am, hotani <[EMAIL PROTECTED]> wrote: > This ended up working (I hones

Re: Django new comments framework error

2008-08-28 Thread hotani
Did you delete the .pyc files from the django source? Another approach would be to go into /django/contrib/ and delete the comments directory, then do an 'svn up' to restore it. Then you'll be sure to get a fresh copy. That is what worked for me. But if you haven't used the comment system before

memcached: is this thing plugged in?

2009-03-17 Thread hotani
I have a test server which is running the db and django app (apache/ mod_python). Before moving to production, I'm running stress tests and optimizing performance. My plan is to optimize on the test box, see what works, then implement these on production which is separate db and app servers.

Re: memcached: is this thing plugged in?

2009-03-17 Thread hotani
Thanks for the responses - shortly after posting I realized what I missed for a successful test of the caching software. After adding the proper lines to 'MIDDLEWARE_CLASSES', memcached came to life. If anyone is curious, before memcached the test page was getting about 10 trans/sec. After

fail silently: "NoneType object has no attribute...." errors?

2009-05-04 Thread hotani
Most of the errors I'm seeing these days in my application are of the "NoneType object has no attribute" variety. While this may be helpful on occasion on the development server, I really don't want it creeping up on production. "Well fix them!" you say. Actually there is nothing to fix.

Re: fail silently: "NoneType object has no attribute...." errors?

2009-05-04 Thread hotani
Thanks Malcolm - getattr() is the one I knew had to be there but couldn't remember or find it anywhere. And I'm pretty sure I've even used it before. sheesh. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: newforms-admin: raw_id_fields works for admin area but not my site

2008-03-28 Thread hotani
helluva drop-down. On Mar 21, 8:29 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 20, 2008 at 12:12 PM, hotani <[EMAIL PROTECTED]> wrote: > > > My issue is similar to this one from October: > > >http://groups.google.com/group/django-users/browse_th

python-ldap: searching without specifying an OU?

2008-04-22 Thread hotani
I am attempting to pull info from an LDAP server (Active Directory), but cannot specify an OU. In other words, I need to search users in all OU's, not a specific one. Here is what works: con = ldap.initialize("ldap://server.local;) con.simple_bind_s('[EMAIL PROTECTED]', pass) result =

Re: python-ldap: searching without specifying an OU?

2008-04-22 Thread hotani
Right - sorry. I mistyped that. It is correct in my code and reads: DC=server, DC=local. So this works: 'OU=some office, DC=server, DC=local' this does not: 'DC=server, DC=local', nor does this: 'OU=,DC=server,DC=local', nor does any wildcard character I've tried so far. This is the error

Re: python-ldap: searching without specifying an OU?

2008-04-23 Thread hotani
This fixed it! http://peeved.org/blog/2007/11/20/ By adding this line after 'import ldap', I was able to search from the root level without specifying an OU: ldap.set_option(ldap.OPT_REFERRALS, 0) --~--~-~--~~~---~--~~ You received this message because you are

queryset-refactor: ordering by foreign key with null values

2008-05-01 Thread hotani
In a helpdesk app, I have a model called 'issue' which has a foreign key called 'resolution'. The 'resolution' model allows null values - if an issue is open, 'resolution' will be null, if closed, there will be a value there. Before queryset-refactor, I could do the following and get results

Re: queryset-refactor: ordering by foreign key with null values

2008-05-01 Thread hotani
I changed the query from an "inner join" to "left outer join" which returned issues with null resolutions. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

override django's rear-end validation for dynamic model field (AJAX)

2009-12-24 Thread hotani
I have close to 600 users split by 20 or so offices. We have a helpdesk form (using ModelForm) which displays an initial user list based on the office, or no users if an office is not selected. An AJAX function on the front end dynamically changes users in the drop-down based on the office

Re: Exception in template rendering

2007-04-12 Thread hotani
I was having the same problem with {{ object_list.count }}, but from the first link above found that {{ object_list|length }} does the trick. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: OT: Resources for converting MySQL data to PostgreSQL for Django

2007-05-29 Thread hotani
I've done this with a massive database. It wasn't pretty, but is possible. Here are my very brief notes on the conversion. I used phpMyAdmin to export the data, and the postgresql module in Webmin or phpPgAdmin. Webmin became necessary for large tables as phpPgAdmin would fail/ timeout or

obscenely long load times for simple create/update functions

2007-05-29 Thread hotani
Here is the basic model setup: -- class Client(models.Model): fname= models.CharField(maxlength=30) mname= models.CharField(maxlength=30, blank=True, null=True) lname= models.CharField(maxlength=30) [...and more details, but you get the point...]

Re: obscenely long load times for simple create/update functions

2007-05-29 Thread hotani
I should add that I ruled out the template by commenting out the entire page. It still took a minute or more to load. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: obscenely long load times for simple create/update functions

2007-05-29 Thread hotani
I found in another message this fix: in the model, I changed to: models.ForeignKey(Client,raw_id_admin=True) Filing this in the "gotcha's" category. gr. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: non-editable model elements and generic updates

2007-05-31 Thread hotani
Just ignore me. I like to overlook obvious bits then wonder why it isn't working. I was using "editable=False" in several of the fields I wanted to hide, but missed one. So the "editable=False" solution *is* the fix I was looking for, I just gooned it up by missing a field. :-)

non-editable model elements and generic updates

2007-05-31 Thread hotani
What is the best practice for handling this? Let's say I have a form with 3 fields: name, b-day, status I want a form that will allow the user to edit "name" and "b-day", then keep "status" whatever it was before the edit. Should I send this through as a hidden field? Of course, I'm talking

matching a hyphen '-' character in urls

2007-06-14 Thread hotani
Having issues matching a hyphen character in my urls file. Here is an example of what needs to be passed: "12-34-56". In python, the "\w+" matches this, but django urls will not. I have also tried (from another post in this forum) "\[-w]+" which did not match it either. The only way I have been

Re: matching a hyphen '-' character in urls

2007-06-14 Thread hotani
Thanks for the comments. I'll post back tomorrow with the python script I was using that worked (somehow?) for matching the hyphen with a '\w+'. I'll also try these suggestions and post back the results. --~--~-~--~~~---~--~~ You received this message because you

error after updating from svn (v5479): unexpected keyword argument 'max_digits'

2007-06-15 Thread hotani
Full error: [__init__() got an unexpected keyword argument 'max_digits'] Just updated from svn today and when I tried a syncdb that is what happened. Is 'max_digits' not allowed anymore? Here is an example straight from the model: fine = models.FloatField(max_digits=9, decimal_places=2,

Re: error after updating from svn (v5479): unexpected keyword argument 'max_digits'

2007-06-15 Thread hotani
Thanks. It is on a dev server so no biggie. I changed the models to DecimalFields and all is well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

share users across django projects?

2007-07-24 Thread hotani
I'm about to build a new project using django that will have the same users as a previous project. I would like to avoid duplicating the existing user table. Is there a way to authenticate into the new project with the current user list? --~--~-~--~~~---~--~~ You

Re: share users across django projects?

2007-07-24 Thread hotani
I have considered it, but the first project is rather large and we wanted to keep it on its own server with a separate database. I am still at the high level design stage of the second project so it may end up bundled with the first. --~--~-~--~~~---~--~~ You

convert string to valid filter arg?

2006-11-18 Thread hotani
I'm building a custom set of filters, and since I need to do 'OR' searches it is assembling them as a string that could look like this: - filter_string = "Q(resolution__isnull='on'), Q(description__icontains='a') | Q(title__icontains='a')" - My problem is getting this from the string

Re: convert string to valid filter arg?

2006-11-19 Thread hotani
Fixed! Just changed commas to '&' - the queries work the same, and eval doesn't try to turn the string into a tuple. Staring at the docs for a while works wonders... I changed this: - Q(res__isnull='on'), Q(desc__icontains='bla') | Q(title__icontains='bla') To this: -

Re: convert string to valid filter arg?

2006-11-19 Thread hotani
Small correction: The completed example should be as follows (with parens around 'OR' lookup): -- Q(res__isnull='on') & (Q(desc__icontains='bla') | Q(title__icontains='bla')) -- --~--~-~--~~~---~--~~ You received this message because you are

{# comments? #} and django update process via svn

2006-11-30 Thread hotani
I noticed in the most recent documentation that we should now be able to use the {# comment #} multi-line commenting tags in templates. However, after doing an 'svn update' and restarting apache it does not seem to be available. Which begs the question: am I not fully updating? Is there something

extending user model, but keep getting type error for user.id

2007-01-12 Thread hotani
I'm using the 'one to one' method of creating a user profile which extends django's built-in user model. This is a workaround suggested by James Bennett on his b-list blog, and I think several other people are using this or something similar. My problem is that I have a database I am importing.

Re: extending user model, but keep getting type error for user.id

2007-01-12 Thread hotani
One more thing: If I do what it says, and send it the user in the form of a class, it will continue, but after running "newprofile.save()", nothing is written to the db table. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

problem deleting session value

2007-01-19 Thread hotani
This is a strange gremlin I have found, and am completely stumped. The form: A list view with filters which are in the form of drop-downs. A filter is set in the session, and removed when the user selects "all ___" in the drop-down. Basic stuff, right? One drop-down works, the other does not:

using dev version, just ran update, still getting "cannot import name newforms"

2007-01-23 Thread hotani
I'm missing something here. It seems like I'm not really updating anything. The new {# comment #} tags still don't work, and when I just tried to add in the line for testing newforms it bombed out on me. This is the line atop my view: from django import newforms as forms That was copied

Re: using dev version, just ran update, still getting "cannot import name newforms"

2007-01-23 Thread hotani
python installed? > > On Jan 23, 8:36 pm, "hotani" <[EMAIL PROTECTED]> wrote: > > > I'm missing something here. It seems like I'm not really updating > > anything. The new {# comment #} tags still don't work, and when I just > > tried to add in the line for

Re: using dev version, just ran update, still getting "cannot import name newforms"

2007-01-23 Thread hotani
I just tried removing the 'django_src/django' directory, followed by an update and am still not seeing the new stuff. :-( On Jan 23, 1:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I've had similar problems with .pyc files not getting cleaned out, etc. > The easiest way to fix this is

Re: using dev version, just ran update, still getting "cannot import name newforms"

2007-01-23 Thread hotani
ges\\win32\\lib', > 'C:\\Python24\\lib\\site-packages\\Pythonwin', > 'C:\\Python24\\lib\\site-packages\\wx-2.6-msw-ansi'] > > (or unix style paths if you're on Linux or Mac). Anyway - make sure > django_src is in that list. If it's not, you need to set up PYTHONPATH or >

Re: using dev version, just ran update, still getting "cannot import name newforms"

2007-01-23 Thread hotani
I'm running thru apache--perhaps that is the root of my issues? I will check the egg file and see what I can find. When I do run the dev server it reports 0.96-pre. On Jan 23, 2:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > When you start your development server (python2.4 manage.py

Re: using dev version, just ran update, still getting "cannot import name newforms"

2007-01-23 Thread hotani
BING! Fred's fix did it. Notice in the package lists above I had "Django-0.95-py2.4.egg"? There was also a symlink for django in there. I removed the .egg, reloaded the server and all was well. Thanks everyone! On Jan 23, 2:48 pm, "Fred" <[EMAIL PROTECTED]> wrote: > Are you sure you don't have

newforms password field filled with too many ************************s

2007-01-30 Thread hotani
this is what I am using: password = forms.CharField(widget=forms.PasswordInput, label="Password") even when the password is 4 characters, the '*'s fill the text field. How can I get this to accurately represent the number of characters in the password? I tried max_length, but it filled up

Re: newforms password field filled with too many ************************s

2007-01-30 Thread hotani
BTW, it works fine--so I suppose this is a 'feature'. My users, however, may become concerned when they see the long line of *** in the fields. And as many of you know... when the users are concerned, we are concerned. :-/ --~--~-~--~~~---~--~~ You received

Re: newforms password field filled with too many ************************s

2007-01-30 Thread hotani
Ahhh, yes. That is it. Thanks! Chalk up another one on the stupid mistakes board! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

making session var available to all templates?

2007-02-08 Thread hotani
This has been asked several times, but I am not clear on how people are solving it. From what I understand so far, a setting called "TEMPLATE_CONTEXT_PROCESSORS" can be tweaked to make this possible. However, I'm not seeing a clear way to do that. I have a user setting which needs to be

Re: making session var available to all templates?

2007-02-08 Thread hotani
Thanks for the comments - I think I get it now... I have a file context_processors.py where I added the function, then the line in settings.py for TEMPLATE_CONTEXT_PROCESSORS, and all seems to be working now. I was trying to make this fit into my previously ingrained idea of using cookies to

sending an extra query to a generic view, what is the django way?

2007-02-13 Thread hotani
I have a generic view for an object in a basic bug tracker app. It shows things like 'title', 'description', 'resolution', etc.. and that is all working fine with a generic view. However, I'm trying to send a piece of info that involves a completely different model and not finding a pleasant way

Re: sending an extra query to a generic view, what is the django way?

2007-02-13 Thread hotani
Thanks, that example for extending the generic view is what I was looking for; I'll try it out tomorrow. As for request.user not being available, that was when I was trying to use it in urls.py. I have never had a problem accessing it from views.

trying to translate a join query to django

2007-03-07 Thread hotani
This is the table (model) setup: [county] (list of counties) [office] (list of offices) [active counties] (a relational table with a county_id, office_id and 'active' column) [division] (columns: 'name', 'county_id' which points to the first county table) Obviously the division table is directly

Re: trying to translate a join query to django

2007-03-08 Thread hotani
After digging through the messages here, I finally just did a custom query. Here is the function I used that will spit out a template-ready dictionary: --- def csql(self,query,qkeys): from django.db import connection cursor = connection.cursor() cursor.execute(query)

Re: trying to translate a join query to django

2007-03-09 Thread hotani
Thanks, I'll give that a shot. I did try something similar but it did not work for some reason. The active column in the activeOffices model is there because some relationships exist but are inactive. For example, I could have a county that used to be under a certain office, but is no longer. In

Re: trying to translate a join query to django

2007-03-09 Thread hotani
Very nice! This works: div_list = Division.objects.filter(county__activecounties__active=True,county__activecounties__office=office,active=True) Although I am glad to have my manual query function working (I'm sure I'll need it later), it is really nice to know django can handle the

column of ManyToMany table in db has a unique constraint?

2007-03-28 Thread hotani
I'm moving data from another database and when I try to populate the relational table created by django as a result of a ManyToMany field, I run into a unique constraint error: duplicate key violates unique constraint "main_msgpost_users_msgpost_id_key" msgpost_users

Re: column of ManyToMany table in db has a unique constraint?

2007-03-28 Thread hotani
Never mind, I think I figured this out. There were some duplicate rows in the imported data which was probably causing the error. The old system let a couple slip through and now I have to clean up. --~--~-~--~~~---~--~~ You received this message because you are

changed debug to 'False' in settings.py but no change in apache

2006-07-12 Thread hotani
I've restarted the webserver but I'm still getting the debug 404 messages, plus at the bottom it says "You are seeing this because you have Debug=True in your settings file" when I'm pretty sure I changed that. Is there something else that needs to be restarted? A cache to be cleared? Anything?

Re: changed debug to 'False' in settings.py but no change in apache

2006-07-12 Thread hotani
well that did it. I deleted settings.pyc, then ran 'syncdb' and restarted the webserver. Seemed like a lot to go through for a little change! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: How get user, included in generic views?

2006-07-12 Thread hotani
I am having this problem as well, but only for part of my site. The admin area works normally, one of my apps works well, but another app (happens to be the one at '/') does not see the user. {{ user.username }} returns "". It sees someone logged in, so user.is_anonymous is false, but everything

Re: How get user, included in generic views?

2006-07-12 Thread hotani
I think I'm missing something in my own views. Everything created by django (admin area, generic views) will get the user info, but when I do a view myself it doesn't work. What little tid-bit am I missing here? --~--~-~--~~~---~--~~ You received this message

Re: How get user, included in generic views?

2006-07-12 Thread hotani
this is what I'm sending out in the view. Basically this is an empty section of the site that will be created later. However, it bothers me that the menus and such will not work correctly since it seems I'm not passing the correct info. from views.py: def index(request): return

Re: How get user, included in generic views?

2006-07-12 Thread hotani
I got it finally... changed this: return render_to_response('main/index.html') to this: return render_to_response('main/index.html', RequestContext(request, {'request': request})) and that took care of it. Only took a few hours of staring at the generic views code and plenty of trial

hide drop-down items with generic views?

2006-07-26 Thread hotani
I'm using a generic view for a form and have a few drop-downs on the page. However, I don't want to display every item in the drop-down. I thought I would put in an "active" switch on them, but can't figure out how to only show the active items on the template. would this be A: a filter set up

Re: hide drop-down items with generic views?

2006-07-27 Thread hotani
Ok, let me throw out some more info This seems REALLY BASIC, and yet I've spent an embarrassing amount of time trying to figure it out. Unfortunately this has been happening a lot with Django. I'm having problems finding out how to do things I just took for granted with php or cf. Let's say

Re: DateTimeField

2006-07-27 Thread hotani
Can you get it to show up in the admin area? I've had to reverse engineer several things by digging through the admin area code and applying it to my own stuff. I'm having a similar problem with a date field, I'm just trying to update a date with a hidden field and nothing seems to work. It just

Re: DateTimeField

2006-07-28 Thread hotani
nice - this worked for my hidden field update as well. Thanks! --~--~-~--~~~---~--~~ 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

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
Code: {% if request.session.pfilter %} {% ifequal request.session.pfilter project.id %} {{ project }} both {{ project.id }} and {{ request.session.pfilter }} return "1" --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
Thanks for the replies. However, after digging through the documentation I'm not seeing anything that will convert my strings to ints or vice versa. Where is this filter I am overlooking? --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
yeah, python can do it, but where do I put this? Forgive my n00b question but would this go in the view? The session var is set by looking at post data, I'm guessing this is the one that is a string now rather than 'project.id' - Seriously, am I doing something strange here? Maybe there is a

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
problem on the view side is that the function setting the cookies doesn't just deal with strings or ints. If I get into customizing for each item I sent in, it defeats the purpose. I wrote a custom filter that would change the values to ints, and it works - but it will not work inside the {%

archive_index returns no results

2006-09-06 Thread hotani
I'm trying to display the most recently closed bugs in a bug tracker by using the archive_index generic view, but no matter what, it will not return any results. this is from urls: recent_dict = { 'template_name': 'recent.html', 'date_field': 'last_mod', 'num_latest':

Re: archive_index returns no results

2006-09-06 Thread hotani
thanks, right - that was obvious and I overlooked it, not my first time... --~--~-~--~~~---~--~~ 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

custom form view not keeping information

2006-06-19 Thread hotani
My form text fields are auto-filling as they should, but drop-downs are not. If I use a generic view they work fine - but when I do that I can't control the fields hidden from the user. I'm trying to do this with a custom view and manipulators but have had nothing but trouble. Why is it so

Re: custom form view not keeping information

2006-06-19 Thread hotani
I'm pretty much giving up on this -- unless i find an alternative, I'm going to end up using hidden fields with the generic update view. I know this is far from ideal, but I can't get anything else to work. Basically this is a bug tracker - kind of a get-my-feet-wet app to test out Django. In

Re: custom form view not keeping information

2006-06-20 Thread hotani
I'm on another machine without my code readily available - so let me attempt to rephrase one of the problems i'm having with generic updates: if there is a model with 10 fields, and an existing object which I'm editing in a generic view, but only editing 2 of the 10 fields, it is attempting to