Re: am I understanding sessions correctly?

2011-12-28 Thread Chris Curvey
Yes, your caching seems a likely culprit, and so does the asynchronous > nature of youAJAX(but it seems like you've got a handle on that > part). I haven't thought through the load balancer bit yet, but > presumably they are all using the same cache / database / session > store..? I'

Re: Why when upload PDFs, Django says the content type is "application/text"?

2011-12-25 Thread Chris Seberino
On Dec 25, 7:53 am, Ivo Brodien wrote: > > I was getting "application/pdf" a few days ago with same client, > > server, browser, etc. > > If this really is the case and the code is exactly the same, maybe it depends > somehow on the PDF itself? Did you check that? I used the

Advice/tips on how make private directory for each user?

2011-12-25 Thread Chris Seberino
I want some files to only be accessible by certain users. For example, imagine a teacher wanting to distribute graded exams on a Django server w/o violating any student's privacy. Is there an easy way to do this?I am aware of the access control decorator for specific views but not for

Why when upload PDFs, Django says the content type is "application/text"?

2011-12-24 Thread Chris Seberino
I printed the content_type of an uploaded file in Django and noticed that for PDFs I was getting "application/text"? I was getting "application/pdf" a few days ago with same client, server, browser, etc. Anyone know what would cause content type to show wrong kind for PDFs? cs -- You received

am I understanding sessions correctly?

2011-12-22 Thread Chris Curvey
The short version: when processing a request, does Django *always* collect session information from the session store before starting the view? The long version: i have an application that makes heavy use of AJAX. When a user changes something on the page, the page fires an AJAX POST to apply

Re: disabling south for running tests

2011-11-26 Thread Chris Northwood
alternative /  more elegant ways. There's a setting built into South which does this: SOUTH_TESTS_MIGRATE [http://south.aeracode.org/docs/settings.html#south-tests-migrate] Regards, Chris Northwood -- You received this message because you are subscribed to the Google Groups "Django use

Re: How to trace the raw executed sql in Django

2011-11-18 Thread Chris Northwood
db >>> > db=MySQLdb.connect(passwd="pass",db="dname") >>> > c=db.cursor() >>> > max_price=5 >>> > c.execute(RAW_SQL_HERE) Why not execute the SQL using Django, as documented here? https://docs.djangoproject.com/en/dev/topics/db/sql/

Re: Why can't "directly" change array elements of model objects in Django shell?

2011-10-07 Thread Chris Seberino
On Oct 7, 10:39 am, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > On Fri, Oct 7, 2011 at 10:30 AM, Chris Seberino <cseber...@gmail.com> wrote: > > > I've noticed that this doesn't often work in Django shell... > > > x = MyModel.objects.all() > > x[3]

Why can't "directly" change array elements of model objects in Django shell?

2011-10-07 Thread Chris Seberino
I've noticed that this doesn't often work in Django shell... x = MyModel.objects.all() x[3].some_field = "new value" x[3].save() Rather, I must often do this... temp = x[3] temp.some_field = "new value" temp.save() *Sometimes* the first works and I don't know why. P

Re: Beginner a bit lost - need some pointers please

2011-10-07 Thread Chris G
On Fri, Oct 07, 2011 at 11:40:03AM +0100, Chris G wrote: > On Fri, Oct 07, 2011 at 11:47:49AM +0530, kenneth gonsalves wrote: > > On Thu, 2011-10-06 at 10:00 +0100, Chris G wrote: > > > > this is as simple as it gets > > > > https://bitbucket.org/lawgon/django-a

Re: Easy question (I hope)

2011-10-07 Thread Chris Czub
Shawn -- what do you recommend instead? A friend and I recently had this debate. His suggestion was to split off as much behavior into smaller apps with only a handful of models in the models.py as possible, but I said that if it's not reusable, it shouldn't be an app. I still haven't found a

Re: Beginner a bit lost - need some pointers please

2011-10-07 Thread Chris G
On Fri, Oct 07, 2011 at 11:47:49AM +0530, kenneth gonsalves wrote: > On Thu, 2011-10-06 at 10:00 +0100, Chris G wrote: > > > this is as simple as it gets > > > https://bitbucket.org/lawgon/django-addition/overview > > > > Too simple for me, it doesn't run. >

Re: Beginner a bit lost - need some pointers please

2011-10-06 Thread Chris G
On Thu, Oct 06, 2011 at 10:09:05AM +0100, Cal Leeming [Simplicity Media Ltd] wrote: > Chris - >The only thing I can say, is that you've been given some really good >advice on this thread so far. Yes, I'm not complaining at all, the feedback has all been very helpful. I'm ju

Re: Beginner a bit lost - need some pointers please

2011-10-06 Thread Chris G
On Thu, Oct 06, 2011 at 01:14:37AM -0700, Daniel Roseman wrote: > On Wednesday, 5 October 2011 20:55:33 UTC+1, Chris Green wrote: > > I'm an experienced programmer (started around 1971 or so!) and I've done > lots of things over the years, much of my backgroun

Re: Beginner a bit lost - need some pointers please

2011-10-06 Thread Chris G
On Thu, Oct 06, 2011 at 11:01:13AM +0530, kenneth gonsalves wrote: > On Wed, 2011-10-05 at 23:02 +0100, Chris G wrote: > > OK, so there isn't a single simple answer. However it would still be > > really nice to see a complete two or three page django site with a > > dat

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 04:35:49PM -0400, Peter Herndon wrote: > > On Oct 5, 2011, at 3:55 PM, Chris G wrote: > > > > However two rather basic things still elude me:- > > > >Where/how do I actually start creating the top level/page of a web > >site?

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 03:02:13PM -0500, Javier Guerra Giraldez wrote: > On Wed, Oct 5, 2011 at 2:55 PM, Chris G <c...@isbd.net> wrote: > > I'm trying to get my mind round django.  I have it installed on my > > unbuntu server, it works, I've worked through tutorials 1 and 2 a

Re: Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 08:58:10PM +0100, Cal Leeming [Simplicity Media Ltd] wrote: >Hi Chris, >I'm assuming that you don't have any experience with Python?? No/yes, I *do* have Python experience, it's my language of choice for scripts which require a bit more than basic shell scr

Beginner a bit lost - need some pointers please

2011-10-05 Thread Chris G
, but at the moment I'm feeling a bit lost! :-) -- Chris Green -- 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-user

Re: Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Chris G
On Wed, Oct 05, 2011 at 03:13:08PM +, Brett Epps wrote: > Hi Chris, > > Once you've defined a model for your data, you can use a ModelForm [1] to > automatically generate a form for that model. > > You might also want to check out the admin site [2], which displays data >

Simple input forms which show more than one row - easy/possible in django?

2011-10-05 Thread Chris G
and all its fields? -- Chris Green -- 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

Re: 3rd party Apps in Django

2011-08-15 Thread Chris Lawlor
+1 for using virtualenv. Indispensable for working on more than one dingo project on the same development machine. If you're developing on Linux or Mac, take a look at virtualenvwrapper. It makes working with virtual environments practically painless. -- You received this message because you

Django 1.3 admin added methods login requirement

2011-08-12 Thread Chris Fraschetti
I believe that in earlier versions of django if you added a view method to an admin, and extended the get_urls method that because it was under the admin it would automatically require at least a log in (user.is_authenticated()=True. I have been working with Django 1.3 and have noticed that this

Re: How control access to static pages that are *not* part of a Django app?

2011-08-01 Thread Chris Seberino
On Aug 1, 7:11 am, DrBloodmoney wrote: > You can look into protecting them with mod_xsendfile for Apache Thanks. I'll look into that. Is there no way to have a view hand off a page to Apache? If there was, I could have a view that was password protected and only when

How control access to static pages that are *not* part of a Django app?

2011-07-31 Thread Chris Seberino
handled by Django, they don't enjoy Django's access controls. They don't even have a view since they are just static pages handled by Apache. Is there any way to somehow prevent access to them unless someone is signed into my Django app? chris -- You received this message because you are subscribed

Help selecting info from across databases in queries.

2011-06-24 Thread Chris McComas
Here are my models: http://dpaste.com/558411/ I'm wanting to run a query on the Team model that gets every game from Games where the team's opponent was in the Coaches Poll Top 25. So, the view is getting: team = Team.objects.get(pk=team_id) On this page, it'll display team info (I cut out

Using distinct and ordering

2011-06-24 Thread Chris Matthews
ues('town_name').distinct().order_by() - this works as I would have expected 'cos it drops the SQL ORDER BY. So it would be nice to do this: self.filter(town_name__istartswith='Randfo').values('town_name', 'province__country__name', 'province__name').distinct('town_name') Regards Chris Matthews --

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-06-23 Thread Chris Calitz
Sounds really cool. I'm definitely in. On 22 Jun 2011, at 14:16, "Cal Leeming [Simplicity Media Ltd]" wrote: > Hi all, > > Some of you may have noticed, in the last few months I've done quite a few > posts/snippets about handling large data sets in

Re: Help with Templates and ljust

2011-06-17 Thread Chris McComas
Figured it out. Added this to my Model: @property def spacer(self): return (25-len(str(self.team.name)))*' ' then in my template just added {{ team.spacer }} On Jun 17, 7:17 pm, Chris McComas <mccomas.ch...@gmail.com> wrote: > I have this as my template code:

Help with Templates and ljust

2011-06-17 Thread Chris McComas
I have this as my template code: http://dpaste.com/555651/ This is the HTML it is outputting, which makes sense. What I'm trying to do is make it so the closing tag is right after the team name and the whitespace from the ljust after it. http://dpaste.com/555649/ -- You received this message

Re: Unsafe to continue Django session unencrypted? (i.e. login with HTTPS then drop to HTTP after that?)

2011-06-14 Thread Chris Seberino
On Jun 14, 10:47 am, Tom Evans wrote: > Yes, of course it is - HTTP is stateless, so how else would sessions > work if the session id is not transmitted back to the server by the > browser? I agree. Yet, eBay, Google Groups & Godaddy drop down to HTTP after login. Why

Unsafe to continue Django session unencrypted? (i.e. login with HTTPS then drop to HTTP after that?)

2011-06-14 Thread Chris Seberino
I have Apache in front of my Django app. It forces login pages to use HTTPS but then forces rest of pages to only use HTTP. Is client browser sending sensitive login or session info in the clear when I am not using HTTPS? My nonencrypted pages don't present or ask for sensitive info. The only

Re: python + BDD (Behaviour)

2011-06-13 Thread Chris Czub
I've had good luck with Lettuce. It's very similar to Cucumber(the test format is the same) so you should be able to jump right in. The terrain features they offer are really useful as well. On Sat, Jun 11, 2011 at 8:58 PM, Mark Curphey wrote: > Thanks. Do most Python folks

Feed Parser, Community Aggregator, Date and Time settings

2011-06-12 Thread Chris McComas
I'm using the Django community aggregator on my site, which uses the Universal Feed Parser to parse RSS feeds and save them in a database. I noticed that the date_modified for feeds were actually +5 of my timezone, which is set to America/Detroit in my Django settings. I'm on DotCloud and

Help with Multiple Databases Master/Slave

2011-06-11 Thread Chris McComas
I have this database setup: http://dpaste.com/553289/ This is my db router file: http://dpaste.com/553290/ When I try to run ./manage.py syncdb --database=slave1 it starts to create the tables, but when it gets to the auth_permission table I get this error: django.db.utils.IntegrityError:

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
Bruno, Thanks. It wasn't exactly working properly, so I just had to add .order_by('feed__feed_type__order_by') and it seems to be working properly. On Jun 10, 3:33 pm, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On 10 juin, 17:23, Chris McComas <mccomas.ch...@gmai

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
%} it does the first {% for %} loop perfectly, the second {% for %} loop gets the Feed from the database for that FeedType, but I need it to get FeedItems for Feed in FeedType Thanks for any help On Jun 10, 8:54 am, Chris McComas <mccomas.ch...@gmail.com> wrote: > Thanks very much! >

Re: Help with custom model method for query

2011-06-10 Thread Chris McComas
}} {% for entry in feed.list %} {{ entry.title }} {% endfor %} {% endfor %} On Jun 10, 6:21 am, bruno desthuilliers <bruno.desthuilli...@gmail.com> wrote: > On Jun 10, 6:13 am, Chris McComas <mccomas.ch...@gmai

