Messages framework not including tags

2012-06-21 Thread bax...@gretschpages.com
I've read the docs: https://docs.djangoproject.com/en/1.3/ref/contrib/messages/ I have the MessageMiddleware in place. I have the SessionMiddleware in place (before MessageMiddleware) django.contrib.messages.context_processors.messages in in the context processors django.contrib.messages in

Re: Custom admin changelist queryset

2011-11-18 Thread bax...@gretschpages.com
> Can you tell us what you goal here is? The goal is to get my combined list of featured items to a changelist page. From there, I'll have additional work to do, but step one is getting it to the page at all. Another thought is to just chain the querysets together and send 'em to my own

Custom admin changelist queryset

2011-11-17 Thread bax...@gretschpages.com
I'm trying to combine a subset of two models and pass them to an admin change list: class FeaturedItemsAdmin(admin.ModelAdmin): def queryset(self, request): qs1 = Foo.objects.filter(featured=True) qs2 = Bar.objects.filter(featured=True) . do stuff to combine ...

Re: Is there a standard way to implement the top level of my site?

2011-11-07 Thread bax...@gretschpages.com
On Nov 7, 4:51 pm, "M. Herold" wrote: > That last, simple implementation is probably what I'm really looking > for at this point. My only problem is I'm not sure where that line of > code should live or where that template is expected (the template > directory set in my

Re: firstof as

2011-11-07 Thread bax...@gretschpages.com
On Nov 7, 3:50 pm, Nikolas Stevenson-Molnar wrote: > Assuming obj is iterable, you can do: {% with > obj.0.thingobj.get_something as thing %} > > ...is that what you mean? Not exactly, no. In my particular case, it's more of a check to see if it's available, and if not,

Re: bar charts

2011-11-07 Thread bax...@gretschpages.com
Most times I just use css and percentwidth for simple bar charts. On Nov 7, 10:23 am, Leotis buchanan wrote: > You could also try processing.js > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Is there a standard way to implement the top level of my site?

2011-11-07 Thread bax...@gretschpages.com
I've had per-project views (in the project root), I've had apps feeding indexes, and I've gone direct to template using template tags to fill in snippets needed. Most times -- but not always -- the last approach seems the most flexible and easiest. On Nov 7, 1:19 pm, Kurtis Mullins

firstof as

2011-11-07 Thread bax...@gretschpages.com
What I'm after is something like {% with firstof obj.thing obj.get_something as thing %} Is there any way to do this short of writing my own template tag and figuring out which exists first? Seems like it would be a fairly common need. -- You received this message because you are subscribed to

Trying to understand db.reset_queries()

2011-08-05 Thread bax...@gretschpages.com
With debug = False, under what circumstances (if any) should I have db.reset_queries()? I understand from docs that queries are cleared in the request cycle, but can anyone give me an example of what sort of thing would require it being done manually? -- You received this message because you are

Re: Django - modifying navigation design

2011-08-05 Thread bax...@gretschpages.com
I'm betting it's just sitting in the template as plain HTML. -- 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

Re: Django for a front end designer

2011-08-05 Thread bax...@gretschpages.com
I came into Django as a designer. It can be done, just take baby steps. The more python you learn, the happier you'll be, and the more productive. But in the mean time, you can do a lot with generic views and reusable apps that would keep you from having to write much code at all. I would suggest

Re: Getting "most"

2011-05-27 Thread bax...@gretschpages.com
And that works, with one exception: .get_object_for_this_type(pk=object['object_id']) Getting the objects IS a bit inefficient, but since I only need the top 10, I can live with it. On May 27, 12:32 pm, Jason Culverhouse wrote: > If you were to do something like this: > >

Getting "most"

2011-05-27 Thread bax...@gretschpages.com
I have a "watch" model that lets users keep an eye on various things through a generic relation: class Watch(models.Model): subscriber = models.ForeignKey(User, verbose_name="Subscriber") content_type = models.ForeignKey(ContentType) content_object = generic.GenericForeignKey()

500.html and STATIC_URL

2011-05-25 Thread bax...@gretschpages.com
Am I correct in understanding that when there is a 500 error and the user is routed to 500.html, it does not know settings.STATIC_URL or settings.MEDIA_URL, but 404.html does? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread bax...@gretschpages.com
On Dec 20, 11:26 am, Tom Evans <tevans...@googlemail.com> wrote: > On Mon, Dec 20, 2010 at 4:52 PM, bax...@gretschpages.com > > If I load the page in chrome with its resource tracking debug tab > open, I can see that several files that are requested receive zero > sized res

Re: server connection dropped? IO Error? What's going on?

2010-12-20 Thread bax...@gretschpages.com
> Just looking at your style.css file, it's got a weird (to my eye) line in it: > >         src: local('☺'), > url('/media/fonts/LeagueGothic/League_Gothic-webfont.woff') format('woff'), > Comes from fontsquirrel. As I recall, it forces the local load if the font is available, or passes along

server connection dropped? IO Error? What's going on?

2010-12-20 Thread bax...@gretschpages.com
Foolishly posted this late last week, which is a tough time to get help. Please forgive me for reposting, but I'm at my wit's end here. What I've got is a very localized, yet apparently completely random sort of IO error, or something else causing the server to drop out. You can see an example

Re: Very strange lost network connection problem

2010-12-16 Thread bax...@gretschpages.com
', 'utils.lastseen.LastSeen', 'django.middleware.gzip.GZipMiddleware', 'django.contrib.redirects.middleware.RedirectFallbackMiddleware', 'django.middleware.cache.FetchFromCacheMiddleware', ) On Dec 16, 9:40 am, "bax...@gretschpages.com" <mail.bax...@gmail.com> wrote: > This is a weir

Very strange lost network connection problem

2010-12-16 Thread bax...@gretschpages.com
This is a weird one. On a handful of topics on my forum, accessing the topic and/or attempting to add a post or do anything else loses the network connection. It's only on a handful, and it just started recently. I have no idea how Django can even do such a thing, but you can see it here:

server configuration

2010-10-29 Thread bax...@gretschpages.com
I'm finding conflicting info regarding preferred server configurations. I'm using Nginx for static, passing off to Apache/mod_wsgi for django stuff. Currently, wsgi is in daemon, and I'm using the worker MPM. >From some sources I've seen that is ideal, but I notice in the django docs that prefork

Legacy URLs redirect

2010-10-11 Thread bax...@gretschpages.com
I'm sure this is simple and I'm just not constructing the URL properly. Basically, it used to be a drupal site, with the cruddy old Drupal every url is a querystring setup. What I want is pretty simple... all of those old URLs resolve to the home page and send a 301 to the spider. I tried:

admin login problems and 'ValidationError: [u'ManagementForm data is missing or has been tampered with'] '

2010-08-19 Thread bax...@gretschpages.com
I'm having a lot of staff users having login problems. Until today, it was only IE, but today I saw it happen to a user on FF as well. The basic flow is like this: They try to login to the admin. It appears to work. When they click anywhere, it goes back to the admin login. This repeats several

Re: portable apps problem

2010-08-05 Thread bax...@gretschpages.com
I came up with a solution using if 'foo' in settings.INSTALLED_APPS: but it feels pretty hackish. If there's a better way, I'd love to hear it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

portable apps problem

2010-08-05 Thread bax...@gretschpages.com
I try to make my apps portable between the various sites/projects that use them, but I'm running into some problems doing so. I'm hoping there's some good way to handle this I just don't understand or know about. In a nutshell, I've got multiple sites/projects, and I'd like them to all use the

Re: Problem with management command

2010-07-20 Thread bax...@gretschpages.com
On Jul 20, 10:30 am, Franklin Einspruch wrote: > I can't help but notice that you have  import_stuffi() in the cron > version and import_stuff() in the class. Might that be the problem? > Nope, just a typo. That's not it. -- You received this message because you

Problem with management command

2010-07-20 Thread bax...@gretschpages.com
I'm trying to write a script that I can run from the command line, as cron, or as a management command. Command line works fine. Management command does not. I get an "unknown command" error. Any ideas what I'm doing wrong here: http://dpaste.com/hold/220122/ -- You received this message because

Problem with DateField input_formats

2010-06-23 Thread bax...@gretschpages.com
I have: DATE_INPUT_FORMATS = ( '%n/%j/%Y', '%n/%j/%y', # '10/25/2006', '10/25/06' '%n-%j-%Y', '%n-%j-%y', # '10-25-2006', '10-25-06' '%M %j %Y', '%M %j, %Y', # 'Oct 25 2006', 'Oct 25, 2006' '%b %j %Y', '%b %j, %Y', # 'oct 25 2006', 'oct 25, 2006' '%F %j %Y', '%F %j, %Y', #

Re: User-level permissions?

2010-06-11 Thread bax...@gretschpages.com
Still looking for an clue on this. Permissions are simply not there. On Jun 7, 3:03 pm, "bax...@gretschpages.com" <mail.bax...@gmail.com> wrote: > OK, I'm going nuts. For some reason, my user-levelpermissionshave > disappeared. I can changepermissionsat the group level, but

User-level permissions?

2010-06-07 Thread bax...@gretschpages.com
OK, I'm going nuts. For some reason, my user-level permissions have disappeared. I can change permissions at the group level, but at the user level I can only assign groups -- I can no longer just add individual permissions to that individual user. Any suggestions on where the functionality may

Trouble with comment moderation

2010-05-28 Thread bax...@gretschpages.com
I have a very simple blog app and am trying to enable moderation on the entries. I'm following the docs, but nothing seems to be happening: The code: http://dpaste.com/200509/ Which would lead me to entries > 14 days old would be closed for commenting. Not so. And no matter what I do, all

Re: Restarting the server while working on dreamhost.

2010-05-16 Thread bax...@gretschpages.com
It's been a while since I messed around on Dreamhost (finding them utterly incapable of running a django site), but try touching the wsgi file. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Server on diffferent machine

2010-05-16 Thread bax...@gretschpages.com
Yup, it was a sql configuration thing. Once that was sorted out, Django worked exactly as expected, as usual. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe

Re: Server on diffferent machine

2010-05-16 Thread bax...@gretschpages.com
On May 16, 1:55 pm, Daniel Hilton wrote: > Can you ping the db machine from the webserver? > Can you access the db machine from the webserver using a mysql client > such as Navicat or such like? I can go to the DB machine via phpmyadmin. However, when I try to ping

Re: Pluggable QA app?

2010-05-16 Thread bax...@gretschpages.com
Thanks. In the end I wrote my own. Wasn't that hard, actually. CNPROG had the same problem the other ones I looked at: more of a site than a pluggable app. That Django-Voices is definitely interesting, though. -- You received this message because you are subscribed to the Google Groups "Django

Server on diffferent machine

2010-05-16 Thread bax...@gretschpages.com
I know this is something stupid I'm missing, but I'm not getting it. I'm trying to run my Django from one cloud instance and the DB from another, to (hopefully) optimize each server for task and balance the load a bit. On the DB server, I have mysql installed and have a working database running

Pluggable Q app?

2010-05-14 Thread bax...@gretschpages.com
Can anyone give me any suggestions for a relatively simple, pluggable Q app? I'm looking for something sorta Stack-Overflow-ish, but I'm OK with handling voting, authentication, search, etc. separately. What I've found so far (OSQA, Askbot, soclone) are far from pluggable. I don't want a whole

Re: Problem using django-typogrify and smartypants

2010-04-16 Thread bax...@gretschpages.com
Try swapping the order of smartypants and widont. Also, what exactly is standfirst? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email

Re: forms.py and javascript functions

2010-04-15 Thread bax...@gretschpages.com
Even better, don't put them in as an attribute. Separate your JS out and call the form element by ID (which it already has) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To

Re: Problem using django-typogrify and smartypants

2010-04-15 Thread bax...@gretschpages.com
On Apr 14, 11:08 pm, HiddenWolf wrote: > > TemplateSyntaxError at /blog/ > > Caught an exception while rendering: 'module' object has no attribute > 'smartyPants' > I think you want smartypants, not smartyPants -- You received this message because you are subscribed to the

Re: need help, from where I have to start ?

2010-04-14 Thread bax...@gretschpages.com
Start with the docs and walk through building the example poll app. >From there, move on to looking at some of the simple pluggable apps, and/or grab the "practical django projects" book. On Apr 14, 6:40 am, deikna wrote: > Hallo , I want to know where I can get simple

Re: Problems with comment form customization ?

2010-04-13 Thread bax...@gretschpages.com
Personally, I just set the width of textareas in my CSS and call it a day. On Apr 13, 2:35 pm, Ariel wrote: > if I want to reduce de amount of columns that the > textarea has, how could I do it ? -- You received this message because you are subscribed to the Google Groups

Re: get_comment_count templatetag

2010-04-13 Thread bax...@gretschpages.com
ll now. > > thank you for sharing your thoughts. > > On 13 апр, 00:03, "bax...@gretschpages.com" <mail.bax...@gmail.com> > wrote: > > > > > I'm not saying it's the best way, but I would either define my own > > get_comment_count in my application's m

Re: what lines in the templates are culpable?

2010-04-12 Thread bax...@gretschpages.com
Without seeing the traceback, this is all just guessing--stabbing in the dark. But... a) posting a traceback allows people to actually help not only solve the problem, but help show how to read the traceback. b) commenting out template code may have suppressed the problem, but that still doesn't

