Re: How to get the list of logged in users?

2008-11-11 Thread Josh
Hi tamonash.. Not sure if you're still in need of a solution. I just saw some traffic to my project from this thread... Anyway, django-tracking does in fact allow you to show who's logged in. I use it on my own site to show which registered users are logged in. On Sep 17, 6:55 am, tamonash <[E

Re: django google-app-engine appengine backend

2008-09-27 Thread Josh
Hi there, I seem to be having the same problem you are. Any chance you found a solution? Cheers, Josh On Sep 19, 7:51 am, bfrederi <[EMAIL PROTECTED]> wrote: > @Adam Fast > I think you are right. I'm not at home, so I can't check for sure, but > I'm almost posit

Drag and drop re-ordering in change_list causing 'too many files open' error.

2009-07-02 Thread Josh
I've used jQuery to set up drag and drop re-ordering on the change_list for a model. Basically I created a custom change_list template for the model to add a submit button to the object_tools list and to add some javascript includes. I also created my own modified version of the django.contrib.adm

Re: Drag and drop re-ordering in change_list causing 'too many files open' error.

2009-07-02 Thread Josh
The gist has been updated to have all the involved files rather than just the jQuery code and the view. http://gist.github.com/139475 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Thumbnail On Save

2009-06-18 Thread Josh
n code is called in case there was a filesystem sync problem... Really strange. Thanks! - Josh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

errors serving text files using templates and static files

2010-07-26 Thread Josh
Good morning, I've been writing a Django app to create a dynamic net boot program to boot configs created by users from a web interface using a tool called gPXE. I've exhausted my troubleshooting methods and can't seem to figure out why gPXE can boot from a static file served directly from apache

Flatpages incorrect 302 to 404

2010-09-24 Thread Josh
I have a django project, its a satchmo store. I have noticed that when the flatpages middleware is in my settings.py 404s seem to be handled incorrectly. i.e. if a page really does not exist the server first sends a 302 response, then a 404. When google crawls it only sees the 302 so it thinks t

Re: Flatpages incorrect 302 to 404

2010-09-27 Thread Josh
bump. Does anyone have any ideas? On Sep 24, 3:56 pm, Josh wrote: > I have a django project, its a satchmo store.  I have noticed that > when the flatpages middleware is in my settings.py 404s seem to be > handled incorrectly.  i.e. if a page really does not exist the server > first

Flatpages soft 404

2010-09-27 Thread Josh
bump. Does anyone have any ideas? On Sep 24, 3:56 pm, Josh wrote: > I have a django project, its a satchmo store.  I have noticed that > when the flatpages middleware is in my settings.py 404s seem to be > handled incorrectly.  i.e. if a page really does not exist the server > first

Re: Flatpages incorrect 302 to 404

2010-09-27 Thread Josh
sts/episode/5/mapping-flatpage-urls/ -Josh On Sep 27, 10:27 am, Piotr Kilczuk wrote: > 2010/9/27 Josh : > > > bump.  Does anyone have any ideas? > > Trailing slash issue? > > Just look into the middleware and see when the response code is modified. > > Regards, > Pi

Re: Show DEBUG page to specific user group?

2010-11-12 Thread Josh
I didnt look at the blog post but you could try something like this in your settings: def debug_for_superuser(request): if request.user.is_superuser: return True else: return False DEBUG = debug_for_superuser I haven't actually tried this but I use something like that to

Re: Show DEBUG page to specific user group?

2010-11-15 Thread Josh
Hmm, I didnt know that, I'm still fairly new to python and django. So if I understand this right DEBUG is basically static once the server starts and will only change with a restart of the server (whatever environment that happens to be in). Thanks for the help! -Josh On Nov 15, 4:32 am

Re: Specifying custom upload to with FileField

2008-02-07 Thread josh
I have this question as well but from what I've seen the only customizing available is to use strftime formatting. josh On Feb 6, 2008, at 11:16 AM, shabda wrote: > > I have a model like > > class ProjectFile(models.Model): >project = models.ForeignKe

Filter ManyToMany options by Site in adming interface

2008-03-25 Thread Josh
I'm working on a multi-site project, so most models have a site field. One particular model, locations, has a site field as well as a many-to- many relationship with the neighborhood model which also has a site field. What I want is that when editing a location object the neighborhoods that show u

Django ad server?

2008-03-25 Thread Josh
Are there any Django-based ad server solutions out there? If not, should there be any problems with using OpenX (formerly OpenAds) with a Django site? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Django ad server?

2008-03-26 Thread Josh
HTML. You > just need to a) set up OpenX on a subdomain of your site (like > ads.blah.com) and b) design your templates to have the correct OpenX > javascript includes to serve the ads. > > On Mar 25, 1:59 pm, Josh <[EMAIL PROTECTED]> wrote: > > > Are there any Dja

