compare old and new model field value

2008-11-10 Thread Tim
Basically, I want to be able to do something if the value of a field changes in a model. c = Category.objects.get(pk=1) c.name = "New Name" c.save() At any point (when the model is saved, when the value is set, etc.) is it possible to compare the old and new value? The first thought that popped

Dynamic Paths for File Uploads

2008-11-12 Thread Tim
's ID or something from a form? and (2) is the solution a custom storage class? If so, how would that be accomplished? When is the custom storage class instantiated? The docs aren't totally clear on the minutiae of how that works. Thanks for any help! - Tim --~--~-~--~~--

Re: Dynamic Paths for File Uploads

2008-11-12 Thread Tim
ad_to until I'm in the view. Ideally I'd like to do the following actions in views.py: - import the model - set the upload_to value - save the file What to do? - Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Form stays invalid even after required field has been set

2008-12-10 Thread Tim
Try adding this to your template: {% if form.non_field_errors %} {{form.non_field_errors.as_ul}}{% endif %} This will tell you form errors that aren't specific to a field. Tim On Dec 10, 8:26 am, Berco Beute <[EMAIL PROTECTED]> wrote: > Here's the code: > > http:/

Comments Framework and Authentication

2009-01-03 Thread Tim
page %} ...display a button to delete... {% endif %} - Tim --~--~-~--~~~---~--~~ 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 u

Re: Comments Framework and Authentication

2009-01-05 Thread Tim
Maybe a little brevity is in order - how do I grant temporary privileges to a user to delete a comment rather than keeping that power fully in the hands of a comments moderator? - Tim On Jan 3, 7:23 pm, Tim wrote: > Hi all - > > I am having a bit of difficulty with the Django

Re: Comments Framework and Authentication

2009-01-06 Thread Tim
user was the commenter, commentee or staff before forwarding to the view. On Jan 5, 11:01 am, Tim wrote: > Maybe a little brevity is in order - how do I grant temporary > privileges to a user to delete a comment rather than keeping that > power fully in the hands of a comments moderator?

User Messages

2009-01-14 Thread Tim
way to support Message persistence? Or should I just build my own model to support this kind of thing? Rolling my own seems fairly trivial since I'm already grabbing all the required information anyway. But if it's not necessary, I'm not gonna do it. - Tim --~--~-~--~~-

Definitive Captcha?

2009-01-17 Thread Tim
standard I just mean a good, solid implementation with reasonably wide community support. - Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Automatically Generating Non-Ajax Client-Side Form Validation

2009-01-24 Thread Tim
See http://code.google.com/p/django-ajax-forms/ I started this project to handle your use case. On Jan 24, 3:52 am, Chris wrote: > Is anyone aware of a simple way to automatically generate non-Ajax > form validation? I've seen some useful posts aboutAjax-form > validation (e.g.http://eikke.com/

Re: Equivalent of find_or_create_by in Django

2009-02-17 Thread Tim
It's just as easy in Django. Tag.objects.get_or_create(name="Summer") User.objects.get_or_create(name="Bob", age=40, admin=True) On Feb 17, 8:33 am, Anders wrote: > Hi. > > I do a lot of csv-import of data and have previously been using Ruby > on Rails. And the only thing I miss about Rails (

Re: Equivalent of find_or_create_by in Django

2009-02-17 Thread Tim
ield. On Feb 17, 9:08 am, Tim wrote: > It's just as easy in Django. > > Tag.objects.get_or_create(name="Summer") > > User.objects.get_or_create(name="Bob", age=40, admin=True) > > On Feb 17, 8:33 am, Anders wrote: > > > Hi. > > > I

Re: Making model methods available to templates

2009-02-17 Thread Tim
That's exactly how you would do it: {{ item.cost }} No extra code is required in your model. This of course requires that you have an item instance in your view and pass it to the template. For example... def view_example(request): item = Item.objects.get(pk=1) render_to_response('templ

Re: My app is missing!

2009-02-19 Thread Tim
The problem is that you are using the manage.py that is in the project_template directory, which will load the settings.py file from the project_template directory. You need to use the manage.py that is in the akonline directory, so that the proper settings.py file is loaded. --~--~-~--~-

Re: Query that grabs objects before and after object