Help with custom model method for query

2011-06-09 Thread Chris McComas
I have this views.py and models.py: http://dpaste.com/552615/ On the view what I want to do is display a list of all the feed types (News, Sports, etc general categories), then then below each of those feed type headings display the FeedItems for each feed for that city. Prior to adding the

Re: Parsing feeds that are imported

2011-06-08 Thread Chris McComas
Chris, Thanks, the django community aggregator is built on top of the Universal Feed Parser. I figured out the zip codes function of my app. What I can't figure out is why when I add a m2m model to my update_feeds.py does not work. As far as I can tell in the update_feeds doesn't access the Feed

Re: VERY cheap django hosting?

2011-06-08 Thread Chris Lawlor
Always Data (http://www.alwaysdata.com) has a free plan, but it is quite limited (you only get 10 MB disk space). On Jun 8, 2:39 am, Maksymus007 wrote: > megiteam.pl is 24PLN which is about 8usd a month:) > > Pozdrawiam, Maksymilian Pawlak > 08-06-2011 08:30 użytkownik

Re: Parsing feeds that are imported

2011-06-07 Thread Chris Lawlor
/ Atom feeds, and so may be somewhat more useful than BeautifulSoup. On Jun 6, 10:59 pm, Chris McComas <mccomas.ch...@gmail.com> wrote: > Also, using the update_feeds that's part of the Django Community > Aggregator worked initially, but I started over adding a m2m field on > the Feed

Re: Parsing feeds that are imported

2011-06-06 Thread Chris McComas
s, On Jun 6, 4:55 pm, Chris McComas <mccomas.ch...@gmail.com> wrote: > This could be the wrong place to ask (maybe a BeautifulSoup) > question... > > I have a Django app that is based around the Django Community > Aggregator, it gets feeds from various sites and displays them

Parsing feeds that are imported

2011-06-06 Thread Chris McComas
This could be the wrong place to ask (maybe a BeautifulSoup) question... I have a Django app that is based around the Django Community Aggregator, it gets feeds from various sites and displays them on my site. What I am wanting to do, if possible, is when it gets a feed if a certain zip code is

Re: Why errors when restart but goes away after reload again! How fix?

2011-05-22 Thread Chris Seberino
Mateusz Thanks for the feedback. Those docs you pointed to were about missing views. I checked and my views are not missing. I looked more closely at the error message and noticed it appears to be complaining that my models are missing. I don't know if that helps. (see below) Could it also

Re: Why errors when restart but goes away after reload again! How fix?

2011-05-22 Thread Chris Seberino
he 2.2.16 I use Firefox on Ubuntu Linux 10.10 (server and client both user this Ubuntu version) In my settings.py file I am loading sessions, CSRF and auth middleware, Tell me if there is any other info that would be relevant. Maybe this is a mod_wsgi quirk? Sincerely, Chris -- You receiv

Why errors when restart but goes away after reload again! How fix?

2011-05-21 Thread Chris Seberino
error not matter what page I try to view first after a restart. It goes away on the second reload always. chris -- 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 unsubs

Re: failing to pass model objects to template for some reason....

2011-05-21 Thread Chris Seberino
On May 21, 5:22 am, Duane Griffin wrote: > Is the messaging framework configured (note that it is by default)? Wow. I thanks so much! I never would have caught this! I renamed Message to Annoucement and now it works! cs -- You received this message because you are

failing to pass model objects to template for some reason....

2011-05-20 Thread Chris Seberino
I have a model class called Message with an attribute called text. ** When I pass a list of these objects called messages to my template, it doesn't show up. ** When I instead create this derivative called fred, that *does* work... fred = [e.text for e in messages] Why would fred work

Re: weird error with MS Excel 2010 exports

2011-05-20 Thread chris hendrix
hi gabe - response = render_to_response('reports/trackingdump.html',{'trs':trs,}) filename='trackingdump.xls' response['Content-Disposition'] = 'attachment; filename=' + filename response['Content-Type'] = 'application/vnd.ms-excel; charset=utf-8' that's

how transfer password hashes between old and new mysql databases for django app?

2011-05-18 Thread Chris Seberino
I am migrating my Django app from an old database to a new one with DIFFERENT model classes. How can I copy my passwords/hashes over? Is there some special way to copy over the hash? Is that even possible? A MySQL command line would be fine. cs -- You received this message because you are

Error when try to do ManyToMany relation with User class...

2011-05-17 Thread Chris Seberino
an m2m relation with model User, which has either not been installed or is abstract. mvc.quiz: 'users' has an m2m relation with model User, which has either not been installed or is abstract. Not sure how to fix this or what means. Chris -- You received this message because you are subscribed

Re: How change field to "unique" in existing mysql database?

2011-05-14 Thread Chris Seberino
Shawn Thanks! Is South just a script that runs? Can I uninstall after the conversion if desired? Or, does it permanently alter a Django app somehow? cs On May 14, 10:53 pm, Shawn Milochik wrote: > The best way is to use South. > > http://south.aeracode.org/ > > In your

How change field to "unique" in existing mysql database?

2011-05-14 Thread Chris Seberino
mmand line equivalent? Preferably there is a way to do this from Django shell or other way? Sincerely, Chris -- 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: Best way to tell if we're in a test

2011-04-29 Thread Chris Czub
I think you might be taking the wrong approach. Rather than having your application code checking whether or not it's in a test, have your testing code disable/mock certain behaviors that you don't want exercised(like have it always return that the user answered the security question correctly or

Re: For any dictionary in a list, does a value exist for a key?

2011-04-19 Thread Chris Roat
Yep - trying to do it in a template. I can just do the logic within in python - it'll mean redundant info going into the template, but that's OK. Thanks for your response, C On Mon, Apr 18, 2011 at 9:27 AM, Shawn Milochik wrote: > You can do this pretty easily in Python

Re: Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread Chris Spencer
Awesome, that was it. My old code now works again. Thanks! Chris On Mon, Apr 18, 2011 at 5:47 PM, akaariai <akaar...@gmail.com> wrote: > On Apr 19, 12:17 am, Chris Spencer <chriss...@gmail.com> wrote: > > Thanks. However, changing the line to: > > > >

Re: Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread Chris Spencer
Thanks. However, changing the line to: if not self.instance.state.adding: results in essentially the same error: AttributeError: 'MyModel' object has no attribute 'state' On Mon, Apr 18, 2011 at 4:48 PM, akaariai <akaar...@gmail.com> wrote: > On Apr 18, 11:08 pm, Chri

Inline Form Error After Upgrade to Django 1.3

2011-04-18 Thread Chris
, Chris -- 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 opti

For any dictionary in a list, does a value exist for a key?

2011-04-18 Thread Chris Roat
Does a function or construct exist to easily do the following? my_list = [{'id': 'foo'}, {'id': 'bar', 'other': 'baz'}] {% is my_id_value in my_list.id %} // True if my_id_value is 'foo' or 'bar' Thanks! -- You received this message because you are subscribed to the Google Groups "Django

Re: satchmo currency

2011-04-15 Thread Chris Moffitt
just not something that is done out of the box. -Chris On Thu, Apr 14, 2011 at 11:31 PM, ug Charlie <ug.char...@gmail.com> wrote: > Hello, I just make a satchmo shop. 3 languages. > > But the currency make me stuck. > > I just want the site change the currency when

Re: How pass custom data to login template? (Seems only some like 'next' param are allowed!?)

2011-04-11 Thread Chris Seberino
Perhaps can wrap the default login view by calling it in my own view? I really just need to add a few elements to dict I assume gets emitted by it. cs On Apr 11, 5:00 am, bruno desthuilliers wrote: > On 11 avr, 01:20, ChrisSeberino wrote: > >

How pass custom data to login template? (Seems only some like 'next' param are allowed!?)

2011-04-10 Thread Chris Seberino
How pass custom data to login template? (Seems only some like 'next' param are allowed!?) The reason for this problem is the Django auth system doesn't ask user to write the view for login page. cs -- You received this message because you are subscribed to the Google Groups "Django users"

Re: How adjust Django form input elements generated so they don't have "/>" at end and hence will VALIDATE?

2011-04-08 Thread Chris Seberino
Sorry n/m. Apparently this is a long running discussion. I just found the start of a big part of it... http://groups.google.com/group/django-developers/browse_thread/thread/bbf75f0eeaf9fa64/59822bbce1e0be22?#59822bbce1e0be22 cs On Apr 9, 12:08 am, Chris Seberino <cseber...@gmail.com>

Re: How adjust Django form input elements generated so they don't have "/>" at end and hence will VALIDATE?

2011-04-08 Thread Chris Seberino
By the wayby "validate" I meant to say that I want it be be *valid HTML*. cs On Apr 9, 12:06 am, Chris Seberino <cseber...@gmail.com> wrote: > I'm using Django authentication for myhttp://phil4.com/sign_inpage. > > You notice all the Django form input elements gener

How adjust Django form input elements generated so they don't have "/>" at end and hence will VALIDATE?

2011-04-08 Thread Chris Seberino
I'm using Django authentication for my http://phil4.com/sign_in page. You notice all the Django form input elements generated on that page don't validate (They have a "/>" at the end rather than just ">".) How fix!? cs -- You received this message because you are subscribed to the Google

RE: Django app for data management and visualization

2011-04-08 Thread Chris Matthews
Hi Marwan, Another option that I'll investigate is Google Chart Tools / Image Charts (aka Chart API) see http://code.google.com/apis/chart/ Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Marwan Al-Sabbagh Sent

RE: Django app for data management and visualization

2011-04-07 Thread Chris Matthews
u net .Net and it will cost you (not sure if it will save you some money). Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Marwan Al-Sabbagh Sent: 06 April 2011 16:59 To: django-users@googlegroups.com Subject: Re: Django ap

RE: using a models fields

2011-04-05 Thread Chris Matthews
mple to validate user input for latitude & longitude. He actually use the DecimalField and extends it with a clean method, checking that latitude values to fall in -90 to 90 & longitude values to fall in -180 to 180. Regards Chris From: django-users@googlegroups.com [mailto:django-users@goog

RE: Python Decorators

2011-04-05 Thread Chris Matthews
Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of cootetom Sent: 04 April 2011 15:31 To: Django users Subject: Python Decorators Hi all, not exactly a django question but here goes... I'm trying to implement a decorator

How dynamically set "next" parameter in login template to protected page tried to visit?

2011-04-02 Thread Chris Seberino
to access. That way, after logging in they will automatically go to that page. How do this? Chris -- 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 g

RE: How to check the text field values are in my database or not ?

2011-04-01 Thread Chris Matthews
n's help. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Nge Nge Sent: 01 April 2011 04:30 To: Django users Subject: How to check the text field values are in my database or not ? Hi All! How can I check the t

Re: authentication switching mid-session

2011-03-31 Thread Chris Curvey
there's no cacheing in front of the application server, if that's what you're asking. The app server does do some cacheing on its own, but not related to sessions or users. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

RE: staticfile app question

2011-03-31 Thread Chris Matthews
Hi, I liked this explanation/convention http://forum.webfaction.com/viewtopic.php?id=4345 (I opted for this one). If you want more consider django-css https://github.com/dziegler/django-css#readme (I have not tried this). Regards Chris -Original Message- From: django-users

RE: multiline TextField

2011-03-31 Thread Chris Matthews
By using the Textarea widget: class SomeForm(forms.Form): description = forms.CharField(widget=forms.Textarea()) Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of electrocoder Sent: 31 March 2011 00:18

RE: model manager and request

2011-03-31 Thread Chris Matthews
ral e.g. '_x_' between model & column names]) as follows: class Line(models.Model): line_type= models.ForeignKey(Line_Type) (PS: I prefixed 'zz' to the history table names so that pgAdmin lists them at the end of, or after, the 'real' tables). Regards Chris -Original Message-

authentication switching mid-session

2011-03-30 Thread Chris Curvey
When my Django system is under heavy load (system CPU > 90%), I start getting complaints from users that their authentication changes in the middle of a session. For example: 1) Bob logs in to the site. The site says "Hello Bob" at the top of each page. 2) Bob uses the site for a while without

