Changing tutorial radio button to drop down

2009-01-06 Thread Max
drop down code or I need to change the view. Can someone help? Thanks, Max --~--~-~--~~~---~--~~ 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@goog

Re: Changing tutorial radio button to drop down

2009-01-06 Thread Max
Thanks!! It works now! Max --~--~-~--~~~---~--~~ 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, sen

utf8 works on my dev server but not on my production server

2008-09-01 Thread Max
Hi, I ve been trying to figure out why I can t handle utf-8 properly on my production server, while it works perfectly on my local django dev server When I try to run this line unicode_data.decode("utf-8") With data coming from DB " Rémi " I get on production only 'ascii' codec can't encode cha

Re: utf8 works on my dev server but not on my production server

2008-09-01 Thread Max
>> s.decode('utf-8') Traceback (most recent call last): File "", line 1, in ? File "encodings/utf_8.py", line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-3: invalid data On Sep 1, 7:26 pm, "Karen Tr

Re: utf8 works on my dev server but not on my production server

2008-09-01 Thread Max
>> s.decode('utf-8') Traceback (most recent call last): File "", line 1, in ? File "encodings/utf_8.py", line 16, in decode UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1-3: invalid data On Sep 1, 7:26 pm, "Karen Tr

Most Recent Distinct Results

2010-02-21 Thread max
Hi, I have a list of "news" matches for certain companies, ordered by the date they were found. I want to grab 5 results for each company up to 5 companies. I initially approached this problem by just grabbing a large amount of the newest results (LIMIT 100 or so) and then, through python, groupi

CSS can be loaded but is not applied (Django 1.3, mod_wsgi3.3)

2011-04-09 Thread Max
mod_wsgi. Here is the example for the css-folder (from the httpd.conf): Alias /project/css /Users/max/Documents/project/Website-Code/current/ css Order deny,allow Allow from all If I type "http://localhost/project/css/basicstyle.css";, for example in the browser it displays the C

Re: CSS can be loaded but is not applied (Django 1.3, mod_wsgi3.3)

2011-04-10 Thread Max
ache2/mod_mime.so ..and restart Apache, of course. Not really a Django issue... but maybe someone searches for help with a similar problem and finds this via Google and helpful. :) Max On 9 Apr., 21:22, Max wrote: > Hi! > > I recently updated all my Django-development-environment... from

Get current site inside model

2017-01-13 Thread Max
Hi, guys. I want to get absolute url for Model with domain based on request (there is not SITE_ID in the settings.py). How? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send

Re: Get current site inside model

2017-01-13 Thread Max
Vijay Khemlani, i think my question have not a lot of details. More 1) Django site framework (works with request.get_host() without Site_id). I can get the current site with Site.objects.get_current(*request*), shortcuts (get_current_site) or through model. But i have only one model with site rel

Re: Get current site inside model

2017-01-13 Thread Max
{{ domain }}{{ ob.get_absolute url }} - is not cool , i set site with context proccesor for domain Once again, if you don't have a default site_id or the request object > available inside the method, then what do you expect it to return? I'm > not asking programatically, but logically, if s

Re: Get current site inside model

2017-01-13 Thread Max
For example, also i can change queryset with "fake site" listview -> request -> set queryset site -> template. maybe it will be work, but also i use rss/sitemaps. they will not use abs path, because based on Model. You could generate the urls on the view and pass them already > generated to the

Re: Get current site inside model

2017-01-14 Thread Max
Melvyn Sopacua, i will look it. Thank you all. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Connect to SQL server but error when migrations

2017-03-20 Thread max
I have the following question post on stackoverflow , but no one can answer me. Hope anyone who has experience on it, I appreciate it! -- You received this message because you are subscribed to the Google Gr

Rebuild django app table

2017-03-23 Thread max
I delete the table Django built(e.g. django_content_type) in my sql server, and restart a new Django project But when I did makemigrations the table didn;t show up, only django_migrations created Somebody know what is going on? -- You received this message because you are subscribed to the Goo

Re: Rebuild django app table

