Re: pyamf, mod_wsgi and session caching

2008-12-11 Thread oggie rob
On Nov 11, 11:38 am, oggie rob wrote: > Hi all, > I'm working on a project which uses pyamf and produces the following > exception during login: > > AttributeError: 'LazyModule' object has no attribute 'Manager' I'm a bit late in responding here, but

pyamf, mod_wsgi and session caching

2008-11-11 Thread oggie rob
Hi all, I'm working on a project which uses pyamf and produces the following exception during login: AttributeError: 'LazyModule' object has no attribute 'Manager' However debugging this has been difficult. The error shows up with the following setup: - django 1.0 - pyamf 0.3.1 - apache 2.2.9

Re: What's possible in the admin?

2007-08-18 Thread oggie rob
The short story is all of these should be doable in the admin, and most will also be quite simple. The long story is below. Note, however, that some of my suggestions are based on the old admin rather than newforms-admin, but from what I have seen of newforms-admin, it should be fairly similar in

Re: Logout with TestClient

2007-08-16 Thread oggie rob
If the purpose is to check for permissions/different display with logged in vs. anonymous clients/etc, why not eliminate the chance of a failure in the logout method and just create a new Client? Gives more flexibility (by calling the client you want) and keeps things simple. I use a method to tes

Re: How to split up views into different files...

2007-08-06 Thread oggie rob
There are no restrictions at all on this. Remember that the view is called via urls.py, so you define your different views & files there. Just a point of interest, though - models don't always match up with views. In fact, most of my views contain at least two or three models. Rather than break t

Re: Do I have to send shopping cart data to every template in my app?

2007-08-06 Thread oggie rob
[EMAIL PROTECTED]> wrote: > Oggie, > Thanks for the reply. So you're saying that it would be better to > send my shopping cart data to every template through my all my > view's? If that's the case then I assume there is no way to send > request.session informatio

Re: Do I have to send shopping cart data to every template in my app?

2007-08-03 Thread oggie rob
If you really need to use a tag, look at http://www.djangoproject.com/documentation/templates_python/#passing-template-variables-to-the-tag But I think you probably would find it easier to add an extra context processor & avoid the tag altogether. -rob On Aug 3, 6:01 am, Greg <[EMAIL PROTECTED]

Re: Do I have to send shopping cart data to every template in my app?

2007-08-01 Thread oggie rob
On Aug 1, 11:22 pm, oggie rob <[EMAIL PROTECTED]> wrote: > This is what middleware is made > for.http://www.djangoproject.com/documentation/middleware/ > > -rob Sorry, I have recently been working with shopping carts and had redirection on my brain. Fabien's suggestion i

Re: Do I have to send shopping cart data to every template in my app?

2007-08-01 Thread oggie rob
This is what middleware is made for. http://www.djangoproject.com/documentation/middleware/ -rob On Aug 1, 9:51 pm, Greg <[EMAIL PROTECTED]> wrote: > I've created a shopping cart. I want to put something on the top of > every page that let's people know how many items they have in their > car

Re: something I really don't know in using manage.py shell

2007-08-01 Thread oggie rob
Yes. "filter" returns a set (hence the [] around "", indicating a collection). If you are using a pk, where you can guarantee a single returned value, use "get": >>> p = Profile.objects.get(id=1) >>> p.department -rob On Aug 1, 10:35 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > i am tryin

Re: Ordering in Admin change page

2007-07-31 Thread oggie rob
> However, if I add a new transaction, I want to see the Users listed in > the User ChoiceField by username, rather than userid which it > currently is. I have over 1000 users and so finding the correct user > is a nightmare. You need to use raw_id_admin instead of that edit_inline stuff. You can

Re: Maintaining history of changes to model fields