RE: ANN: Django 1.3 released

2011-03-23 Thread Chris Matthews
@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Russell Keith-Magee Sent: 23 March 2011 12:47 To: django-users@googlegroups.com Subject: Re: ANN: Django 1.3 released On Wed, Mar 23, 2011 at 6:25 PM, Chris Matthews <ch...@bbd.co.za> wrote: > I must add my SHA1 on Django-1

RE: ANN: Django 1.3 released

2011-03-23 Thread Chris Matthews
I must add my SHA1 on Django-1.3.tar.gz is 63e62f9a4834c1c8dbb591aac4ef2b1b84c5ea63 (on all of the downloads I did). From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Chris Matthews Sent: 23 March 2011 12:20 To: django-users@googlegroups.com Subject: RE

RE: ANN: Django 1.3 released

2011-03-23 Thread Chris Matthews
Well done! Thanks for all the hard work. I downloaded my version from http://www.djangoproject.com/download/ and Chrome says it comes from http://media.djangoproject.com/releases/1.3/Django-1.3.tar.gz 7zip says "Data error in Django-1.3.tar' File is broken". I have downloaded it a few times

Re: How make CSRF middleware emit html4 rather than xhtml1.0 (closing tags issue) so will validate?

2011-03-21 Thread Chris Seberino
Ian Thanks for the reply. Your solution makes perfect sense. My forms are automatically generated by Django via Form classes. So I can't embed this suggested input element in any form element present in my template. Where should I put this code in since there is no form element? cs > >    