2017-03-23 Thread max
OK I found what happen, It need to build step by step ./manage.py migrate contenttypes ./manage.py migrate auth ./manage.py migrate sites ./manage.py migrate my_app ./manage.py migrate max於 2017年3月24日星期五 UTC+8下午12時56分04秒寫道: > > I delete the table Django built(e.g. django_content_type) in

Amazon S3 for File Uploads

2009-06-12 Thread Max Clark
://code.welldev.org/django-storages/wiki/S3Storage For list members currently running this code I would be very interested in feedback / why you went with one vs another / what your experience has been like. Thanks, Max --~--~-~--~~~---~--~~ You received this message because you

database design

2009-09-30 Thread max kalinski
OrderInstances: e.g.: class ProductOrdered(models.Model): order = models.ForeignKey(Order, related_name=_ ("products_ordered")) product = models.ForeignKey(Product,related_name=_ ("products_ordered")) qty = models.PositiveIntegerField(_("Quantity"))

Re: Django with Cherokee web server

2009-10-09 Thread Max Battcher
ck on wood), and its been running stably for a few months now without the need for any further configuration tweaks or resets. -- --Max Battcher-- http://worldmaker.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: How to get a queryset?

2009-10-19 Thread Max Battcher
omething that I generally find useful in situations like that is Python's groupby function from itertools. -- --Max Battcher-- http://worldmaker.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Marking usernames as not for use dynamically

2009-11-02 Thread Max Battcher
years), but I think sometimes the tilde as a sign of a user page is forgotten/under-rated in modern URL planning. -- --Max Battcher-- http://worldmaker.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: tag counts

2009-11-05 Thread Max Battcher
That app provides just about everything one needs for tagging, including template filters for tag clouds. -- --Max Battcher-- http://worldmaker.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: domains vs sub-domains

2009-11-09 Thread Max Battcher
a CloudFront distribution, potentially without having to touch any of my HTML for "instant" bonus performance. Having all my static media hosted by good static media hosts saves me time to think about my dynamic content and tools. Your mileage may certainly vary. -- --Max Battcher--

Re: Sick of defining urls

2009-12-03 Thread Max Battcher
y under TEMPLATE_LOADERS, most apps' templates should just work. No template path fiddling or symlinks necessary. Throw in the egg loader if you are using apps in eggs; write your own loader for custom needs; etc... -- --Max Battcher-- http://worldmaker.net -- You received this message becau

Re: DateTimeField arithmetic problem

2009-12-04 Thread Max Battcher
has no attribute 'timedelta' This sounds like a silly import error... It sounds like you've got something like: from datetime import datetime Where you really want just: import datetime (Because datetime.datetime.timedelta doesn't exist, but datetime.timedelta does.) -- --

Re: Pluggable Q&A app?

2010-05-15 Thread Max Battcher
x27;t had an excuse to try it myself, but it might be what you are looking for. -- --Max Battcher-- http://worldmaker.net -- 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.c

Re: Multiple django projects

2010-09-02 Thread Max Countryman
Absolutely! :) On Sep 2, 2010, at 12:12 PM, commonzenpython wrote: hey, guys is it possible to have multiple django projects in one server ? -- 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...

Re: third party application with Django

2010-09-03 Thread Max Countryman
Why not set that up within Apache? On Sep 3, 2010, at 4:30, Goran wrote: > I need to install some php application (forum) in some folder domain/ > forum How can I do this? Django 1.2 Appache with FastCgi, shared > hosting. Is it possible to exclude url "domain/forum" from django > somehow? > >

Re: SITE_ID

2010-09-25 Thread Max Countryman
http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#site-id On Sep 25, 2010, at 10:50 AM, craphunter wrote: > Hey, > > I do have problem with SITE_ID. I don't really get this. What is it? > > I am using the django registration from bitbucker. When I click on > register I get the fol

Re: SITE_ID

2010-09-25 Thread Max Countryman
Have you set SITE_ID in your settings.py file and run 'python manage.py syncdb'? On Sep 25, 2010, at 10:59 AM, craphunter wrote: > Yes, I have read it, but I don't really get it. What ist the meaning? > What do I have to do?! > > Craphunter > > On 25 Sep., 16:50, craphunter wrote: >> Hey, >>