Re: what lines in the templates are culpable?

2010-04-12 Thread bax...@gretschpages.com
Again, without seeing the trace it's hard to say, but it sounds like your error is happening well before it ever gets to the template, making the template irrelevant. On Apr 12, 4:10 pm, Phlip wrote: > > Uusually the first line in the traceback tells you pretty explicitly >

Re: what lines in the templates are culpable?

2010-04-12 Thread bax...@gretschpages.com
Uusually the first line in the traceback tells you pretty explicitly where the error is. Without the traceback, it's hard to say where your problem lies. On Apr 12, 3:25 pm, Phlip wrote: > Djangoists: > > When code below a template throws an error, we get an insanely >

generic comments

2010-04-12 Thread bax...@gretschpages.com
Probably a dumb question, but can the comments system handle generic comments? In other words, if I just have a general "comments" page, can I have comments that aren't attached to any particular object? -- You received this message because you are subscribed to the Google Groups "Django

Re: get_comment_count templatetag

2010-04-12 Thread bax...@gretschpages.com
I'm not saying it's the best way, but I would either define my own get_comment_count in my application's models.py that looped through the ojbects comments (and their comments) to get an accurate count. OR I would store comment_count locally on the object and send a signal when a comment is

Re: Problems with comment form customization ?

2010-04-12 Thread bax...@gretschpages.com
There are several ways you can do it, but probably the most straightforward is how django does it in the first place: {% for field in form %} {% if field.is_hidden %} {{ field }} {% else %} {% if field.errors %}{{ field.errors }}{% endif %}