Re: /admin weirdness

2011-03-17 Thread chris hendrix
for the admin site and what does that code look like? Casey On 03/17/2011 03:14 PM, chris hendrix wrote: yeah the urls file looks fine... it only happens randomly but seems tied to DEBUG=False for some reason... not sure why that would make a difference. On 03/17/2011 03:09 PM, werefr0g wrote: Hi

Re: /admin weirdness

2011-03-17 Thread chris hendrix
yeah the urls file looks fine... it only happens randomly but seems tied to DEBUG=False for some reason... not sure why that would make a difference. On 03/17/2011 03:09 PM, werefr0g wrote: Hi Bobby, Maybe some mistake on your url.py, for example if you have an app named "app" and a model

How make CSRF middleware emit html4 rather than xhtml1.0 (closing tags issue) so will validate?

2011-03-14 Thread Chris Seberino
My Django app's html won't validate because CSRF middleware adds hidden tags like this... The only problem is the slash "/>" at the end. How make Django templates not automatically add hidden tags that won't validate? Thanks! cs -- You received this message because you are subscribed to

Re: Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-03-10 Thread chris hendrix
yeah we've followed all the instructions On 03/10/2011 08:00 AM, pols wrote: try re-installing thumbnail easy_install sorl-thumbnail==3.2.5 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-03-10 Thread chris hendrix
both of these are done and we're still getting the error. On 03/10/2011 04:32 AM, pols wrote: Check in settings.py installed apps for the entry 'satchmo_utils.thumbnail', If not istalled add this.If you are using new version you may need to add {% endthumbnail %} in the templates before closing