Re: What does an ideal django workflow setup look like?

2010-10-22 Thread Max Countryman
There was a great article on HN regarding project structure although now I can't seem to find it. Perhaps someone has it bookmarked? On Oct 22, 2010, at 11:02, Ken wrote: > *I've Googled, but have not found any really organized and layman- > friendly overview, which is why I came here* > > I k

Re: Cherokee for home developing

2010-10-28 Thread Max Countryman
Rob, I have been using Cherokee for Django deployment for almost a year now. I know several other devs who prefer it as well. Also there's always some activity on the Cherokee list itself related to Django. On Oct 28, 2010, at 14:06, Robbington wrote: > Glad to finally see some one using Ch

Re: Cherokee for home developing

2010-10-28 Thread Max Countryman
Oh I forgot to mention! Do not use the uwsgi wizard: it's currently broken. Expect a fix soon and refer to the various threads detailing the set up process without the wizard on Cherokee's mailing list. On Oct 28, 2010, at 14:06, Robbington wrote: > Glad to finally see some one using Cherokee

Re: Cherokee for home developing

2010-10-28 Thread Max Countryman
t 28, 2010, at 14:51, Robbington wrote: > > Hi Max, > > I am not sure what you mean by ' Do not use the uwsgi wizard: it's > currently broken'? > > Rob, > > Ps, should you wish to discuss this further, perhaps it is better you > email me dir

Re: Cherokee for home developing

2010-10-29 Thread Max Countryman
On Oct 29, 2010, at 5:45 AM, Robbington wrote: > Actually I mentioned Uwsgi, You missed where I referenced, where was here: On Oct 28, 2010, at 2:27 PM, Karim Gorjux wrote: > Now I solved all my problems working with settings.py. Seems that also > the debug works, but If I'll be again in troub

Re: Cherokee for home developing

2010-10-29 Thread Max Countryman
lease remember you are not the only one reading or contributing to this list; please don't be judge and jury, some people find that insufferable, Thank you, Max On Oct 29, 2010, at 6:48 AM, Robbington wrote: > Dear Paul and Max, > > As I mentioned before please email me direc

Re: Cherokee for home developing

2010-10-29 Thread Max Countryman
Generally, yes. If you're using a socket, you can rm the socket path each time you update. That will avoid the need to restart Cherokee. On Oct 29, 2010, at 4:31 AM, Karim Gorjux wrote: > I have just one question. While I'm editing the source of the project, > to see the result I have always to

Re: Cherokee for home developing

2010-10-29 Thread Max Countryman
tally broken," so don't use it! Manual set up is fairly intuitive and not difficult. Karim, you may find that refreshing your project is easier with uWSGI as opposed to something like FastCGI, in reference to your question about having to restart Cherokee each time you make changes.

Re: Cherokee for home developing

2010-10-30 Thread Max Countryman
Yes, absolutely. :D Good luck! On Oct 30, 2010, at 5:04 PM, Karim Gorjux wrote: > Yes, I noted that when I edit a url and sometimes the code, I have to > kill the fastcgi process to see the result in the browser. I think > that I could run the fastcgi as explained in the django documentation: >

Re: Cherokee for home developing

2010-11-01 Thread Max Countryman
Karim, I would set it up using a UNIX socket. Then all you have to do is rm the socket path. :) There is no need to kill uWSGI in that case. On Nov 1, 2010, at 3:13 PM, Karim Gorjux wrote: > On Sun, Oct 31, 2010 at 01:27, Max Countryman wrote: >> Yes, absolutely. :D Good luck! >

Re: Cherokee for home developing

2010-11-01 Thread Max Countryman
Nov 1, 2010, at 3:21 PM, Max Countryman wrote: > Karim, I would set it up using a UNIX socket. Then all you have to do is rm > the socket path. :) There is no need to kill uWSGI in that case. > > On Nov 1, 2010, at 3:13 PM, Karim Gorjux wrote: > >> On Sun, Oct 31, 2010 at 01

Re: Serve different page to IE7/8?