Re: HTML code shown on web page after template render.

2010-03-29 Thread bax...@gretschpages.com
I would generally recommend against storing html in the database, but if you're going to, and if you KNOW that it's safe, you have to mark it safe: {{ obj.stuff|safe }} On Mar 29, 12:36 pm, gvernold wrote: > Hi fellow Djangoists > > I've got some content with embedded

Re: Weird path problem

2010-03-29 Thread bax...@gretschpages.com
Looks like it was a pythonpath thing. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Weird path problem

2010-03-29 Thread bax...@gretschpages.com
my setup is like this: /apps/ /apps/app1/ /apps/app2/ /projects/ /myproject/ I've got it set up that way because multiple projects use multiple apps. Because of that setup, I use django-admin.py, specifying the project. Anyways, from the admin and site side of things, everything looks

Re: Need limit_choices_to help

2010-03-19 Thread bax...@gretschpages.com
Looking at this more, I think I may have more of a logic problem I think Play can't have any idea of Game roster, because until it's been saved it has no idea what game it's related to. So maybe what I need is a way to dynamically fill the player field on Play, after game has been selected.

Need limit_choices_to help

2010-03-19 Thread bax...@gretschpages.com
I've got a Players model I've got a Game models with roster, a M2M relationship with players, to select the players actually playing in that particular game And I've got a Play model with a foreignkey to Players. What I want is to limit the list of players to the ones that are actually on the