RE: Tracking Row changes

2011-02-24 Thread Chris Matthews
Hi Andre, Also have a look at: http://code.google.com/p/django-history-tables/ and http://qr7.com/2010/10/django-simple-history-ftw/ by Corey Bertram based on book ProJango by Marty Alchin Chapter 11 (page 263 onwards) Regards Chris From: django-users@googlegroups.com [mailto:django-users

RE: field choices() as queryset?

2011-02-24 Thread Chris Matthews
Typo choices.append((item.name, item.name)) should be choices.append((item.id, item.name)) From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Mike Ramirez Sent: 24 February 2011 14:10 To: django-users@googlegroups.com Subject: Re: field choices() as queryset?

RE: urls.py and views.generic issue

2011-02-22 Thread Chris Matthews
.html is shown because it matches: (r'^blog/', include('anttipetaisto.blog.urls')), and then (r'^$','archive_index', dict(info_dict, template_name='blog/list.html')), What URL do you enter when you get the error? Regards Chris -Original Message- From: django-users@googlegroup

Re: I'm having problem showing from the value a sub-sub model.

2011-02-22 Thread Chris
sorry your right, I didn't receive any notification so I thought it wasn't posted. I've answered in the original thread On Feb 21, 2:00 pm, Shawn Milochik wrote: > Why are you re-posting this? You posted it over the weekend. I > replied. If my reply didn't help, tell us the