2010-11-22 Thread Max Countryman
Conditional stylesheets vs CSS hacks? Paul Irish says the answer is neither: http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ On Nov 21, 2010, at 7:54 PM, Victor Hooi wrote: > I know this is a bit of a hack, but what's the best way to serve up a > different templa

Re: State of the Django MPTT Art?

2010-02-11 Thread Max Battcher
rage needs change.) I think its documentation does a pretty good job describing the trade-offs between the various storage methods it supports, and certainly the best form depends on the data being stored. -- --Max Battcher-- http://worldmaker.net -- You received this message because you are sub

unsubscribe

2007-07-27 Thread Max UNGER
unsubscribe --~--~-~--~~~---~--~~ 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

Creating an archive navigation for date_based.archive_month

2007-09-10 Thread Max Romantschuk
.archive_year: the months which have items. But that is a view, and I want to get the same information into the sidebar of my site. How should I do that? I just started using Django a week ago, so this might indeed be really simple. I haven't had time to thoroughly digest the docs just ye

Re: Creating an archive navigation for date_based.archive_month

2007-09-10 Thread Max Romantschuk
pointing to the Django server.) I've ported my site in a week from an old proprietary CMS, and I must say Django's been a pleasure so far! Thanks again, Chris! Max --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

ANN: Agoranomos (7.12.11)

2007-12-10 Thread Max Battcher
d the next eBay with it, I'd love a small cut. ;) -- --Max Battcher-- http://www.worldmaker.net/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: get knowledge about islam...

2008-01-02 Thread Max Sinelnikov
Йобаные клерики, идити в жопу. Я русский. Мои предки сделали Революцию, я атеист, мне срать на ваше дебильное мнение о мире. Умрите, пожалуйста, сами, не заставляйте тратить на вас патроны. Православные, католики, всякие прочие идиоты идут вместе с вами к стенке. Вы идиоты и вы неизлечимы. Вы не

Re: get knowledge about islam...

2008-01-02 Thread Max Sinelnikov
sorry for my last message. We are meting new year in Russia --~--~-~--~~~---~--~~ 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

Re: save() called 2 times.

2006-05-05 Thread Max Battcher
uncate after so many characters just so that URLs don't get out of hand... not to mention all the wasted characters sent in your HTTP responses and emails mentioning unrealistically long URLs. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have co

Re: Unhappy, reinventing

2006-05-25 Thread Max Battcher
rd thing and not something that I'd want to build with the DOM approach. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" --Mach

Re: I think I'm doing something wrong...

2006-06-06 Thread Max Battcher
Elver Loho wrote: > Sadly it seems you, along with so many, many others, have fallen into the easiest problem in the book. Your action address should have a following /. http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata -- --Max Battcher-- h

Re: POST to view loses POST data

2006-06-17 Thread Max Battcher
ary to force true? > > Yeah, this is kludgy, but the alternative is to put in a attribute on > the request object to say "is this a post?" or force people to fix > "bugs" in their valid HTML. :) That's what request.META["REQUEST_METHOD"] is for. http:

Re: Template: nested for and ManyToMany field problem - MySQL

2006-06-18 Thread Max Battcher
te_url }} > {% endfor %} > > entry.categries is ManyToManyField Then you want entry.categories.all in your template. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the gr

Re: ValidationErrors

2006-06-30 Thread Max Battcher
t for some better way. > > I was thinking of creating a custom tag, but thought I'd ask to make > sure I wasn't missing something. {{ form.name.html_error_list }}, wraps it in a -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I hav

Re: Protecting files

2006-08-02 Thread Max Sinelnikov
No, you couldn't. Bobby can upload to this directory, Sussie can upload to this directory, so Sussie can pass Django authorization with her own login/password and can download all files. The right way is to serve files in a directory which is not Apache-accessile as offered by Nebojsa Dordevic. 200