Re: 'classes': 'collapse' not providing 'click to expand' link

2008-03-26 Thread Josh
As far as I can tell, the javascript is importing properly, and the URL that it's including from in the HTML output works when I put it straight into my browser. Here's the full definition of a model including the fieldset definitions. When I view it in the admin interface the 'Details' field is c

Re: 'classes': 'collapse' not providing 'click to expand' link

2008-03-26 Thread Josh
own and fix the problem... On Mar 26, 9:37 am, Josh <[EMAIL PROTECTED]> wrote: > As far as I can tell, the javascript is importing properly, and the > URL that it's including from in the HTML output works when I put it > straight into my browser. Here's the full defini

Re: 'classes': 'collapse' not providing 'click to expand' link

2008-03-26 Thread Josh
ented those admin URLs one at a time to figure out which was causing the problem, and it never reappeared. With the urls.py file back exactly the way it had been when the problem was present, the problem is now gone. Weird. On Mar 26, 11:56 am, Josh <[EMAIL PROTECTED]> wrote: > Got

Re: Filter ManyToMany options by Site in adming interface

2008-03-27 Thread Josh
h the multiple site one object idea. > > Hope that helps, > > Michael > > On Tue, Mar 25, 2008 at 1:47 PM, Josh <[EMAIL PROTECTED]> wrote: > > >  I'm working on a multi-site project, so most models have a site field. > >  One particular model, lo

Re: Filter ManyToMany options by Site in adming interface

2008-03-27 Thread Josh
look in settings.SITE_ID > > This is what flatpages does to return the flatpage object: f = > get_object_or_404(FlatPage, url__exact=url, > sites__id__exact=settings.SITE_ID) > > Hope that helps, > > Michael > > On Thu, Mar 27, 2008 at 9:58 AM, Josh <[EMAIL PROTECTED]> wrote:

Problems with generic.GenericForeignKey()

2008-03-28 Thread Josh
I've defined a model using a generic foreign key which is basically exactly like the tagging example provided in the Django docs: from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class WordedItem(models.Model)

Re: sorl-thumbnail: Permission Denied

2008-03-28 Thread Josh
I figured it out. The problem was that I was using get_image_url instead of just image, so it was attempting to write to media_root/ media_root/path/to/image instead of media_root/path/to/image. On Mar 19, 1:04 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote: > I'm trying to set up sor

Django admin interface: problem with '../../../' in URLs and post_url.

2008-03-28 Thread Josh
I've made some changes to my admin interface to create a new set of pages for editing some of my models. Instead of just /admin/app/model/ id, I now also have /admin/dashboard/id which shows summary of the data for that object as well as giving some options for modifying some of it's ForeignKey/Ma

Re: Problems with generic.GenericForeignKey()

2008-03-28 Thread Josh
I've determined that the problem is with the get(). If I just create the objects without first checking to see if it already exists, there's no problem. So I guess my question is now this: what's the best way to avoid duplicates here? --~--~-~--~~~---~--~~ You rece