Re: Django and Online Payment Systems

2010-03-04 Thread bax...@gretschpages.com
I think it really depends on the payment system. Most all of them I've dealt with have some sort of API. Tap into that, and away you go. Localizable could be interesting, though, just due to currencies and such. I built one that handled shipping to different areas (US, Canada, Intl), but all funds

actions and/or customizing the admin best practices

2010-02-01 Thread bax...@gretschpages.com
I have some admin-y type functions like "import articles from blog" that currently are called when a particular URL is visited, and I'd like to integrate them into the admin. My first thought, since this is on 1.1, was to use actions, but it appears actions can only work when applied to selected

Re: Multiple vhosts in one django project

2010-01-05 Thread bax...@gretschpages.com
On Jan 5, 11:00 am, Zbigniew Braniecki wrote: > I'm trying to set up a web project that will use multiple vhosts. > ... > Now, there are several apps in this project: - browser, docs, api. > They share the same data, but they are different "views". >... > > AFAIK

Re: Problem importing datetime from xml

2009-12-29 Thread bax...@gretschpages.com
On Dec 29, 3:04 pm, Daniel Roseman wrote: > I think you're going to need to show us some of the actual code. Thanks Daniel. I figured it out. In some instances stop time didn't exist, so of course it wouldn't validate as a datetime. Adding a check to set empty stop times