Re: check for yourself (((;

2006-08-18 Thread Max Penet
Some php projects had to cope with that. I can remember phpbb : http://isc.sans.org/diary.php?date=2004-12-21 But many other projects suffered from this . > is there enough advantage to be had by > parsing the HTML response of a google search, that malware writers > would bother to write that,

Re: create object method

2006-01-16 Thread Max Battcher
thers. I had enough problems dealing with the magic that I went ahead and moved my development to magic-removal... See http://code.djangoproject.com/wiki/RemovingTheMagic -- --Max Battcher-- http://www.worldmaker.net/ "History bleeds for tomorrow / for us to realize and never more fol

Re: Preserving data through db updates/changes

2006-01-19 Thread Max Battcher
7;my_field_name')``, then you can think about things like ``add_field()`` or ``update_field()``. With those even cooler migration scripts could be built, and it could make it real quick to update a database from the Python console. Those are my thoughts at the moment, feel fre

Re: Admin functionality available on public site

2006-01-19 Thread Max Battcher
Views: http://www.djangoproject.com/documentation/generic_views/#using-create-update-delete-generic-views Mix and match these two in a good cocktail sauce and you have admin-style ui forms ala django. (Mmm, tasty.) -- --Max Battcher-- http://www.worldmaker.net/

Re: proper use of admin screens

2006-01-23 Thread Max Battcher
t more intricate than add/change permissions. If you give someone change permission to one of your models they can change any and all data in that table. Most likely you are going to want to roll your own, as you can be a lot more precise with your own code, but feel free to evaluate your own situa

magic_removal table update

2006-01-25 Thread Max Battcher
he sequences in PostgreSQL that I've overlooked? Otherwise, I'm assuming: * Dump the data to a file * Drop Cascade everything * Re-install * Import back from the file I made a brief remark on the wiki page that someone should probably amplify into some better general migration guideline.

Re: magic_removal table update

2006-01-25 Thread Max Battcher
Jason Davies wrote: ALTER TABLE auth_groups ALTER id SET DEFAULT nextval('public.auth_group_id_seq'::text); This was the peculiar incantation I was looking for, thanks. Now I just have a non-fatal, non-blocking error from the django_content_types table... -- --Max Battc

Re: RoR Ajax helpers port to Django tags?

2006-01-25 Thread Max Battcher
The typical HTML view for a Django site) /mysite/coolthings/1.xml Overall it would be subtle "opt-in" and shouldn't affect the current behavior (ie, if the generic view+template loader doesn't know the expected output format, default gracefully to the default in setting

Re: error restoring project

2006-01-30 Thread Max Battcher
oproject.com/ticket/930) dealing with the One-To-One relationship. The SQL is not creating the proper JOIN for the default ordering and you need to explicitly create an ordering='title' in your Meta class so that is isn't ordering based on a field in the other class. I'm assuming this isn't being fixed right now because the Subclassing system will replace it. -- --Max Battcher-- http://www.worldmaker.net/

Re: Extending User

2006-01-30 Thread Max Battcher
let the Admin show your object in the main User form. (OneToOne currently doesn't support that, albeit it really needs the reverse edit_inline.) The upcoming Subclassing changes are going to make this route even easier for OneToOne relationships. -- --Max Battcher-- http://www.worldmaker.net/

Re: Lookup by week

2006-01-30 Thread Max Battcher
e different definitions of when they start, etc. Then, if weeks are implemented, you start to get requests for fortnights and scores... -- --Max Battcher-- http://www.worldmaker.net/

Tree View

2006-02-03 Thread Max Battcher
ev --extends-> base_sidebar --extends-> base). Has anyone else experienced this? Does anyone else have any experience to share on tree views? Otherwise I guess its time for a major refactor... -- --Max Battcher-- http://www.worldmaker.net/

Re: Tree View

2006-02-04 Thread Max Battcher
neric, though... something to produce nice semantic XHTML (s). I'll ponder on this subject a bit more later. -- --Max Battcher-- http://www.worldmaker.net/

Re: Tree View

2006-02-05 Thread Max Battcher
lly want a true list view I need to build a custom tag. Right now I think I'm just going to spread the tree out across the URL space. -- --Max Battcher-- http://www.worldmaker.net/

Re: recursive template calls

2006-02-08 Thread Max Battcher
ource under the LGPL. -- --Max Battcher-- http://www.worldmaker.net/

Django and PCMEF vs MVC

2006-02-10 Thread Max Battcher
A few thoughts on architecture: http://blog.worldmaker.net/node/211 I had architecture thoughts in my head from class and felt I could apply them somewhat to Django. I'm not sure if its useful or interesting, but hopefully somebody might find use of it or interest in it. -- --Max Bat

Re: Recursive self referring foreignkeys

2006-02-10 Thread Max Battcher
de.djangoproject.com/wiki/CookBookCategoryDataModel - --Max Battcher-- http://www.worldmaker.net/ --~--~-~--~~~---~--~~ 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@g

Re: is_member_of method for user objects

2006-02-11 Thread Max Battcher
ally. It is it "too much" logic, and that is in some way an aesthetic judgment. -- --Max Battcher-- http://www.worldmaker.net/

TZ Interactions

2006-02-14 Thread Max Battcher
Do I need to just move the uglier ("EST5EDT...") syntax? Is there any "best practice" in this situation that works well cross-platform? -- --Max Battcher-- http://www.worldmaker.net/

Re: Please help with django tutorial #2

2006-02-17 Thread Max Battcher
e used by the admin and auth, including the Content Types table that is giving you your reported error message. -- --Max Battcher-- http://www.worldmaker.net/ "History bleeds for tomorrow / for us to realize and never more follow blind&quo

Re: Simple weblog, generic views and templates -- error

2006-02-19 Thread Max Battcher
t;archive*" views do exactly what they say and only display old/archived entries. So, if you have the date set to some time in the future, there is your answer on why you won't see them. -- --Max Battcher-- http://www.worldmaker.net/ --~--~-~--~~~---~-

Re: accessing user info in templates

2006-02-20 Thread Max Battcher
-Removal changes things up, of course, check out the Descriptor stuff. -- --Max Battcher-- http://www.worldmaker.net/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Model Basics

2006-02-28 Thread Max Battcher
a side note, I could use the ability to have custom non-Model-Fields (ie, not persisted in the database, only used in the save() ChangeLog generation) in the Admin, is there an existing way to do this?) -- --Max Battcher-- http://www.worldmaker.net/ All progress is based upon a universal innate de