Generic relation issues, can't delete objects

2008-04-02 Thread Josh
I've created a sort of modified tagging system for the site I'm working on. Because of the nature of the 'tags' I had to diverge a little form the standard and my models look like this: class Word(models.Model): word = models.CharField(max_length=30) slug = models.SlugField(prepop

Very strange TagField() behavior.

2008-04-02 Thread Josh
I've installed the development version of django-tagging, and have put a TagField() in my model that I want to be tagged so that I can edit the tags from the admin interface. However I am getting some very strange behavior. I can use the TagField() in the admin interface to add and remove tags ju

Re: Generic relation issues, can't delete objects

2008-04-02 Thread Josh
x27;).replace('<', '<').replace('>', '>').replace('"', '"').replace("'", ''')) File "/home/myproject/lib/python2.5/django/utils/encoding.py" in force_unicode 51.

Apply custom class to field in admin interface (oldforms)?

2008-04-04 Thread Josh
Is there any easy way to apply a custom class to a particular field of a model in the oldforms admin? Specifically, I want to mimic the behavior of a newforms TimeField with a regular Charfield by just using the built-in javascript time widget. As far as I can tell, all this really requires is fo

Complex Django Hosting

2008-04-25 Thread Josh
I'm working on what will end up being a large, high-traffic, multi- site project. Currently we're just using a basic Webfaction account for hosting during development and testing, but I'm trying to figure out what would be the best approach to hosting moving forward. Ideally, we would have multip

Re: Complex Django Hosting

2008-04-25 Thread Josh
get to 25k / mo. uniques, you can host on Joyent for free (in > exchange.. you give them your user's info). Sure, its a bit shady.. but if > you need decent hosting on the cheap... >  -justin > > > > On Fri, Apr 25, 2008 at 11:44 AM, Josh <[EMAIL PROTECTED]> wrote:

Re: Complex Django Hosting

2008-04-25 Thread Josh
MAIL PROTECTED]> wrote: > On Apr 25, 2008, at 18:44 , Josh wrote: > > > > > Does anyone have any recommendation for the best approach to hosting > > here, and what hosting company might be a good fit? I know that > > MediaTemple can certainly accommodate our needs,

Re: Generic relation issues, can't delete objects

2008-04-25 Thread Josh
That was it! Thanks. :) On Apr 3, 8:09 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 2, 2008 at 6:00 PM, Josh <[EMAIL PROTECTED]> wrote: > > > Sorry, here's the full traceback: > > > Environment: > > > Request Method: GET &g

Re: Complex Django Hosting

2008-04-27 Thread Josh
So it sounds like the best three options are (in no particular order): 1. Remain with Webfaction. 2. Move to Slicehost. 3. Move to a colocated server. Obviously this is something that will require discussion with my client, but I'm perfectly capable of managing a colocated server, so the main iss

Updated to latest trunk root page (/) stopped working

2008-05-16 Thread Josh
So I ran an svn up on my Django install because I'm running into some issues that QuerysetRefactor should have fixed, and after doing so the root page of my site stopped working. Everything else appears to be working fine, just not /. In my browser it gives me a 502 Proxy Error (which is odd, bec

Re: Problems with generic.GenericForeignKey()

2008-05-17 Thread Josh
Ah, I see. Thanks, I'll give that a shot. On Mar 28, 6:52 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Mar 28, 9:16 pm, Josh <[EMAIL PROTECTED]> wrote: > > > I've determined that the problem is with the get(). If I just create > > the objects wit

Middleware problem

2008-05-28 Thread Josh
I created a custom middleware for logging requests based on this blog post: http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html It's mostly working fine except for one thing. It causes problems when a URL without a trailing / is requested. In that case it gives me the following e

Middleware problem

2008-05-28 Thread Josh
I created a custom middleware for logging requests based on this blog post: http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html It's mostly working fine except for one thing. It causes problems when a URL without a trailing / is requested. In that case it gives me the following e

Customizing newforms-admin

2008-06-10 Thread Josh
With newforms-admin, is there currently anyway of duplicating the functionality of 'manage.py adminindex '? It appears that currently this still is looking for the old admin stuff as the result I get is this: {% if perms.myapp %} Myapp {% endif %} I'm guessing that this is basically something t

Re: Middleware problem

2008-06-10 Thread Josh
quest, response): try: self.activity.set_request_time() except: pass return response and that took care of it. On May 28, 7:19 pm, Josh <[EMAIL PROTECTED]> wrote: > I created a custom middleware for logging requests based on this blog > post:http

newforms-admin delete uploaded file/image

2008-07-11 Thread Josh
With newforms-admin is there any way to add a 'delete' checkbox or something to a FileField/ImageField? Basically, we'd like the ability to remove an image that's been uploaded without having to replace it with something else. --~--~-~--~~~---~--~~ You received this

Re: Customizing newforms-admin

2008-07-11 Thread Josh
Anybody? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For mor

Re: Multiple Database Support

2007-11-07 Thread Josh
Hi! Has there been any more progress toward getting the multiple database branch merged into trunk? I, among many others, would really like to be able to use the newer features of django and access multiple databases from the same project... Thanks! Josh On Oct 17, 12:03 am, koenb <[EM

Re: Multiple Database Support

2007-11-07 Thread Josh
I thought this *was* the last one that was asked :) On Nov 7, 4:01 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Nov 8, 2007 7:00 AM, Josh <[EMAIL PROTECTED]> wrote: > > > > > Hi! > > > Has there been any more progress toward getting

Re: The Django admin interface optimized for iPhone/iPod touch

2007-11-08 Thread Josh
What a great idea! I don't (currently) have any devices that would be able to use this, but I'll keep it in mind. The screenshots look great too! On Nov 8, 6:55 am, "Jannis Leidel" <[EMAIL PROTECTED]> wrote: > Hi Users, > > I'm very glad to introduce to you django-mobileadmin[1], something > wh

ImportError: No module named mysql.base

2007-11-12 Thread Josh
Hi everyone! I'm trying to get one of our servers set up with Django, and everything seems to work fine up until I try to syncdb. This is the output I get: manage.py syncdb Traceback (most recent call last): File "manage.py", line 11, in ? execute_manager(settings) File "/usr/lib/python

Re: ImportError: No module named mysql.base

2007-11-13 Thread Josh
I remember it being :) Thanks again! Josh On Nov 13, 5:29 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > That ticket you found suggests the real problem is not a missing mysqldb, > but a too-old version. I know nothing of CentOS or yum -- is it possible > there is a more

block.super returning html character codes - NOT html

2007-11-14 Thread Josh
block.super was working great before i did an svn up this morning.. All of my block.super template tags are returning the HTML character codes instead of the actual HTML - so instead of getting proper HTML links, i get the text of the HTML link. Has anyone come across this? New bug? - Josh

Re: block.super returning html character codes - NOT html

2007-11-14 Thread Josh
/docs/template.txt. I guess if I'm going to be using django-latest, I'll need to stay updated on the changes. =) - Josh On Nov 14, 10:34 am, Josh <[EMAIL PROTECTED]> wrote: > block.super was working great before i did an svn up this morning.. > > All of my block.super t

Re: block.super returning html character codes - NOT html

2007-11-14 Thread Josh
{% block breadcrumbs %} Home {% endblock %} {% endautoescape %} I guess a "DRY-alert" didn't go off in my head when I thought of adding safe to all those block.super's. - Josh --~--~-~--~~~---~--~~ You received this message because you a

Re: Automatically create a UserProfile object when a User is created

2007-12-13 Thread Josh
Fantastic!! Thanks for this information. It's exactly what I've been looking for! On Dec 8, 6:39 am, Julien <[EMAIL PROTECTED]> wrote: > Oh, just a precision for those who are interested. I put Alex's code > in the __init__.py file of my profile app. > > On Dec 9, 12:37 am, Julien <[EMAIL PROTE

Re: Exercise: How would you design these models

2006-10-21 Thread Josh
> So then I changed how I did it to this model, to try and enforce the > "a profile can have many images and a picture can only have 1 > UserProfile" restraint above: > > ---[ myproj.profile.models ]--- > from myproj.myapp.models import ImageObject > > class UserProfile(models.Model): > profile_

Having problems with inspectdb / introspection

2006-05-17 Thread josh
,`registrant_num`), KEY `seminar_id_ind` (`seminar_id`), CONSTRAINT `registrant_ibfk_1` FOREIGN KEY (`seminar_id`) REFERENCES `seminar` (`seminar_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 This is running Django pulled from svn this morning, python 2.4.2, My

Re: Having problems with inspectdb / introspection

2006-05-17 Thread josh
Great idea - forgot about that MySQL "gotcha" - but I checked and none of the dates in the TIMESTAMP column are invalid - they are all starting with 2005 or 2006. That is the only field in a date/time format so I'm still not sure what's going on. Thanks

Questions before switching from drupal to django

2011-07-09 Thread Josh
I want to switch my sites from Drupal to Django. I already read a lot about Django and made a few sample apps. I think Django is better suited to my needs, but I do have a few questions that I couldn't find an answer for. So I thought of a few solutions that might do the trick. I'm not really a web

Re: Questions before switching from drupal to django

2011-07-09 Thread Josh
On 9 jul, 15:15, "Cal Leeming [Simplicity Media Ltd]" wrote: > On Sat, Jul 9, 2011 at 9:19 AM, Josh wrote: > > I want to switch my sites from Drupal to Django. I already read a lot > > about Django and made a few sample apps. I think Django is better > > suited t

Error with converting month_format in django.views.generic.date_based.object_detail

2011-07-25 Thread Josh
I'm new at using Django and am learning it now from several books and internet. I run into problems with changing the month_format to 2 digits ( %m = 06 ) instead of 3 chars (%b = jun) I checked the models.py def get_absolute_url(self): return ('my_entry_detail', (), { 'year': self.my

Re: Error with converting month_format in django.views.generic.date_based.object_detail

2011-07-25 Thread Josh
The error obviously is: Page not found (404) I'm using Django 1.3 -- 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+uns

Re: Is there a way to insert data from a csv file into my database?

2011-07-25 Thread Josh
pgloader is for Postgres I think. If it has to be to a single table it shouldn't be that difficult in Python: 1) get sqlalchemy and declare the django-table. You can use SQLAutocode for this. 2) import and parse the csv-file ( import csv ) 3) use the parsed csv as input for sqlalchemy and add th

Re: Error with converting month_format in django.views.generic.date_based.object_detail

2011-07-25 Thread Josh
Found it or at least found a workaround. Added month_format to the input dict. A bit strange though? my_info_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', 'month_format': '%m', } -- You received this message because you are subscribed to the Google Groups "Djan

how do I update only specific fields in model

2011-07-27 Thread Josh
I want to update only specific fields in a model and keep the old values in other fields. I've been working on this for a few days but I run out of possible solutions.As far as I can see from the documentation and internet there isn't an easy solution to do this. I'm new at Django, so I might

Re: how do I update only specific fields in model

2011-07-27 Thread Josh
You already gave the answer. I just tried your solution and it worked. I was trying a wrong approach and was making it much more complex than it really is. My approach caused existing values to be overwritten by Null-values and only inserting the new values. Thanks for answering a newbie quest

Re: how do I update only specific fields in model

2011-07-27 Thread Josh
Thanks for the replys. The more I learn about Django, the more I start to apreciate it. I still have a lot to learn, but compared with Drupal I already feel more comfortable about Django because there is much more control. This is my second Django week, but sometimes I seem to get stuck at sim

onmouseover in JavaScript not working

2011-08-05 Thread Josh
I'm new at Django and am experimenting with JavaScript in templates. I've put JavaScript from Google Charts in a block and it is displaying the chart properly. The onmouseover should display the details of elements in the chart, but that isn't working in Django. In a plain html-page it is disp

Re: onmouseover in JavaScript not working

2011-08-05 Thread Josh
> > >Basically, unless you inserted your js code (or any other markup) > >using a {{ var }} or {% tag %}, there is NO "restrictions on these > >blocks with javascript". > > >Did you at least inspected the *rendered* template to see how what > >your HTML and js looks like ? > Thanks for point

Seperate Image Model

2011-08-07 Thread Josh
I'm only working a few weeks with Django and I want some advice about handling images. Conceptual I have to remind myself that Django is pure python, so that makes me complicate things sometimes. Also I still have some conceptual difficulties with templates and template_tags. Also I'm not real

Re: Seperate Image Model

2011-08-07 Thread Josh
The images and creation of thumbnails aren't the problem. I'll look into the 1th and 3rd. I've looked at a lot of image apps that might give a solution to my problem, but none fitted my requirements. I'm not sure how to get the images in the content. There might be no image at all, but also on

Re: Seperate Image Model

2011-08-07 Thread Josh
Maybe I should add I don't want to manually assign the images, but script this as much as possible. It involves 1000s of images. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com

How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Josh
I'm trying to create custom templatetags now, while learning Django. When an entry is displayed I want to list other entries with the same categories below the entry. I also wrote a templatetag (following the Practical Django Projects from James Bennet) I'm having problems with using a variable

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Josh
I think the problem is in the render part. I've modified the __init__ of the Node to self.categories = template.Variable(categories) Any advice is welcome. All I want to do is a query on the Entries model that have corresponding categories and return it to the template. -- You received thi

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Josh
>{% get_related_entries weblog.entry 5 from object.categories as related_entries %} I found that out already. Now I'm pretty sure the problem is in the rendering. As far as I can tell ( I don't know how to test template tags in a shell ) I get a list of the names of the categories back.

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Josh
>It sounds like you're not resolving the variable at all in your render method -- > >When you construct the template node, you work with Variable objects, which represent the >context variable as it exists in the template source (eg, html). > >At the point where you actually render your output,

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Josh
I've marked a few things that are important I think, because it is getting a bit bulky >These are my assumptions about the bits of code you've posted: > > > > > >models.py > > >categories = models.ManyToManyField('Category', blank=True, null=True, >> default = None) > > > > > >*Assumption*: ca

Re: How can I use {{variable}} in custom templatetag?

2011-08-08 Thread Josh
> > > >If you need to push back a value in a variable call related_entries, then >> you will want to set a value in the context dictionary: > > > > > >context[related_entries] = > > Correction on earlier mail when trying some other things. I do this in the def render. This looks like: class R

Re: How can I use {{variable}} in custom templatetag?

2011-08-09 Thread Josh
{% get_related_entries weblog.entry 5 from object.categories as related_entries %} {% for entry in related_entries %} {{ entry.title }} {% endfor %} class RelatedEntryNode(template.Node): def __init__(self, model, number, categories, varname): self.model = mode

How do I apply a filter in a custom template tag?

2011-08-13 Thread Josh
I'm trying to retrieve a m2m relation from a blog entry. It should give a list of entries with the same categories. Below works when I work in the shell. from content.models import Entry qs = Entry.objects.all() obj = qs[0] related = Entry.objects.filter(categories=obj.categories.all()) The ob

Re: How do I apply a filter in a custom template tag?

2011-08-14 Thread Josh
Thanks, I've added a function to the Enty models. It doesn't in some cases I get good returns now. But not always. Content is the name of the app. There is no PK-relation on the Category class, but only the below on the Entry class. class Entry(models.Model): categories = models.ManyToManyF

Re: errors serving text files using templates and static files

2010-07-26 Thread Josh Boon
) menu_file.write(t.render(c)) return HttpResponseRedirect('/netboot/dynamicmenu.cfg') It works but it's a strange workaround. Serving it directly causes gPXE to break. Any thoughts? On Mon, Jul 26, 2010 at 18:04, Dennis Kaarsemaker wrote: > On ma, 2010-07-26 a

Re: How to make the login forms available to the entire site?

2010-02-22 Thread Josh Kersey
I've always done it as rebus_ explained. Put the login options in the base template wrapping it in {% if user.is_authenticated %} to display a different mechanism for users that are already logged-in. That form action is set to the login URL and and the login view handles the login processing, er

Re: weird CSS behaviour

2010-02-22 Thread Josh Kersey
It would be nice to see your templates. Post the django template code for base, index, and register somewhere like dpaste.com and then provide us the link. Kind of hard to make a guess at this point but seeing the code will help. - Josh cabedge.com On Feb 22, 8:55 am, Maciek Strzelecki wrote

Re: stackedinline admin form-set collapse

2010-03-01 Thread Josh Kersey
I'm using Django 1.1.1 and have accomplished this using jQuery. Here's a simplified version of what I write to override the admin change_form template for the targeted app. I put this at //templates/admin///change_form.html: {% extends "admin/change_form.html" %} {% block extrahead %}{{ block.su

Apache hang-up after booting

2010-03-31 Thread Josh B
Hi everybody, I'm using django (integrated in an application, omero) as a production server with mod_python (v3.3.1-147.35) and apache (v2.2.10-2.8.1). Unfortunately after rebooting the server apache seems to hang-up. When opening the website I just see the progress-indicator gif. When restarting

Re: Django Development Position

2007-08-29 Thread Josh Trutwin
that gives full > details. It helps the SNR and also avoids stepping on toes. Wonder if django could do the same thing PostgreSQL and a few other OSS tools do and setup a separate django-jobs list? Josh --~--~-~--~~~---~--~~ You received this message because you are

Django on MediaTemple (dv) howto?

2008-01-03 Thread Josh Ourisman
Is there any good howto on setting up Django on a MediaTemple (dv) server? Up until now I've been running various Django-powered sites from Dreamhost. Now I'm migrating all my hosting over to MediaTemple, but I don't seem to be able to get Django running properly. I'm stuck at the point where you

Re: Django on MediaTemple (dv) howto?

2008-01-03 Thread Josh Ourisman
my project, is that the case? What should the path be relative to? On Jan 3, 4:05 pm, Katie Lohrenz <[EMAIL PROTECTED]> wrote: > Hi, Josh. I'm on a (dv) server, too. > > You're right that it's a vhost.conf file that you need to edit. If you > edit the httpd.conf or h

Running a Django project off my iDisk

2008-01-04 Thread Josh Ourisman
Ok, this is probably a bit odd. I'm working in OS X (obviously). I generally keep my work files stored on my iDisk because this makes it incredibly easy to 1) keep everything backed up, and 2) keep all my files up to date on multiple computers. I use the iDisk sync feature so that everything is s

Re: Running a Django project off my iDisk

2008-01-04 Thread Josh Ourisman
Nevermind, it was because of some funky characters in a directory name On Jan 4, 6:17 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote: > Ok, this is probably a bit odd. > > I'm working in OS X (obviously). I generally keep my work files stored > on my iDisk because this m

Re: Django on MediaTemple (dv) howto?

2008-01-04 Thread Josh Ourisman
> > PythonPath "['/path/to/django'] + sys.path" > > /path/to/django is the (hypothetical) folder where all my django > projects live. So inside it is a folder called myproject which has > settings.py in it. > > (And if you have more questions and would pr

Re: Django on MediaTemple (dv) howto?

2008-01-04 Thread Josh Ourisman
That is to say, the home directory of the user 'django' is '/home/ django'... On Jan 5, 1:09 am, Josh Ourisman <[EMAIL PROTECTED]> wrote: > Ok, I'm still having problems. :( > > As near as I can tell Django is installed properly, and my project is

Re: Django on MediaTemple (dv) howto?

2008-01-05 Thread Josh Ourisman
Ok, Django is installed and my vhosts.conf is successfully sending requests to Django. But now when I try to go to my site I get this error: Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/ap

MySQLdb issues on MediaTemple (dv) server

2008-01-07 Thread Josh Ourisman
Looks like I'm having some problems with my MySQLdb install. To install, I downloaded the tarball, &c.,and ran the installer script, but it doesn't actually seem to work. From the errors I'm getting it seems to be an issue with the way it actually installed. Here's what I get if I go into the Pyth

Re: Django on MediaTemple (dv) howto?

2008-01-07 Thread Josh Ourisman
It's probably worth noting that when I run the site off the development server it has no problems whatsoever. It seem to me that this mean the problem _must_ be something to do with the vhosts.conf file, yes? On Jan 5, 7:01 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote: > Ok, Djang

Problem with two applications importing models from each other?

2008-01-10 Thread Josh Ourisman
I have two models, modelA and modelB. ModelA needs classB1 and classB2 from modelB, while modelB needs classA1 from classA. So, in the models.py file for modelA I have 'from modelB.models import classB1, classB2'. This worked just fine until I added to the models.py file for modelB 'from modelA.m

Re: Problem with two applications importing models from each other?

2008-01-10 Thread Josh Ourisman
te: > Check this > out:http://www.python.org/doc/faq/programming/#what-are-the-best-practice... > > On Jan 11, 6:54 am, Josh Ourisman <[EMAIL PROTECTED]> wrote: > > > I have two models, modelA and modelB. ModelA needs classB1 and classB2 > > from modelB, while modelB

Re: Problem with two applications importing models from each other?

2008-01-10 Thread Josh Ourisman
#x27; then referencing the > classes as 'models_A.Class1', does that work? > > On Jan 11, 8:27 am, Josh Ourisman <[EMAIL PROTECTED]> wrote: > > > Hmm. That implies that I should be using 'import modelA.models.Class1' > > rather than 'f

Re: Problem with two applications importing models from each other?

2008-01-10 Thread Josh Ourisman
: > Hi, > > On Jan 10, 12:54 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote: > > > I have two models, modelA and modelB. ModelA needs classB1 and classB2 > > from modelB, while modelB needs classA1 from classA. > > Can you explain what you mean by "needs"

Re: Problem with two applications importing models from each other?

2008-01-10 Thread Josh Ourisman
Ok, that should help. Thanks very much. On Jan 10, 4:58 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Jan 10, 4:00 pm, Josh Ourisman <[EMAIL PROTECTED]> wrote: > > > It's for the purpose of defining foreign keys. Basically, ClassA1 > > needs to be able

Advanced admin interface customization question

2008-03-05 Thread Josh Ourisman
There are two ways in which I want to customize the admin interface for a project I'm working on. As far as I can tell, these sorts of customizations aren't built in, but before I start trying to write them myself I just want to make sure I'm not reinventing the wheel here. So, the two things I wa

Re: Advanced admin interface customization question

2008-03-05 Thread Josh Ourisman
Actually, just thought of a third: 3. Basically the same as 2, but for the list view rather than the edit form. In other words, I want to be able to filter the list of locations by site as well as by neighborhood. Since the neighborhoods are associated with sites already it would be useful if whe

Re: Advanced admin interface customization question

2008-03-07 Thread Josh Ourisman
That's pretty much what I figured. Thanks. On Mar 6, 9:12 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Mar 6, 12:42 pm, David Reynolds <[EMAIL PROTECTED]> > wrote: > > > > > On 5 Mar 2008, at 6:17 pm, Josh Ourisman wrote: > > &

  1   2   >