Re: How to display value from a sub model in the template

2011-02-21 Thread Chris
The default (from the doc F00_set so: ) playerVital_set and playerSkills_set So I want the first set for each of them ... (sorry for the double post by the way) On Feb 20, 9:10 pm, Shawn Milochik wrote: > What are the related_name values you gave to the foreign key fields

I'm having problem showing from the value a sub-sub model.

2011-02-21 Thread Chris
something obvious but I can't manage to find it in the doc. Any pointers would be helpfull. thanks, Chris Here my model class Team(models.Model): team_name = models.CharField(max_length=200) city = models.CharField(max_length=200) #propably FK later def __unicode__(self): return

RE: urls.py and views.generic issue

2011-02-20 Thread Chris Matthews
It also seems that the space preceding the caret ^ should not be there So ^blog/ ^(?P\d{4})/$ Should be ^blog/^(?P\d{4})/$ -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of jnns Sent: 20 February 2011 03:07 To: Django users

How to display value from a sub model in the template

2011-02-20 Thread Chris
of the sub model when looping players in the team object? Showing value of the player model work fine but not the sub model. I tried various syntax but nothing seem to work. Thanks, Chris Here are the model and the template i'm building : model.py class Team(models.Model): team_name

RE: list indices must be integers not unicode

2011-02-18 Thread Chris Matthews
you Chris Matthews for your reply. I'm working on a online examination system. I could able to generate some random questions from a data base containg hundreds of questions. So when ever a user answer and submit those random questions a dictionary contating a "Question_id and Answer&