Re: Django in a Load-Balanced environment (ORM issues) ...

2006-02-28 Thread Max Battcher
ving that support, and then when Django does provide something that you are happy with you can pull out your custom save() code and the rest of your code probably won't notice. You can even write your own object "Manager" to have fuller control of object caching and t

Re: newbie question about admin module

2006-03-04 Thread Max Battcher
ow=True and the Admin will autofill it with the "current time" (which becomes the last modified date). There is no current way to do the same with User, but there is a proposed CurrentUserField in the works. -- --Max Battcher-- http://www.worldmaker.net/ --~--~-~--~~-

Re: Confusion about templates directory location

2006-03-14 Thread Max Battcher
in this. And is there a "default" > place I can put templates where I won't need to set TEMPLATE_DIRS to > just keep it simpler? If you have the "app" loader in your setting.py file under TEMPLATE_LOADERS, it should automatically look under the "templates"

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

2006-03-16 Thread Max Battcher
commit', though, this doesn't automatically post the change to some central server. Instead, you can then "sit" on the patch and let others 'darcs pull' it from your repository, or you can 'darcs push' it to some other repo or even 'darcs send'

Re: magick-removal: Suggestion

2006-03-20 Thread Max Battcher
cheme, as being conceptually different. In most cases you should keep in mind that the entire namespace is just as much a part of the naming scheme as the class name itself. There's no reason to add verbosity to your class names that is already in your namespace name(s). -- --Max Bat

Re: Generic views in magic removal

2006-03-22 Thread Max Battcher
list_detail', > (r'(\d+)/$', 'object_detail'), > ) > Shouldn't that be: urlpatterns = patterns( 'django.views.generic.list_detail', (r'(\d+)/$', 'object_detail', info_dict), ) Your example you aren't passing

Re: Advice on using model to bulk/batch load database

2006-03-22 Thread Max Battcher
ple to create a datetime.date object which you can directly assign to the DateField. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track)

Re: Generic views in magic removal

2006-03-22 Thread Max Battcher
Arthur wrote: > urlpatterns = patterns( > 'django.views.generic.list_detail', > (r'(\d+)/$', 'object_detail', info_dict), > ) I think I figured it out, your RegEx should be: (?P\d+)/$ -- --Max Battcher-- http://www.worldmaker.net/ "I