2009-02-19 Thread Tim
Watch out for using the PK as the range like that. It's possible for that query to return 0 records. If show_id is 10, but records with a PK of 6-9 don't exist, and records with a PK of 11-14 don't exist, you won't have any records returned. Unless, of course, that's what you want. Then carry on

is_authenticated

2009-02-21 Thread Tim
eturn True for is_authenticated. Can anyone point me to the right way to do this? - Tim --~--~-~--~~~---~--~~ 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

Re: is_authenticated

2009-02-26 Thread Tim
er id and delete it on logout or expiration. I'll have to mess around a bit more. - Tim On Feb 21, 12:53 pm, Chris Czub wrote: > If you are using default Django sessions, they will be stored in the database. > > From the docs: > By default, Django stores sessions in your dat

Design Question - current item from a list of inventory

2009-03-03 Thread Tim
I have some models setup that allows users to have an inventory of items: books and movies. These are setup as inherited models. What I would like to do is allow a user to select a current book and a current movie, but only from "valid" options in that user's inventory. What I mean by valid is th

Re: Design Question - current item from a list of inventory

2009-03-03 Thread Tim
Easier to read models: http://pastebin.com/fa00be87 --~--~-~--~~~---~--~~ 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 gro

Re: Q search with foreign key

2009-03-03 Thread Tim
If you want to look up an Institution using the Project model, you should be able to use "institution__institution__icontains" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this grou

Django on Hostmonster shared hosting

2009-08-02 Thread Tim
Hello I have been trying to get Django working with Hostmonster.com shared webhosting with FCGI. >From what I gather from the HM forums, this is possible, but I've been hitting some issues. I've installed Python 2.6.2 in my home directory, and by all accounts, its working. I've downloaded Djan

Re: Choices of foreign keys?

2009-09-09 Thread Tim
For something like categories, I would go with a separate model and use ForeignKey. For that 1% chance when you have to add a new category, it will be a lot easier. Plus, what if requirements change in the future and you are adding/deleting categories more than you anticipated? Using choices with

Re: Proper way of importing projects modules

2009-09-10 Thread Tim
Well there are really two options I think. The first option is how you were doing it: from project_folder.app_name.models import SomeModel You also found out the problem with this method. If you rename project_folder, you have to change all the imports in your project. The other option is to a

Re: meta or QuerySet - I don't know

2009-09-10 Thread Tim
If you have this in your view... genre_list = Genre.objects.all() Then you can do this in your template. Basically for each genre, you are outputting the name, then looping through the list of credits where genre = the current genre. {% for genre in genre_list %} {{ genre.genre_type }}

Re: Why doesn't Django display template line number of errors?

2009-09-10 Thread Tim
It does show line numbers. Scroll down past the yellow section on the error page, and it will show you the line numbers, the line with the error, and the lines surrounding it. It should also say something like "In template /Users/tim/Sites/ website/templates/base.html, error at li

Re: Snow Leopard Issues?

2009-09-10 Thread Tim
I'm running django on Snow Leopard successfully. The only difference I ran into is that Snow Leopard has python 2.6, so I had to move all my site-packages from /Library/Python/2.5/site- packages to /Library/Python/2.6/site-packages After that it worked flawlessly. Or you could could symlink /us

Deployment

2009-05-06 Thread Tim
framework exists or fits the bill, maybe some resources about best practices? - Tim --~--~-~--~~~---~--~~ 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

Windows compatible?

2009-09-23 Thread Tim
Is there a Windows version of Django? --~--~-~--~~~---~--~~ 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 emai

Help: Custom ManyRelatedManager Behavior

2010-05-31 Thread Tim
lB table. Does anybody know how to set up custom behavior for a ManyRelatedManager? Basically, I would like to break links between User and ModelB by marking their ModelJ link as deleted, not actually deleting it from the database. Thank you, Tim -- You received this message because you are su

Cheetah templates