Re: Problem importing datetime from xml

2009-12-29 Thread bax...@gretschpages.com
I probably shouldn't have posted this so close to Christmas. I'm hoping someone will see it now and be able to help. On Dec 21, 10:57 am, "bax...@gretschpages.com" <mail.bax...@gmail.com> wrote: > I'm importing data from xml using xmltramp. Among the data are a bunch > of t

Problem importing datetime from xml

2009-12-21 Thread bax...@gretschpages.com
I'm importing data from xml using xmltramp. Among the data are a bunch of times formatted like so: 2010-05-15 00:00:00 When I import that, I'm getting Enter a valid date/time in -MM-DD HH:MM[:ss[.uu]] format. I've tried altering the formatting, but I'm just not getting these

Re: Can I change the models.py of an existing django app?

2009-12-11 Thread bax...@gretschpages.com
On Dec 11, 1:36 pm, Zeynel wrote: > I am confused about this because the django documentation here > > http://docs.djangoproject.com/en/dev/intro/tutorial01/#activating-models > > says that, > > >> Now, run syncdb again to create those model tables in your database: > >>

Re: Can I change the models.py of an existing django app?

2009-12-11 Thread bax...@gretschpages.com
On Dec 11, 12:21 pm, Zeynel wrote: > Ok. What else do I need to do after uploading the new models.py with > new fields to the server and run manage.py syncdb? > syncdb will not alter an existing database. You can run it (it won't hurt) but it won't insert the new fields.

Re: Can I change the models.py of an existing django app?

2009-12-11 Thread bax...@gretschpages.com
On Dec 11, 11:39 am, Zeynel wrote: > I just want to add 2 new fields to the model. If I upload the new > models.py would the app work as before? Yes, but you'll have to manually adjust your database to have the new fields. -- You received this message because you are

Re: Show additional user information in admin

2009-12-03 Thread bax...@gretschpages.com
> You can do that by creating an > InlineModelAdmin:http://docs.djangoproject.com/en/dev/ref/contrib/admin/#inlinemodelad... How, exactly? I tried this, with no luck: from user_profiles.models import Profile from django.contrib.auth.admin import UserAdmin class

Re: reading iptc info

2009-12-03 Thread bax...@gretschpages.com
Thanks Daniel. I tried with PIL, but it was too slow for me. I think I have an entirely different solution, though. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To

reading iptc info

2009-12-03 Thread bax...@gretschpages.com
Any suggestions on django/python code to read iptc info from images? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Copying files from remote server

2009-11-24 Thread bax...@gretschpages.com
I'm trying to import content from another server via RSS. My problem is with the images. Parsing the RSS with feedparser, I can get the image, but from there I've run into trouble. I can save a pointer to the remote file, but then I can't thumbnail or otherwise work with the image like a local

Re: debug toolbar problem

2009-11-02 Thread bax...@gretschpages.com
Thanks Rob, that makes complete sense. Nothing like a response straight from the source! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: debug toolbar problem

2009-11-02 Thread bax...@gretschpages.com
> Are you caching your pages? Yes, but only for anonymous users > Are you using Django ORM? Yes > Have you added the DebugToolbarMiddleware to your MIDDLEWARE_CLASSES > in settings.py? Yes. In settings: MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware',

debug toolbar problem

2009-11-01 Thread bax...@gretschpages.com
I finally installed the django debug toolbar, which looks like a very nice piece of work, but it's not reporting sql queries for me. Every page: 0 queries, 0 seconds. Any suggestions on where the problem may lie? --~--~-~--~~~---~--~~ You received this message

Re: upload problems

2009-10-28 Thread bax...@gretschpages.com
Thanks Karen. It was the path inconsistency. They were uploading, just not where I was expecting them to be. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: upload problems

2009-10-28 Thread bax...@gretschpages.com
On Oct 27, 8:39 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Tue, Oct 27, 2009 at 5:57 PM, bax...@gretschpages.com < > > > > > > mail.bax...@gmail.com> wrote: > > > Not sure what's going on, but my images aren't uploading. > >

upload problems

2009-10-27 Thread bax...@gretschpages.com
Not sure what's going on, but my images aren't uploading. I'm using the built-in dev server. I'm on OS X. I've tried a lot of different things for MEDIA_ROOT. The most recent is: MEDIA_ROOT = '/Users//Sites/django-media/' and MEDIA_URL = '/media/' For now, while it's just in test, I have

Missing error report

2009-10-05 Thread bax...@gretschpages.com
In my server logs, I'm seeing things like this: [Mon Oct 05 11:00:01 2009] [error] Exception exceptions.TypeError: "'NoneType' object is not callable" in > ignored But I'm NOT getting an error report emailed to me for anything like this. I'm getting emails, but nothing like this, and nothing at

Keeping request.GET keys

2009-09-30 Thread bax...@gretschpages.com
I'm passing through a testcookie function and would like to keep the request.GET keys so if the original URL is /testcookie/?foo=1=2 When testcookie works, I want to redirect to the new URL with foo and bar intact. How? --~--~-~--~~~---~--~~ You received this

Strange upload problem

2009-07-28 Thread bax...@gretschpages.com
Strange in that it used to work and now doesn't. Unfortunately I only use it about twice a year, so I'm not sure when it stopped. Basically, I'm trying to upload a csv and save the fields to the database: class SpecialEvent(models.Model): ... results_csv =

Admin login needs to be https

2009-07-08 Thread bax...@gretschpages.com
I need my admin login page to be https rather than http. I'm using SSLRedirect middleware, and it works beautifully every place else I need an https page. Problem is, on the admin login, I can't find the URL. I don't care if the admin as a whole is https. Honestly, I think I'd prefer it

Password-protecting PDF downloads?

2009-06-29 Thread bax...@gretschpages.com
This is probably more of a python question, but here goes: Can anyone point me to a method of dynamically attaching a password to a PDF and protecting the file before it's downloaded? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

request.session in template tag?

2009-06-01 Thread bax...@gretschpages.com
I'm trying to write a template tag that accesses the user's request.session. My problem is, I don't know how to get the request. Googling around, I saw references to including TEMPLATE_CONTEXT_PROCESSORS in settings, but I'm still not seeing the request. Help?

Google website optimizer--A/B testing

2009-05-12 Thread bax...@gretschpages.com
Does anyone know how one would do A/B testing a la Google Website Optimizer with Django? Some sort of middleware, maybe? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Trying to figure out "featured for month" view

2009-04-28 Thread bax...@gretschpages.com
I'm trying to figure out a view for a "featured Foo for ". The thinking is we'll mark the thing we want featured and which month it should appear. So, in the model, I'm thinking featured_for_month with month_choices being the months and featured for year being something like: YEAR_CHOICES =

Problem creating object

2009-04-20 Thread bax...@gretschpages.com
I'm trying to manually create an object (from a signal). My problem is that the object has a 'sites' M2M field: class News_item(models.Model): ... sites = models.ManyToManyField(Site) ... but when I try to create the object: news = News_item(

Problem querying database

2009-04-15 Thread bax...@gretschpages.com
I'm hoping someone can help me get the info I'm trying to get. This is the structure: I have Categories Each Category has one or more subcategory Articles have a M2M relationship with subcategory so they can turn up in more than one category as needed. I'm trying to get one random

Generating USER documentation?

2009-04-10 Thread bax...@gretschpages.com
What I'm after is documentation for the admin users, similar to the generated documentation, only less technical. A simple how-to for people who just want to know how to do things in the admin, but don't care about views, models and template tags. Is there an easy way to create/generate such a

User registration issues

2009-04-09 Thread bax...@gretschpages.com
I have a random/intermittent user registration problem. I can't figure out any pattern to it, but it appears to have started when I went to Django 1.0. Some users (again, it appears random and intermittent) are not getting a site user profile created. The auth.user profile is created, and the

update facebook status

2009-03-19 Thread bax...@gretschpages.com
Now that I've got my twitter integration sorted out, I'm trying to figure out how to update the facebook status, too. Twitter was relatively easy. Can someone point me to the how-to on updating facebook? The catch: it's the status on a product page, not a profile.

Signals, sites and instances

2009-03-19 Thread bax...@gretschpages.com
Follow up to my earlier question (http://groups.google.com/group/ django-users/browse_thread/thread/8f41540343634178/c05242e6d3b07d62) As I mentioned there, I'm trying to use a snippet to send a twitter update when a news item is created. The news items have a M2M relationship with sites-- news

Simple sites framework question

2009-03-16 Thread bax...@gretschpages.com
In my model, I've got sites = models.ManyToManyField(Site) In a signal, I want to check which site(s) that model has been assigned to, not which site their currently on. I need something like if instance.sites.id == 1: do stuff Of course, that doesn't work. How do I do this?

dynamic select boxes in forms with jquery

2009-03-13 Thread bax...@gretschpages.com
I know I've seen this before, so I'm hoping someone can help me find it again. I need to dynamically filter a select box in the admin, preferably with jquery (just because I already have it there and it's available) What I have is a car makes and models with a many to many relationship. (Some

Need help with combined feed

2009-03-09 Thread bax...@gretschpages.com
I'm trying to build a combined feed, and not having much luck. Here's what I have: class CombinedFeed(Feed): title = site.name +" combined feed" link = "/" description = "Latest updates from all "+site.name +" feeds" description_template = 'feeds/combined.html' def

Big Django site gone

2009-02-27 Thread bax...@gretschpages.com
No question, just a quick RIP for the Rocky Mountain News (http:// www.rockymountainnews.com/) Its a shame they couldn't keep it going. Their online presence (built on Django) is/was really nice. --~--~-~--~~~---~--~~ You received this message because you are

Problem tapping into Amazon web service

2009-02-26 Thread bax...@gretschpages.com
This code used to work, but appears to have stopped working at some point. I suspect it's either a unicode or escaping thing. I'm trying to use Amazon web services and return books: amazonfile = urllib.urlopen("http://webservices.amazon.com/onca/xml?

Re: Years

2009-02-13 Thread bax...@gretschpages.com
Perfect. 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 email to

Years

2009-02-13 Thread bax...@gretschpages.com
I need a YearField of sorts, where users can select a year (for their car), and I'm trying to figure out how best to implement it. I'd need roughly 1901 to present. I know I could just put them all in choices, but that seems messy and a pain to maintain (even if only once a year). Better ways?

Re: sites framework

2009-02-12 Thread bax...@gretschpages.com
> so in admin interface i have 3 apps eventsapp, expoapp, and foodapp. > when i write in terminal > :~/DJANGOPRJ/myproject/exposite$/ python manage.py shell>>from > myproject.eventsapp.models import * > > Traceback (most recent call last): >   File "", line 1, in ? > ImportError: No module named

Re: JavaScript Slider in Django Form

2009-01-23 Thread bax...@gretschpages.com
> How do I create a custom widget and what do I have to do to use my > custom widget in a form? It's possible I don't understand what you're trying to do, but I think you just need to call the hook into the id of the textfield. If multiple, set a class attribute in your form setup and hook onto

Re: "connect a function to the signal"

2009-01-23 Thread bax...@gretschpages.com
> I think what you want to do is: > > user_activated.connect(create_site_user) Thanks. But where, after the send(), or in the signal? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

"connect a function to the signal"

2009-01-23 Thread bax...@gretschpages.com
I'm trying to update from my very old version of django-registration to .7 in hopes of sorting out some registration issues I'm having. In my old version, I use the profile_callback to create my site user profile: from site_users.views import create_site_user ... url(r'^$',

update_object acting strangely

2009-01-22 Thread bax...@gretschpages.com
I think this just started, and may be related to updating to 1.0.2. Lately I've noticed update_object not updating properly. In particular, I've noticed boolean fields changing. For example, I'll have an "approved" field that's True, but when the user update the info, "approved" is changing to

Re: Suspicious Operation/ filestorage problem

2009-01-19 Thread bax...@gretschpages.com
On Jan 19, 1:42 pm, Andy Mckay wrote: > If i remember, it's because there's a / at the beginning, you probably   > want a relative path. OK, where's it picking up the / then? I've got: if self.avatar is None: self.avatar = "img/avatars/default.gif" No / there.

Suspicious Operation/ filestorage problem

2009-01-19 Thread bax...@gretschpages.com
My SiteUser model allows an avatar upload. If there's not one, it assigns a default image on save: def save(self, *args, **kwargs): ... if self.avatar is None: self.avatar = "img/avatars/default.gif" super(SiteUser, self).save(*args, **kwargs) Pretty straightforward.

  1   2   >