Re: Overthinking urls.py?

2006-03-27 Thread Max Battcher
ere there are multiple uses of your model objects (ie, two projects sharing an application), Django also provides, for your settings.py file, the ABSOLUTE_URL_OVERRIDES setting, which you can look up in the appropriate documentation. -- --Max Battcher-- http://www.worldmaker.net/ All progress is

Re: choices

2006-03-27 Thread Max Battcher
e out how. If you visit the Admin's documentation site (link in the top bar), under Models it will point you to the fact that Django magically creates a function for you to do just that. In your example this would be: something.get_kind_display() -- --Max Battcher-- http://www.worldmaker

Re: Overthinking urls.py?

2006-03-28 Thread Max Battcher
def urlfromconf(object, path): urlconf = __import__(path) return urlconf.absolute_url(object) ABSOLUTE_URL_OVERRIDES = { 'myapp.somemodel': lamda o: urlfromconf(o, 'myapp.urls.somemodelrelated'), } Then in myapps.urls.somemodelrelated: def absolute_url(object): retu

Re: Mixing with Mailman?

2006-03-28 Thread Max Battcher
ting in that the Mailman website TODO list for Mailman 3 requires almost a Django-like framework (decent db support, decent template engine). Near there it points to one similar attempt, a Zope-Mailman integration: http://www.zope.org/Members/srichter/Products/ZMailman Maybe that will offer some i

Re: Custom templatetags are ignored. Why ?

2006-03-29 Thread Max Battcher
hon shell. Basically: python manage.py shell >>> from myproject.myapp.templatetags import news_tags -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" -

Re: Overthinking urls.py?

2006-03-30 Thread Max Battcher
y convenience to fix this seperation problem, and with it you can do all sorts of crazy things (thanks to the pythonic ability to pass around functions) like implement your own project-specific mini-routes or whatever (see my previous post on the subject). -- --Max Battcher-- http://www.worldmaker

Re: Overthinking urls.py?

2006-03-30 Thread Max Battcher
icular case, because you are going to have a strong, repetitive pattern here in your ABSOLUTE_URL_OVERRIDES, and that isn't very DRY, is that maybe you could use some sort of pattern matching in ABSOLUTE_URL_OVERRIDES like being able to use 'mya

Re: overriding User class

2006-04-01 Thread Max Battcher
he django source code ? >> > > Have a look at this for one way to do it: > > http://code.djangoproject.com/wiki/ExtendedUserModel Another possibility is to create your own Model with a OneToOne relationship, or ForeignKey relationship, as appropriate, and then use lookups as ne

Re: How to query roots in a model hierarchy

2006-04-01 Thread Max Battcher
jango version as appropriate), you have a parent_id__isnull=True as one of the arguments. (Note the double underscore before isnull and the single underscore before id.) -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and i

Re: magic-removal - count with a condition

2006-04-04 Thread Max Battcher
hat intended? What would be a workaround? foo.objects.exclude(somecondition).filter(othercondition).count() The lazyness of the new QuerySets means that the above simply creates a COUNT query, no matter how many exclude()s and filter()s you might combine. -- --Max Battcher-- http://www.worldma

Re: ImageField upload_to

2006-04-05 Thread Max Battcher
timster wrote: > Should the super() method work even though I'm not using MR? No. super().save() only works in MR. You'll need the _pre_save() and _post_save() hooks in .91 or trunk. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have

Re: ImageField upload_to

2006-04-05 Thread Max Battcher
timster wrote: > Should the super() method work even though I'm not using MR? No. super().save() only works in MR. You'll need the _pre_save() and _post_save() hooks in .91 or trunk. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have

Re: To app or not to app?

2006-04-08 Thread Max Battcher
, and I just try to follow good code modularization principles. -- --Max Battcher-- http://www.worldmaker.net/ "I'm gonna win, trust in me / I have come to save this world / and in the end I'll get the grrrl!" --Machinae Supremacy, Hero (Promo Track) --~--~-~--~~---

  1   2   >