2010-11-23 Thread Tim
template_source` function.") The "tools/example.tmpl" is a subdirectory under my templates dir, which is configured in the settings TEMPLATE_DIRS and django has no problem finding other templates in those subdirectories. Can someone point out what I'm doing wrong here? thanks

Re: Get name from request.path

2009-12-30 Thread Tim
Perhaps the Sites framework might help achieve this in a more Django- like way. http://docs.djangoproject.com/en/1.1/ref/contrib/sites/ Not sure if you've looked into it before and ruled it out... not entirely sure what you're trying to accomplish. On Dec 28, 12:06 pm, kelvan.mailingl...@gmail.c

Namespace Security

2010-01-11 Thread Tim
There is an interesting requirement in a project I am working on. For lack of a better term, I'll call it Namespace Security. Basically, there are arbitrary namespaces that can be defined, and every object belongs to a namespace. Then, users only have access to certain namespaces. So if a user has

Re: Permissions (was: Namespace Security)

2010-01-11 Thread Tim
That looks like a pretty good starting point. It's a little different in that for my scenario, UserA and UserB would both be accessing django admin, but would get different results based on what Namespaces they have access to. Seems like it should be pretty easy to create a Model Admin that overwr

Re: Namespace Security

2010-01-12 Thread Tim
nge/delete object) but then adds the concept of a namespace. This could be considered a group, but I hesitate to use that term since it's already part of the django vocabulary and means something else. So lets say I create a namespace like so, and assign the user "tim" to it: http

Re: Namespace Security

2010-01-12 Thread Tim
color blue that only tim has access to (based on namespaces he has access to), you do have to add another method: tim = User.objects.get(username='tim') Cars.objects.filter(color='blue').user_can_access(tim) I'm not sure there's a way around that since otherwise t

Re: Table with 4 Milions of rows

2010-01-12 Thread Tim
As far as needing to split up the table into other tables, I'm not sure. Whats wrong with having 4 million records in one table? But if you're going to do it, take a look at the contenttypes framework and generic relations. It basically does what you're describing: http://docs.djangoproject.com/e

Re: Admin site pages + display or hiding instance owner field

2010-01-19 Thread Tim
I think it should be pretty easy to do. The get_form() method on ModelAdmin returns the form, and it knows about the current request. So you could modify that to remove the field after the form is generated. class MyModelAdmin(admin.ModelAdmin): def get_form(self, request, obj=None, **kwarg

Re: Can I wrap the "extends" tag in an "if" tag?

2010-01-20 Thread Tim
Could you do it in a block? In base.html {% block header %}{% endblock%} {% block content %}{% endblock %} Then in template.html: {% extends "base.html" %} {% block header %} {% if show_header %} Showing the header. {% endif %} {% endblock%} {% block content %} This will

Re: Model for debt, credit and balance

2010-02-18 Thread Tim
There might be a better way, but something like this should work. In your view, build a list... transaction_list = [] balance = 0 for tran in Transaction.objects.order_by('date'): balance = balance + tran.debit balance = balance - tran.credit transaction_list.append({'transaction':tra

Problem logging into admin site

2010-03-25 Thread Tim
Hi, I've just set up the admin site and when I try to log in, I get the following message: "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." Following extensive searching through this group, google, and just about every other re

Re: Problem logging into admin site

2010-03-25 Thread Tim
On Mar 25, 4:44 pm, Genghisu wrote: > Have you set SESSION_COOKIE_DOMAIN in settings.py?  Without that being > set correctly, you'll run into the problem you've described above.  In > your case, > > SESSION_COOKIE_DOMAIN = 'dev.mydomain.com'. > > http://docs.djangoproject.com/en/dev/ref/settings

Multiple form objects, only getting contents from last one

2008-01-22 Thread Tim
Shouldn't this be a separate variable instance per question? Suggestions are welcome. Thanks, Tim (code follows) """ Create the quiz form(s). """ from django import newforms as forms from django.http import Http404 from models import Question class Qu

Re: Multiple form objects, only getting contents from last one

2008-01-22 Thread Tim
Here's some example output. As you can see, the prefix-adding part of the code does what it'ssupposed to, in that each input line for the answers is uniquely marked. The problem I've got is the set of answers provided per question, as they should be different from one question to

Re: Multiple form objects, only getting contents from last one

2008-01-22 Thread Tim
Ugh... sorry about the formatting, BTW. I'll have to figure that out... --~--~-~--~~~---~--~~ 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 uns

Re: Multiple form objects, only getting contents from last one

2008-01-22 Thread Tim
ven't tried it on a newer version just yet. I suppose I'll have to give that a go, but was hoping to stick to stable releases if possible. Thanks! Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: Multiple form objects, only getting contents from last one

2008-01-23 Thread Tim
Well, it did in fact turn out to be a bug fixed in the SVN version (currently 7028), so everything is working great now. Thanks everyone for the help. Cheers, Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Dumping objects in templates

2008-02-08 Thread Tim
This might help: http://www.djangosnippets.org/snippets/306/ On Feb 8, 9:59 am, Gollum <[EMAIL PROTECTED]> wrote: > Thanks a lot! > I know how to add tags, so I guess I'll start working on my own debug > tools lib, but its still feels rather strange that I ought to do it. --~--~-~--~

Re: using tabs like in the admin forms

2008-03-10 Thread Tim
gobook.com/en/1.0/chapter17/ http://docs.jquery.com/UI/Tabs Tim On Mar 9, 8:01 am, "Jaime Casanova" <[EMAIL PROTECTED]> wrote: > Hi, > > There is any way to use tabs like the ones in the admin form in ordinary ones? > > -- > regards, > Jaime Casanova --~--~

Re: Django on plesk - Virtual Host

2008-04-11 Thread Tim
t the vhost.conf file in the directory, plesk doesn't automatically load it so by resaving your subdomain settings, you'll tell it to find the file. I hope this helps. Tim On Apr 11, 9:27 am, martyn <[EMAIL PROTECTED]> wrote: > Hi, > > I'm just copying my django pro

Re: Unique Users Per Site in 'users' & 'sites' Frameworks

2008-05-08 Thread Tim
login method to look at your username instead of the django version. http://code.google.com/p/django-profiles/ Tim On May 7, 8:59 pm, Brian <[EMAIL PROTECTED]> wrote: > I have a feeling we'll be rolling our own for this one. That's a lot > of time to invest though :-/ At le

Re: Display only some tables

2008-06-01 Thread Tim
a user with admin access to see the Auth and Sites modules, make sure the user isn't a superuser and then adjust their permissions so they don't have access to any of the permissions for those modules. Tim On May 31, 2:16 pm, Kless <[EMAIL PROTECTED]> wrote: > 1) I want to

Re: How to go about this Registration problem?

2008-06-01 Thread Tim
views. Tim On Jun 1, 9:23 am, Drozzy <[EMAIL PROTECTED]> wrote: > Example input form: > > Registration > > Workshop on building trains! > Please choose date: > > May 22, 2008 > April 12, 2009 > May 32, 2009 > > > Workshop for Programmers! > Pl

Re: Changing 'list_display' for User

2008-06-03 Thread Tim
I'm looking for something similar to this and I ran across this blog: http://www.amitu.com/blog/2007/july/django-extending-user-model/ Perhaps will spark your imagination. Tim On Jun 3, 12:04 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote: > Is there a programatic way to

Confused by ImportError: cannot import name models

2008-06-19 Thread Tim
Hi all - This is my first post to the group; I am a new Django user and am very enthusiastic about working with the framework. However, I am having trouble with one thing in particular. I am trying to set up Review Board, a Django project supporting code reviews, and am having problems with the s

Accessing Components of a MultipleChoiceField

2008-07-11 Thread Tim
I would like some finer control over the display of a MultipleChoiceField, but I'm not sure how to get to the individual components (in my case, checkboxes). For example, if I define the field in the form like so: tags = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=tag_l

Re: Accessing Components of a MultipleChoiceField

2008-07-14 Thread Tim
Thanks Malcolm - I will give this a shot - and if I understand J's self-described hack this is similar to what he is doing. If I end up successful, I'll post here. - Tim On Jul 11, 10:19 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-07-11 at 14:57 -070

Re: Getting image field in a template

2007-10-24 Thread Tim
Try Tim On Oct 24, 9:37 am, Steve Potter <[EMAIL PROTECTED]> wrote: > On Oct 24, 1:35 am, Page <[EMAIL PROTECTED]> wrote: > > > > > I'm new to Django and Python but trying to catch on. I have an image > > model for a portfolio page. I also have a mo

Re: Getting image field in a template

2007-10-24 Thread Tim
Your issue is mostly with learning Django. For example the get_IMAGEFIELD_url is a feature of Django. More Python will help but I'd say you'd be better off figuring out more about Django first. Also, don't be afraid to search around in the Django code. Tim On Oct 24, 11:18 a

Django Admin - Strange Problem with Permissions and Groups

2007-10-24 Thread Tim
Hello, For some strange reason, I can't give a user permissions in my app. I've tried adding the permissions directly to the user, I've also tried added the user to a group and giving the group the permissions but in either case, when I log in with the user into the Django admin, I get "You don't

Re: FlatPage and Internationalization

2007-11-27 Thread Tim
django code before so I don't know what's viable. On second thoughts it seems what I'm proposing is to store flat pages as templates in a database so they are easily editable. Hmmm, maybe that's not such a good idea after all. What are your opinions on this? Cheers, Tim On

Re: Access urls in template tags?

2007-11-29 Thread Tim
You may want to investigate the code at Satchmo (www.satchmoproject.com). I know that they do something similar for their categories and sub-categories. Tim On Nov 29, 1:14 pm, MikeHowarth <[EMAIL PROTECTED]> wrote: > Basically I'm looking to expand a sub navigation dependent upon

Re: Using CheckboxSelectMultiple

2007-12-18 Thread Tim
Try this: credentials = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple, choices=Truckshare.CREDENTIALS_CHOICES) On Dec 17, 9:14 pm, "Alex Ezell" <[EMAIL PROTECTED]> wrote: > I have several fields define in my models like this: > CREDENTIALS_CHOICES = ( > ('LM', "Commercial

Re: Using CheckboxSelectMultiple

2007-12-28 Thread Tim
You'll need to use getlist('credentials') to access the form data (use this in your validation code or in form processing) or: for cred in data['credentials']: newthing.credentials.add(cred) newthing.save() I think you're looking for the getlist() s

Re: What IDE do you use? (semi-OT)

2006-10-10 Thread Tim
the web page and go from there. --Tim --~--~-~--~~~---~--~~ 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,

Re: CRUD design question

2007-01-04 Thread Tim
The HTML in the template is fairly easy to do: {% if object %} we have an object so we're updating {% else %} no object so we're inserting {% endif %} I'm not quite sure how you want to handle the viewing part though. In the form HTML, just create your form as if you are doing an update: {% if

Password Generator

2006-07-11 Thread Tim
I'm pretty new at this Django stuff and I really like using the free Admin except for creating new users because it's difficult to create passwords. Is there anyone out there interested in building a "Django Password Generator" -- a utility to create the string for inserting new users? It would b

Re: Password Generator

2006-07-12 Thread Tim
Thanks Felix. This works great. --~--~-~--~~~---~--~~ 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

request for applications

2006-07-21 Thread Tim
mplate (and any templatetags I guess). There is a chance that if you send me anything, it could end up in one of my projects so if it's proprietary, I understand. Tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Advanced copy/duplicate

2006-09-11 Thread Tim
I'm fairly new to python and Django but I've got a fair bit of experience with general web development. My problem is that I'm having trouble figuring out the best way in Django to copy an object (with several foreign keys and many to many items) into an other completely different object and addin

Re: Advanced copy/duplicate

2006-09-12 Thread Tim
Thanks Russ. It's not news I wanted to hear but I appreciate your help. *rolling up sleeves* Time to get to work, I guess. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Django+Postgre+Apache+Windows

2006-02-12 Thread Tim
Disclaimer--I just barely figured this out myself. It could be the mod_python set up. Is this the case? In the description of how to set up the conf file for apache to work with mod_python, I think there's an error. They say you should have this: AddHandler python-program .py PythonHandl

create users from /etc/passwd?

2012-02-02 Thread Tim
. Then at least each user would have the same username/password they use to login to the network. Is that possible? Is there a better way to get the username? thanks, --Tim -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: create users from /etc/passwd?

2012-02-02 Thread Tim
authentication, just user identification. In any case, I'm reading those docs now, and the blog article. David, I wish I could do this via the LDAP set up but as far as I can tell there isn't one. thanks again! --Tim -- You received this message because you are subscribed to the Goog

forms or tastpie api?

2012-08-13 Thread Tim
ish the same work with either method. thanks, --Tim Arnold -- 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/d/msg/django-users/-/WHI1eJWMV2AJ. To post t

Django Role in San Francisco

2012-09-04 Thread Tim
I work for AppDynamics, www.appdynamics.com, a tools monitoring company that is looking for a Sr. SWE/Principal Engineer with strong Django and Java exp. My email is tstaff...@appdynamics.com to hear more. -- You received this message because you are subscribed to the Google Groups "Django us

Re: Combining queries? A "join" in Python?

2011-08-29 Thread Tim
worst case you could always just write the sql query? https://docs.djangoproject.com/en/dev/topics/db/sql/ On Aug 29, 8:15 am, graeme wrote: > I looks like my attempt to simplify and abstract the problem just made > it harder to help me: my apologies for that. I was trying to combined > two diff

apache and remote_user

2011-10-25 Thread Tim
assAuthorization On and these lines in my wsgi script: def application(environ, start_response): environ['REMOTE_USER'] = environ.get('LOGNAME') return _application(environ, start_response) thanks for any ideas or pointers. --Tim -- You received this message because you

Re: apache and remote_user

2011-10-26 Thread Tim
Thanks David, Yes I've read and re-read that page. I think my problem is coming from Apache though. It looks like my next step is more research on apache authorization from a domain. thanks, --Tim -- You received this message because you are subscribed to the Google Groups "Dj

update other objects when saving an object:

2011-10-28 Thread Tim
equence: chapter.sequence = chapter.sequence + 1 chapter.save() # makes this a recursive method super(ChapterMembership, self).save() I suppose I'm missing something basic, but I haven't seen an example like this in my searches. Can anyone see what I'

Re: update other objects when saving an object:

2011-10-28 Thread Tim
Hi Brian, That helps indeed! The code is working now; seems like I need to work on the logic, but now I'm getting somewhere. thanks, --Tim -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the w

Re: source code of the Django Tutorial?

2013-10-22 Thread tim
You are mixing versions of the tutorial. Check the URL or the green "Documentation version:" in the bottom right. The "dev" versions use "Question" while the older versions use "Poll". On Monday, October 21, 2013 4:13:46 PM UTC-4, Daniel Roseman wrote: > > On Monday, 21 October 2013 20:47:51 UTC

Re: MySQL error when trying to run tests with utf8mb4 charset

2013-10-22 Thread tim
I think you may be barking up the wrong tree, see https://code.djangoproject.com/ticket/21196 On Friday, October 18, 2013 7:30:10 PM UTC-4, fle...@fletchowns.net wrote: > > Looks like this comes from custom_user.py in django.contrib.auth.tests: > > class CustomUser(AbstractBaseUser): > email

Re: [ANNOUNCE] Django 1.6 release candidate available

2013-10-24 Thread tim
We don't typically repeat the list of deprecated features that were removed. The release notes contains this sentence: We’ve also dropped some features, which are detailed in our deprecation plan." You can look under the "1.6" sectio

Re: [ANNOUNCE] Django 1.6 release candidate available

2013-10-24 Thread tim
Yes, it will be tagged at some point. On Wednesday, October 23, 2013 6:14:45 AM UTC-4, Matthieu Rigal wrote: > > Do you plan to release the C1 with a tag also on Github ? I'm used to grab > versions from there... > https://github.com/django/django/releases > > Thanks, > Matt > > On Wednesday, Oct

Re: Keyword arguments passed to ListView.as_view() in urlconf ignored, django 1.5.4

2013-10-29 Thread tim
I don't think so. There is actually a ticket to discontinue this behavior on the CBVs that do it: https://code.djangoproject.com/ticket/19878 On Tuesday, October 29, 2013 9:51:06 AM UTC-4, Chang Sun wrote: > > code segment 1: > > url(r'^some_url$', SomeTemplateView.as_view(), {'tab': 'index'}), >

Re: User names not support Unicode in 1.5

2013-10-30 Thread tim
See https://code.djangoproject.com/ticket/20694 for a discussion of this. In summary: "[Allowing unicode in user names] would be considered a regression for anyone who relies on Django to validate that usernames are ASCII-only. A custom user model (introduced in 1.5) is the way to go." On Wedne

Re: User names not support Unicode in 1.5

2013-11-03 Thread tim
wrote: > > On 2013-10-30 04:49 PM, tim wrote: > > > See https://code.djangoproject.com/ticket/20694 for a discussion of > this. > > > > In summary: "[Allowing unicode in user names] would be considered a > > regression for anyone who relies on Django to

Re: Is this what you would expect from this Q query?

2013-11-13 Thread tim
ht try .exclude(user__in= rather than .filter(~Q if that works for your query. Tim On Monday, November 11, 2013 6:36:12 AM UTC-5, Phoebe Bright wrote: > > I have this line in my code where the functions return an ID and what I > wanted was to select all records that did not belo

Re: ImportError: No module named filestorage

2013-11-13 Thread tim
I did a Google search for "from filestorage import DatabaseStorage" and came up with this link: https://bitbucket.org/david/django-storages/issue/132/name-databasestorage-is-not-defined On Tuesday, November 12, 2013 1:15:13 AM UTC-5, ckg...@gmail.com wrote: > > i was doing this on the python int

Re: How can I use {% for ROW in LIST %} within

2013-11-13 Thread tim
Seems like it should work -- what issue or error are you facing? On Tuesday, November 12, 2013 7:46:55 PM UTC-5, Pepsodent Cola wrote: > > How can I use *{% for ROW in LIST %}* within * type="text/javascript">* tag? The code I refer to are lines 21 to 25. > > Re: Is this what you would expect from this Q query?
Please provide your models so I can reproduce it myself. It's quite difficult (at least for me) to help otherwise. On Thursday, November 14, 2013 7:17:43 AM UTC-5, Phoebe Bright wrote: > > After a long time trying to create a simple version that would replicate > the error, and failing, I've tra

Re: Upgrading from 1.5 to 1.6 - problem with Apache

The error message (last line) is quite clear: ImportError: No module named 'django.conf.urls.defaults' This module has been removed in 1.6 as noted in the deprecation timeline: https://docs.djangoproject.com/en/dev/internals/deprecation/#id3 On Thursday, November 14, 2013 12:57:48 PM UTC-5, Rob

Re: Error: XXX is not JSON serializable

Are you sure have the list() cast in the deployed version of the code? Trying to serialize a ValuesListQuerySet directly would give the error you mention since repr() of a ValuesListQuerySet looks like a list. On Tuesday, November 19, 2013 12:28:11 PM UTC-5, Lee Hinde wrote: > > I have an app I'

Re: Exception Value: column user_id is not unique

If you first run syncdb with the UserPic.user field unique=True, it's not enough just to change unique=False. You'll also need to remove the database unique constraint. Do you have the problem on a fresh syncdb if unique=False? If so, it would be helpful to include the full traceback of the err

Re: Filter ForeignKey values in model's admin view

I don't see an easy way to do this offhand. Filtering the ForeignKey queryset using ModelAdmin.formfield_for_foreignkey [1] seems close, but I don't think there's any way to incorporate the values from the M2M field in your filtering. Have you considered writing some JavaScript to do the filter

Re: Form with two select boxes + javascript - selection gets destroyed???

I suggest you to use firefox + firebug extension to see what exactly your form is sending to server in POST (or GET) request via firebug's "Console" tab. If data in request is correct every time (change both selectors, change oly one of them, without changes) -- then problem somewhere in your djang

help understanding mptt/treebeard

a chapter needs to be added as the 13th chapter in a Book, for example). I have the merest grasp of tree traversal and the associated mathematics, but from reading the mptt docs, I think that the application might be the perfect fit for my project. Can someone confirm or point me to some other docum

Re: help understanding mptt/treebeard

thanks again for your input, --Tim Arnold On Feb 3, 12:08 pm, Jason wrote: > "maybe a chapter needs to be added as the > 13th chapter in a Book, for example" > > MPTT and the other trees are mainly used on data structures where node > insertion might happen anywher

sqlite path

hi, I'm using Django 1.2.3 and I have a new sqlite (3.7.5) installed in a custom location. There is an old sqlite (3.6.23.1) installed in /usr/local/bin/. How do I tell Django to use the new sqlite? I'm on FreeBSD 8.0. thanks, --Tim Arnold -- You received this message becau

Re: sqlite path

On Feb 25, 4:00 pm, Andre Terra wrote: > On Fri, Feb 25, 2011 at 5:28 PM, Tim wrote: > > hi, > > I'm using Django 1.2.3 and I have a new sqlite (3.7.5) installed in a > > custom location. > > There is an old sqlite (3.6.23.1) installed in /usr/local/bin/. >

  1   2   3   4   5   6   7   8   9   10   >