RE: list indices must be integers not unicode

2011-02-18 Thread Chris Matthews
Oh and you probably wanted: if request.method=="POST": data = request.POST id_list = [int(x) for x in data.values()] questions = MyModel.objects.filter(id__in = id_list) From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behal

RE: list indices must be integers not unicode

2011-02-18 Thread Chris Matthews
Hi Balu, Numeric data from the form must be converted to int. I suspect you wanted to index data; not id_list. if request.method=="POST": data = request.POST temp_list = data.keys() id_list = [] for i in temp_list:

RE: How to Auto fill fields on Save in Django Admin?

2011-02-16 Thread Chris Matthews
=False Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Matteius Sent: 17 February 2011 08:47 To: Django users Subject: How to Auto fill fields on Save in Django Admin? I have an Announcement model that has two fields

RE: how can I filter related (foreign key) objects?

2011-02-16 Thread Chris Matthews
://docs.djangoproject.com/en/1.2/topics/db/managers/ in case you should consider using it (depending upon how much magic is required from your function). Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of serek Sent: 17 February 2011

RE: form select box how to (help needed)

2011-02-16 Thread Chris Matthews
, required=True) In your module form = ProfileForm() if not public: form.fields['locations'].choices = LOCATION_CHOICES Example 2 is a bit 'cleaner'/neater I think. Regards Chris -Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf

<    1   2   3   4   5   6   7   8   9   10   >