2007-07-30 Thread oggie rob
The admin interface contains a history feature, you might want to look at how that works. Apart from a table to record the actual changes, there is a "relationship" table that links the model that is changed with the log record (i.e. the log isn't tied to a particular table because of this). Table

Re: Model design help

2007-07-28 Thread oggie rob
When you use a ManyToMany field, a "private" table (not tied to a model like other tables) is created in the database with something like the following (created via the contrib.auth.User's user_permissions field: id, user_id, permission_id If you wanted to create your own table that mirrors this

Re: static css problems on windows box

2007-07-26 Thread oggie rob
> My problems are this. First off, I was able to get the development > admin working with my project fine, but when I try to serve it up > using apache and mod_python, it's looking for the project under my > Python25 directory (c:\dev\Python25), not in c:\dev\testproj. I think you need to say C:

Re: How to prevent updating auto_now date field.

2007-07-26 Thread oggie rob
> Is it possible? > Or should I remove auto_now and update the date field whenever > updating the model? If you can't update to trunk, this would probably be your easiest solution. It should only be a few lines of code. -rob --~--~-~--~~~---~--~~ You received t

Re: latest django version

2007-07-25 Thread oggie rob
Re: TortoiseSVN, take a look at http://tortoisesvn.net/node/87 Short story - unless you can get your admin to change your firewall, you can't use svn since "code" doesn't respond to https, no matter which platform you are using. -rob On Jul 22, 8:20 pm, james_027 <[EMAIL PROTECTED]> wrote: > Hi

Re: Django .91 issue

2007-07-24 Thread oggie rob
With 0.91, you use the "magic" name for db-api operations, rather than the model name. For example: from django.models import my_model_module my_model_module.somemodels.get_object(...) I think sometime before 0.91 was finished, the directory structure changed, so you might access your models sli

Re: Template Works on Django Server but not on Apache

2007-07-21 Thread oggie rob
> PythonPath "['/home/rith'] + sys.path" > > > This is the templates in settings.py: > TEMPLATE_DIRS = ( > "/home/rith/soccerux/templates", > ) > > Any idea why it's not working with apache? Thank you. Apache probably can't "read" any files/directories because your home directory doe

Re: Problem with multiple django versions on mod_python

2007-07-19 Thread oggie rob
> In short, a C extension module may cache data from one sub interpreter > and then use it in the context of a different sub interpreter causing > incorrect or errornous behaviour. The problem with Decimal support in > pyscopg falls into this category. It is entirely possible that the OP > may hav

Re: Problem with multiple django versions on mod_python

2007-07-19 Thread oggie rob
. > PythonHandler django_someversion_handler > PythonInterpreter version2 > > > Finally, you might want to have different manage.py stubs with an > extra first line importing the right django module as django into the > namespace to get going. > > Best regards... >

Re: Problem with multiple django versions on mod_python

2007-07-19 Thread oggie rob
t;Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 7/19/07, oggie rob <[EMAIL PROTECTED]> wrote: > > > > > Please, if you've seen the same issue or have any helpful ideas to try > > to stop the error, let me know. > > I think I've seen the

Problem with multiple django versions on mod_python

2007-07-18 Thread oggie rob
I've run into a problem that appears to be caused by multiple django versions running on the same server. I have a preforked mod_python installation and the problem I'm seeing is this: after using the trunk- based application, I try to use the 0.91-based application and get a 500 error. The root o

Re: Test response context & template always as lists?

2007-07-14 Thread oggie rob
Right! Meant to but hit the wrong list. Please ignore this thread... On Jul 14, 9:42 pm, theju <[EMAIL PROTECTED]> wrote: > Probably this post would be best answered on the Django-developers > list. > > Cheers > Thejaswi Puthraya --~--~-~--~~~---~--~~ You receive

Test response context & template always as lists?

2007-07-14 Thread oggie rob
Hi all, Playing around with the test client I found it frustrating that "context" can either be a single context or a list, depending on how the template is rendered. My feeling is they should always return lists. Likewise for the "template" field. I can see that no matter what there is a chance o

Re: syncdb building freaky database

2007-07-12 Thread oggie rob
The statements seem fine, just that your models don't reflect what you are after. 1. if you set null=True, the database lines would read "NULL" instead of "NOT NULL". blank=True refers to whether the value can be empty (i.e. NULL is not equal to ''). However for most CharFields you will want to k

Re: Missing Plus-Sign over ManyToManyField

2007-07-12 Thread oggie rob
You need to add the Admin class to ContactPerson -rob On Jul 12, 6:59 am, Manuel Meyer <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hey, > > from other projects, running on the same django instance, I know that > there is a possibility to display a '+' icon

Re: Question about AddManipulator/ChangeManipulator

2007-07-09 Thread oggie rob
Since you haven't got an answer yet... I'm not a project developer, so I can't say what their intentions are, but having worked extensively using oldforms and recently using newforms, I doubt very much that the Manipulator framework will hang around for anything other than temporary backward compa

Re: Comparing dates..

2007-06-19 Thread oggie rob
I could be a bit more pythonic: >>> from django.db.models.query import QOr >>> ql = [Q(birthdate__day=(startdate + timedelta(days=x)).day) & >>> Q(birthdate__month=(startdate + timedelta(days=x)).month) for x in range(7)] >>> Person.objects.filter(QOr(*ql)) -rob On Jun 19, 2:51 pm, Tim Chase <

Re: Data versioning (staging)

2007-06-07 Thread oggie rob
t have to work through it a bit. Thanks for the help, -rob On Jun 6, 5:49 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 6/6/07, oggie rob <[EMAIL PROTECTED]> wrote: > > > > > Hi all, > > I have some models and need to add the capability of versi

Data versioning (staging)

2007-06-06 Thread oggie rob
Hi all, I have some models and need to add the capability of versioning the data. Basically for each object that represents a page, I want to have a "running" version and an "editing" version of the same page, so that users can see the "approved" version yet I can work on a newer one. (I've found

Re: best practice for portal-like pages?

2007-06-03 Thread oggie rob
nt > to have with my approach ... > > patrick > > Am 03.06.2007 um 00:40 schrieb oggie rob: > > > > > The advantage is you get to organize your additions in the base > > template (which is where you should strive to manage layout & L&F as > > much as possibl

Re: best practice for portal-like pages?

2007-06-02 Thread oggie rob
ncluding the sub-templates in the template > instead of rendering them in the view? > rendering the templates in the view seems to be a bit more flexible > when it comes to caching, I guess. > > besides, a custom entry could have its own specific template - so, I > ´m not sure how you´d dea

Re: best practice for portal-like pages?

2007-06-02 Thread oggie rob
Using the "include" tag, you can provide the template through a variable e.g. {% include template1 %} instead of {% include 'mysite/ movies.html' %} so you can pass this stuff from the view. What's more, the include template uses the context from the "parent" template. So you can also pass all thi

Re: Number of apps on one server

2007-06-02 Thread oggie rob
You might be limited to a relatively small number of Django apps (i.e. separate entries in the httpd.conf file) on a single dedicated server, since each would require its own PythonInterpreter, but depending on traffic I would guess you could have more than that on there. Having said that, if you

Re: views.py filtering and excluding objects

2007-05-28 Thread oggie rob
Its hard to tell what you mean by "really long once I start factoring time and uniqueness". Do you mean really large data sets or really wide lines in your python file? If the former, you will probably need to be more specific about what the long query contains. If the latter, look at chaining que

Re: Silly Newforms Best Practices Question

2007-05-25 Thread oggie rob
As always, depends. Just think about how source control (i.e. code ownership), re-usability and IDE integration/navigation would fit with each approach. Contrary to Russ, I have my form classes near to my view functions, but I won't bet my C++ Builder 4 CD that its the best way :) Probably not an

Re: Apache + mod_python problem

2007-05-04 Thread oggie rob
> As i try to login into the admin, i alway get a message saying my > browser does not accepr cookies!! > But it isn't true! > > Any suggestion? IE has a funny setting wrt media files & security settings - if you use a separate server for media (e.g. media.company.com vs. www.company.com as the d

Re: Apache2/mod_python/Django problem

2007-05-04 Thread oggie rob
Check Unix permissions for the todo directory and/or settings.py file. If apache can't access them, it won't run properly. -rob On May 4, 6:49 am, RollyF <[EMAIL PROTECTED]> wrote: > Could someone point me to a solution somewhere? I have a directory > call apps and inside is a django project, t

Re: Redirect middleware

2007-04-26 Thread oggie rob
On Apr 26, 12:16 pm, Laurie Harper <[EMAIL PROTECTED]> wrote: > oggie rob wrote: > >> (r'^%s(?P[^?#]*)' % (root_url), 'apps.cms.views.render'), > > Note that '?' is a special character, ... > > Nope; it's special outside a cha

Re: Super long response times/load times: Looking for some guidance on alleviating the issue

2007-04-24 Thread oggie rob
That is abysmal performance, though. If your dev server performs okay (i.e. it is not the way you have written your index view) you should probably look for another provider. -rob On Apr 24, 6:44 am, Roboto <[EMAIL PROTECTED]> wrote: > RESOLVED. > > I am on Shared Hosting with GrokThis.Net. Th

Re: Using get_FOO_display() in admin classes

2007-04-23 Thread oggie rob
The last I heard, choices only worked for CharFields. Probably it is trying to compare 600.0 with '600.0' and failing, so it resorts to the unmatched "-", or failing to save the value properly in the first place. Docs don't clarify, though - it might have changed recently. If so, your best bet

Re: Redirect middleware

2007-04-23 Thread oggie rob
> > (r'^%s(?P[^?#]*)' % (root_url), 'apps.cms.views.render'), > Note that '?' is a special character, but more importantly your expression probably matches both the initial request and the redirected one. Check it out: >>> r = re.compile('/about/(?P[^?#]*)') >>> r.match('/about/?user1') <_sre.SRE

Re: In Admininterface: Error: variable not passed into template?

2007-04-19 Thread oggie rob
You're missing the __str__ method. Not sure if that is causing the "Error" though. -rob On Apr 18, 10:39 pm, Michael Lake <[EMAIL PROTECTED]> wrote: > Hi all > > In the Admin interface I'm getting the folloing error for a model: > Error: variable not passed into template?>Data > > class Dat

Re: ImportError: no module named django

2007-04-18 Thread oggie rob
/usr/lib/python2.4/lib-tk', '/usr/lib/ > python2.4/lib-dynload', '/usr/lib/python2.4/site-packages'] > > So this is the problem I guess - apache can't access django, but I'm > not sure why... any ideas? > > oggie rob: Nah, I'm not discourage

Re: ImportError: no module named django

2007-04-18 Thread oggie rob
What happens when you run: sudo -u apache python >>> import django >>> django BTW, I use openhosting and have a few django sites running so don't be discouraged! -rob On Apr 18, 12:59 pm, Oliver Charles <[EMAIL PROTECTED]> wrote: > Ok, > > I've done a ton of googling on this, and not come up

Re: Datetime is null... why isn't this working?

2007-04-17 Thread oggie rob
> page_data['topic_modification_date'] = datetime.datetime.date() > page_data['topic_modification_date_time'] = datetime.datetime.time() What James is saying is suggesting is that do_html2python only expects strings or lists of strings, but you were trying to pass in a datetime object. Give it

Re: Saving an object takes a long time

2007-04-15 Thread oggie rob
> The actual code is here - http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/shop... and the save function starts at line 150. I had a look and was wondering about the self.clean_data['other_field'] references within various clean_x methods. I thought, perhaps cyclic references (

Re: Saving an object takes a long time

2007-04-15 Thread oggie rob
You will need to provide more specific information to get an answer to that question. Namely, you will need to provide: 1) How long "several seconds" is 2) What is your view (or is it admin view)? 3) What would satisfy "good" performance 4) What do you see when you don't use the web server & d

Re: SelectMultiple widget

2007-04-11 Thread oggie rob
Try using firebug (extension for Firefox). You can see how it is instantiated in the admin site and where things are going wrong. I suspect you either are missing the "vSelectMultipleField" (is that right?) class, the multiple="multiple" attribute, or have not got all of the JS included. As for wh

Re: newb: Sending Request to Django Dev Server, From Python Terminal

2007-04-09 Thread oggie rob
urllib.urlopen('http://127.0.0.1:8000/putProduct').read() On Apr 9, 9:09 am, "johnny" <[EMAIL PROTECTED]> wrote: > How do you send a request to localhost djanog dev server from Python > Terminal? > I have started mysql and python dev server locally on my machine. > Now, I want to open > python te

Re: Showing images in Django Admin

2007-04-08 Thread oggie rob
On Apr 8, 1:10 am, "oliver" <[EMAIL PROTECTED]> wrote: > Hi Rob, > would you mind posting the code you wrote as an example? Would be very > helpful. > > thank! > oli I posted my first djangosnippet to show it: http://www.djangosnippets.org/snippets/162/ HTH, -rob --~--~-~--~~-

Re: Showing images in Django Admin

2007-04-04 Thread oggie rob
For a list display, it can be very simple. Write a method within the model that returns an "img" html tag, and use the "allow_tags" decorator on that method (just like you would for short_description). Then add that method to your list_display variable in Admin. I did this for thumbnails. I haven

Re: Django app serves PDFs but browser doesn't render them

2007-04-02 Thread oggie rob
Ahh... botched post. Anyway, check the Page Info "Type" & post your view method if there are still problems. -rob On Apr 2, 9:02 pm, "oggie rob" <[EMAIL PROTECTED]> wrote: > Try looking at Firefox's "Page Info". That will tell you whether >

Re: Django app serves PDFs but browser doesn't render them

2007-04-02 Thread oggie rob
Try looking at Firefox's "Page Info". That will tell you whether Django or Firefox is the issue. It should say Why don't you post some of your view method. It might be On Apr 2, 7:27 pm, queezy <[EMAIL PROTECTED]> wrote: > Hi All! > > I used response = HttpResponse(pdfbytes, mimetype='applic

Re: Some kind of substitute for __exact=None which executes "is null"?

2007-03-04 Thread oggie rob
> I was expecting to just be able to do: > f = SomeClass.objects.filter(a=a, b=b, c=c) > > Is there some way to do this with the current code base? I'm not sure of the exact syntax, but you can use a dictionary to achieve this fairly easily. Something like args = {} if a == None: args['a__isn

Re: connecting to multiple databases

2007-03-04 Thread oggie rob
> Anyway, back to the question: do think there is a way with standard django > to access two databases (maybe sequentially, changing database connections) > in one script? Or is the only way to use intermediate storage like a file? The simplest way I can think of is to write your own SQL to acce

Re: Models Causing Admin to Crash

2007-02-26 Thread oggie rob
I can't tell if this is the cause, but you should remove the "pass" right under "class Admin": -rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django

Re: where is the code for the date widget in admin

2007-02-23 Thread oggie rob
You need to include django/contrib/admin/media/js/calendar.js & admin/ DateTimeShortcut.js, and put 'class="vDateField"' or "vTimeField" for each widget. The html is dynamically generated by javascript when you load the page (based on class name), which is why you can't find the js code from the H

Re: Aggregate stats for recordsets...best practices?

2007-02-15 Thread oggie rob
> Does anybody have any experience with this and can give war-stories about > good or bad ways to do this? I just finished updating an aggregate-rich view and I think it is better to use SQL than messing with filters for most complex things. My basic rule of thumb is to use python functions to a

Re: how to postpone HttpResponse but still get new requests

2007-02-14 Thread oggie rob
> is there a way to save the request so i can send a response later (when the are new items). You can't send a much-delayed response to browser clients. the http request will time out if it doesn't get a response in time. I think you need to look to AJAX. Get a response immediately & keep queryi

Re: Deploying multiple sites on one computer using SSL

2007-02-12 Thread oggie rob
> > > We're talking about *named* virtual hosting + SSL. Named > virtual hosting uses the "Host:" HTTP/1.1 request header > to decide which site should receive the request. But to > extract that from the SSL'd content we need the site's > private key. The problem is we don't know which site >

Re: Deploying multiple sites on one computer using SSL

2007-02-12 Thread oggie rob
> 1. One virtual host per site (project1.mycompany.com, >project2.mycompany.com, etc.) > >Pros: Each project has its own admin site. The sqlite database >file for each project is independent of the others. > >Cons: For SSL, each virtual host needs its own IP address and its >ow

Re: (DB related?) Memory leak with apache and mod_python

2007-02-11 Thread oggie rob
I had this same problem using a shared system. In my case, I think it was actually caused by subversion (run through mod_python with SSL). In particular, I noticed a problem whenever I committed changes to large binary files. Unfortunately I never managed to narrow down the problem. However I did

Re: Newbie going nuts: Serving admin media files

2007-02-08 Thread oggie rob
> and have forgotten what I did. Now, when I try to call up my admin > pages, I get nothing. A blank. So my hunch is that apache isn't > serving up my admin media files, but I can't figure out why. Any help > is greatly appreciated. I don't think it is not your media files. If you had no media fi

Re: Euro Sign raise UnicodeEncodeError

2007-01-25 Thread oggie rob
Essentially ak pointed out the error. It is expecting 8bit encoding and the euro is apparently higher than 8 bits (i.e. 20AC is greater than FF). Just keep plugging around (particularly from the shell & looking at the db) and you'll probably find it. -rob On Jan 25, 10:12 pm, "Christian Schmidt

Re: Uh-oh, I've messed up now... HELP!

2007-01-17 Thread oggie rob
You have several options: Easiest way: Rename the second model (not the one that extends User). I'm not sure if you can syncdb but you can copy the SQL manually (table/indexes, permissions & content type entries). I don't think you should delete the gpusers table but you might need to remove some

Re: runserver tracebacks on each HTTP-call

2006-08-01 Thread oggie rob
> Has anybody seen such Tracebacks ? Hi Dirk, I think I have seen this, but only using IE on the development server with admin-like pages. I think it might be issues with the media going through the dev server (i.e. probably not an issue with mod_python). If you were able to hack the way those fi

Re: Showing admin-style forms on regular user forms revisited

2006-07-28 Thread oggie rob
Since we're being helpful... You might be interested in the clock change I submitted some time ago. It shows the clock in 30 minute increments instead of just 4 areas. You can either replace your django copy or use the patched file in your own admin directory somewhere. http://code.djangoproject.

Re: Null values in Foreign Keys?

2006-07-04 Thread oggie rob
> foo = models.ForeignKey( bar, null=True, blank=True ) Give this one a go again. This is the form that should work. Perhaps there was another problem that got in the way? BTW there is nothing wrong with using a null field for your foreign key relationship in most schemas, from a practical perspe

Re: Time Tracking Tool

2006-06-29 Thread oggie rob
> First i'd like to know if anyone has already done this kind of thing? I have a pretty basic time tracking and invoicing feature in my database. As people have pointed out, the biggest issue is printing consistently. However, you can avoid this headache (yes, it is going to be a headache!) if yo

Re: JS for TimeField

2006-06-29 Thread oggie rob
I submitted http://code.djangoproject.com/ticket/1848 which shows times in 30 minute increments (you can adjust the increment easily enough). Fits my (and my users) needs perfectly. It wasn't included but you are welcome to use the patch. -rob --~--~-~--~~~---~--~--

Re: Model vanishes from Admin

2006-06-25 Thread oggie rob
My guess would be caching or database discrepencies. Have you tried accessing the production database through the dev server? Also have you tried to delete .pyc files? -rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: How to re-use the admin contrib ?

2006-06-16 Thread oggie rob
> I've thought about an url like "/company1/admin" that will display me only > the "periodical" and "article" that belongs to company1. Just be sure this is what you want. There may be times where you wish to completely separate each company's data - in which case, you can run multiple instances

Re: Bumfuzzled Relations

2006-06-09 Thread oggie rob
As you found out, OneToOneField wouldn't work in this case. A OneToOne field implies that there will be exactly one user per school - instead you wanted several users to be affiliated with an individual school. The answer to your question might be here: http://www.b-list.org/weblog/2006/06/06/dja

Re: reusing contrib.admin functionality

2006-06-03 Thread oggie rob
> Is there an API for using the admin-code, or is is just "rip out what you > need"? It is still an "all or nothing" application (i.e. no API). If you use admin, it will be applied to whatever you want to have visible from the urls.py file, so this does give you a lot of flexbility. e.g. if you

Re: Ajax support, there is no need for reinventing the wheel

2006-06-03 Thread oggie rob
> However, it would be very nice to see various people that use django a lot > present the methods that they think work best with django. yes, this would be good in the "reference" or "solving specific problems" pages of documentation. I also think the admin interface could benefit from some AJ

Re: Class name display when editing inline

2006-05-27 Thread oggie rob
> I'd like to remove the underscore from it. Underscores are not the norm in python class names, but they will still work fine (I think?). In your case, add "verbose_name" and possibly "verbose_name_plural" to your Meta/META class or use CapWords. -rob --~--~-~--~~~---

Re: Problems with sites not actually updating I change the code

2006-05-27 Thread oggie rob
> Found out the issue was the fcgi needing to be killed after changes. That's where the dev server is nice... in general its better to develop with the dev server because you don't have to restart -rob --~--~-~--~~~---~--~~ You received this message because you

Re: Various problems porting to Magic Removal

2006-04-22 Thread oggie rob
> admin.logentry: 'user' has relation with uninstalled model User >admin.logentry: 'content_type' has relation with uninstalled model > ContentType I would guess you need "UPDATE" statements for the content_types table. You should be able to see what those are (and they will vary for eac

Re: problem with threaded apache

2006-04-21 Thread oggie rob
Yes, I've disabled it now, and all is good! --~--~-~--~~~---~--~~ 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, se

Re: problem with threaded apache

2006-04-21 Thread oggie rob
> I started to rev back mod_python and ran into a few dependency problems. I'll > keep trying and see if that helps. Will let you know... The REAL problem between my working (openhosting.com virtual) Fedora system and this one was SELinux. Aarrgghh! And of course I didn't have any problems in s

Re: problem with threaded apache

2006-04-21 Thread oggie rob
Thanks for the replies everybody. This is good info and I need to know more about apache in general. Unfortunately it doesn't solve the problem! I am using the vanilla Fedora rpm for httpd which builds in prefork.c and has generally default module directives. The funny behaviour is that it runs f

problem with threaded apache

2006-04-20 Thread oggie rob
Hi all, I have a problem with a new server that I am setting up. Details are: Fedora Core 5 apache httpd 2.2.0 (rpm) postgresql 8.1.3 (rpm) psycopg 1.1.21(source - and a real pain) python 2.4 (rpm) pretty weak hardware (800 mHz PIII, 256 M RAM) So, this app runs fine on two other machines (simila

Re: problem with login_required decorator in python2.3

2006-03-17 Thread oggie rob
With trunk, I dealt with this by changing admin/base_site.html Just overide the userlinks block I found the relative links annoyingly limiting so I changed them to absolutes (I mean absolute according to the base directory - I didn't have any server info in them) by way of a decorator & the setti

Re: Advice on developing with django for a team of 10+

2006-03-16 Thread oggie rob
Tone, One other thing to consider: the choice of how to integrate developers is important, but probably more so is deciding on a release schedule. Your choice of tools and developer cooperation will be dictated by this somewhat. For example, if you decide you will make changes "as they are fixed/

Re: login page

2006-03-10 Thread oggie rob
> I ALWAYS get the didnt match response! This is where print statements are a very simple diagnosis of the problem. Just print out m.password and request.POST['password'] so that you can see them too. The problem will probably be very obvious. -rob --~--~-~--~~~---

Re: SESSION_COOKIE_AGE in global_settings.py

2006-03-10 Thread oggie rob
Hi Matt, All that the SESSION_COOKIE_AGE changes is the expire_date on a "session" entry in one of your database tables. If you change SESSION_COOKIE_AGE, but are still logged in, then that date is still going to be about two weeks in the future. Try logging out, and setting the COOKIE_AGE to some

Re: Django filter hack

2006-03-08 Thread oggie rob
> I did a quick hack today and made it toggable. If you want to aply a filter, show it. If not, leave it there and browse the listings. This is nice - can you write up a bug? -rob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Weird??!! Attribute Error on Page but not in Shell

2006-03-05 Thread oggie rob
Why don't you post some code? Nothing is obvious from what you've said -rob --~--~-~--~~~---~--~~ 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

Re: how to process dictionaries in templates

2006-03-02 Thread oggie rob
> Err.. I suck. This should be {% for data in allyears.items %}. :-( Yep, that may work, but leaves the ordering up to the "items" method, which isn't going to be ideal. In the case that you use a dict, you should probably also use dictsort to make sure you get what you expect: {% for data in all

Re: how to process dictionaries in templates

2006-03-02 Thread oggie rob
You can quite easily do this with nested lists. Just have the following structure for each item in the allyears list: ["2005", ["a","b","c"],] then you can reference each item by number: {% for yearitem in allyears %} {{ yearitem.0 }} {% for item in yearitem.1 %} {{ item }} {% endfor %

Re: Django versions

2006-02-24 Thread oggie rob
> - latest development from trunk? If you plan to deploy anytime in the next month or two (yes, this is a real possibility with Django!), you should start with trunk but settle on a revision before you get too far into the project. I wouldn't recommend updating from trunk once you've deployed unt

Re: Request for ideas

2006-02-15 Thread oggie rob
> A front-end to a distributed tinder-box setup. Reporting build results that are either pulled from other locations or posted to the server. You could contribute to trac: http://www.edgewall.com/trac/details.html Although they might not be thrilled about another package to install all the other

Re: template ifequal

2006-02-02 Thread oggie rob
> This seems like a bug to me - certainly it is inconsistent behaviour between > {% if %} (where you can do 'var1|lower' etc) and {% ifeqaul %}. I would file > a bug report. I don't think this is inconsistent. You normally put filters within variables. I don't think you can put it within tags:

Re: several django questions, models, apache

2006-01-24 Thread oggie rob
> You could remove the "^" in the regex to say it matches any strings that > prefixed the intended url pattern: > r'^cefinban/recettes/(?P\d+)/$', > 'cefinban.recettes.views.detail') > to > r'recettes/(?P\d+)/$', 'cefinban.recettes.views.detail') But that doesn't really solve the problem, just

Re: proper use of admin screens

2006-01-24 Thread oggie rob
> But what about web apps where users normally enter, update, and delete the > bulk of the application's data? Is it considered good practice to use the > built-in admin content management functionality as general purpose input > screens? I can't say if this is "good practice" or not. I'm sure

Re: Multiple Sites one User database

2006-01-24 Thread oggie rob
Hi Jakub, There are probably some other answers that will work, but if the only thing you want to do is allow logins on different servers, possibly the best solution is for you to either use LDAP/AD or some central authorization (many others have been interested in this also), or write your own sy

Re: glitches in admin interface

2006-01-20 Thread oggie rob
Hi Luke, You need "blank=True" instead of "null=True" for CharFields and TextFields (they should be non-null even if nothing is typed in there). -rob

Re: Apache2 mod_python VirtualHost configuration

2006-01-17 Thread oggie rob
> and add this line to your virtual host section Alias /media/ "/work/django/media/" FYI, the '/media/' comes from the ADMIN_MEDIA_PREFIX in your settings.py file. If it is different, change the Alias to match it. -rob

Re: django 0.90 -> 0.91 : raw_id_admin representation changed: HELP!

2006-01-16 Thread oggie rob
> I've just upgraded from Django0.90 to Django0.91 my production server (running a django app on a LAN). [kicks tires a bit] Yep, thar's yer problem right there. Ya put tha tires on backwards. Seriously, you should plan a little better than that! First of all it is known the 0.x is not backward

  1   2   >