|
jupo posted:This really is brilliant. One of the biggest hurdles the company I work for have faced with Django is actually selling it to clients due to how relatively unknown it is. I've honestly never heard of Alfresco before but looking at their client base this is just the kinda thing we need to pitch Django at an "enterprise" (I just threw up a little) level. Alfresco is very loving cool, because it lets you automate business processes and do things like hook up with an ISO quality consultant or whatever and implement paper trail management and poo poo like that. If you get into the workflows part of it, it starts to get really cool. Someone goes into word, fills in an order request, publishes it into an alfresco folder using words sharepoint interface, the thing then automatically forwards it to your manager, who reviews, ticks off, then fires a pair of copies into the purchases and engineering, meanwhile your customer logs into your django based portal (all authenticating from the same AD source) , reviews progress, and possibly adds a comment. And you could impement that poo poo in a couple of days. Double points if you replace the customers shared drives with the alfresco repository (It has a samba interface) , and start porting their ad-hoc internal processes into proper business flows. Alfresco is serious enterprise poo poo, and it isn't microsoft, so theres geek cred right there. Theres nothing it can do that sharepoint can't also do, and theres probably a few things sharepoint does better, but sharepoint can also be ridiculously frusturating, and I'm not aware of any django interfaces into sharepoint yet. Quick note though: These guys also do a drupal add on for alfresco, and hosed if I can get it to work
|
# ? Jun 15, 2009 06:23 |
|
|
# ? May 15, 2024 06:55 |
|
I started using django-treebeard in order to get a nestable series of models that i can use for categories/sub categories/sub-sub categories and so on. The problem i ran into is that there is no admin interface for django-treebeard. Before i go and see about implementing one, is there any django-treebeard like solutions that do come with an admin interface that i can just use out of the box?
|
# ? Jun 16, 2009 03:48 |
|
Profane Obituary! posted:I started using django-treebeard in order to get a nestable series of models that i can use for categories/sub categories/sub-sub categories and so on. The problem i ran into is that there is no admin interface for django-treebeard. Before i go and see about implementing one, is there any django-treebeard like solutions that do come with an admin interface that i can just use out of the box? django-pagecms does exactly this in the admin. I don't know how well it maps to treebeard but it'd be worth digging around in their custom admin pages.
|
# ? Jun 16, 2009 05:16 |
|
I *think* django-mptt has some helpers, but I might be wrong, and they need to put out a god damned 1.0 release.
|
# ? Jun 16, 2009 06:43 |
|
king_kilr posted:I *think* django-mptt has some helpers, but I might be wrong, and they need to put out a god damned 1.0 release. Just for clarity - django-pagecms uses django-mptt
|
# ? Jun 16, 2009 06:59 |
|
Actually pagecms i think just made my entire job easier! I should have known i was semi reinventing the wheel.
|
# ? Jun 16, 2009 15:08 |
|
king_kilr posted:I *think* django-mptt has some helpers, but I might be wrong, and they need to put out a god damned 1.0 release. ?? django-mptt is 1.0+ compatible last I checked.
|
# ? Jun 16, 2009 21:52 |
|
deimos posted:?? django-mptt is 1.0+ compatible last I checked. Only trunk, mind you I live by the motto "trunk is the only stable branch", but it's still aggravating when you have to point this out to people.
|
# ? Jun 16, 2009 23:36 |
I'm trying to get Django setup on a Fedora Core box. I installed python, postgresql, mod_wsgi, and finally django. I added the following to my httpd.conf:code:
edit: I can ping the domain and it resolves to my server edit2: gently caress I don't know what the deal was but it finally started logging the error in error_log, it was a typo in my django.wsgi file, couldn't find my settings file Can I still use an htaccess file to password protect my dev environment? How would I do that? fletcher fucked around with this message at 01:48 on Jun 25, 2009 |
|
# ? Jun 25, 2009 01:08 |
|
fletcher posted:Can I still use an htaccess file to password protect my dev environment? How would I do that? .htaccess files are a lovely crutch (in that they make people ask the question you just did, instead of understanding how Apache config actually works) that get a ton of use because of shared PHP hosting setups. Since you've got access to the Apache config, just plunk whatever you would've put in a .htaccess file, into a <Location> block, e.g. code:
|
# ? Jun 25, 2009 04:24 |
bitprophet posted:Since you've got access to the Apache config, just plunk whatever you would've put in a .htaccess file, into a <Location> block, e.g. Ahh, that's what I had tried originally. Forgot to put it in a Location block. Thanks!
|
|
# ? Jun 25, 2009 04:39 |
|
fletcher posted:Ahh, that's what I had tried originally. Forgot to put it in a Location block. Thanks! Yea, that's the trick: a .htaccess is, for the most part, exactly equivalent to placing the contents of the .htaccess within a Location or Directory block whose value is the path to where the .htaccess was. (i.e. /var/www/foo/bar/.htaccess => <Directory /var/www/foo/bar> or <Location /foo/bar>) Stuff like AuthType and friends don't even work at the top level of a config or vhost; see the docs and note the "Context" header of that doc section. Whenever something I do doesn't seem to work, I first make sure I'm using the directive(s) in the appropriate context
|
# ? Jun 25, 2009 15:18 |
I'm a bit confused on how to organize my code into different apps, what portions deserve their own app, which ones to lump together, etc. Can somebody help me clarify this?
|
|
# ? Jun 25, 2009 22:52 |
|
fletcher posted:I'm a bit confused on how to organize my code into different apps, what portions deserve their own app, which ones to lump together, etc. Can somebody help me clarify this? There isn't a hard and fast rule. I've worked on projects that were so small with no chance of growing, that they only contained a few models and views and so I lump them all together into one app for the site. Then I've worked on projects so large that contained over 50 applications - some of these contained no models, only templatetags for example. Some things just didn't belong *anywhere* such as various utilities that get used across a variety of apps, so they went under their own app called "misc". Just apply common sense. Groups things together under apps when they logically belong together and you've got enough code going on that warrants the distinction between apps. The beauty of both Python and Django is that your environment is so logically organized from the get-go that in my experience you never really paint yourself into some huge corner that you have to backtrack from when major changes need to occur.
|
# ? Jun 25, 2009 23:54 |
|
fletcher posted:I'm a bit confused on how to organize my code into different apps, what portions deserve their own app, which ones to lump together, etc. Can somebody help me clarify this? http://www.youtube.com/watch?v=A-S0tqpPga4 watch this
|
# ? Jun 26, 2009 00:21 |
|
I tend to just use one app and many controller files organised by theme, per file. I do wish Django insisted on putting controller methods in objects. Its probably just my OO dysfunction, but exposed functions make me barf.
|
# ? Jun 26, 2009 12:54 |
|
duck monster posted:I tend to just use one app and many controller files organised by theme, per file. It's perfectly possible to organize your views onto classes if you like, this is actually the plan for the future of generic views (and the admin is already organized this way). http://code.djangoproject.com/ticket/6735
|
# ? Jun 26, 2009 17:34 |
|
Anyone looking for a large django codebase to look at may be interested in: http://www.everyblock.com/code/, http://github.com/brosner/everyblock_code/tree/master
|
# ? Jul 1, 2009 02:13 |
|
I've been messing around with Django for the past few days but I ran into this errorcode:
I've been trying everything but can't figure out what I did wrong. Note: I'm new to this whole programming thing so forgive anything horrendous in the code, I dont know any better. Separating the generic views from the urls.py seems like i'm kind of double-defining things. I did it because I read that it would be helpful if I was to extend on the generic views. Is this bad practice? my views.py code:
code:
|
# ? Jul 3, 2009 05:01 |
|
spencer for hire posted:I've been messing around with Django for the past few days but I ran into this error I feel like you're doing way to much work, You can pass those necessary arguments to the generic views from the URLs see here for passing arguments to a view from the url line directly VVVVV he's right multigl fucked around with this message at 09:28 on Jul 4, 2009 |
# ? Jul 4, 2009 08:41 |
|
multigl posted:I feel like you're doing way to much work, You can pass those necessary arguments to the generic views from the URLs see here for passing arguments to a view from the url line directly That's not the reason for the exception, and I have no idea how you reached that conclusion. The exception is because he's passing too many positional variables to the object_detail view. Specifically slug is passed as a keyword argument and queryset is the 4th positional argument. Thus he's passing the slug as a positional argument in the queryset position, as well as queryset the keyword argument. Also queryset should be a queryset, not a single item.
|
# ? Jul 4, 2009 09:24 |
|
king_kilr posted:That's not the reason for the exception, and I have no idea how you reached that conclusion. The exception is because he's passing too many positional variables to the object_detail view. Specifically slug is passed as a keyword argument and queryset is the 4th positional argument. Thus he's passing the slug as a positional argument in the queryset position, as well as queryset the keyword argument. Also queryset should be a queryset, not a single item. oops you're definitely right, I never use generic views.
|
# ? Jul 4, 2009 09:28 |
|
king_kilr posted:That's not the reason for the exception, and I have no idea how you reached that conclusion. The exception is because he's passing too many positional variables to the object_detail view. Specifically slug is passed as a keyword argument and queryset is the 4th positional argument. Thus he's passing the slug as a positional argument in the queryset position, as well as queryset the keyword argument. Also queryset should be a queryset, not a single item. That was it, thank you so much.
|
# ? Jul 4, 2009 23:13 |
|
How is Windows development support for Django, and Python in general? I'm talking about how well the actual interpreter works, as well as support tools like the version control system of choice for the Django community, and especially IDEs and/or editors. This is just for development; deployment would still be on the usual Linux stack. I was trying to get back into Rails, but my response to asking the same question of them was "good luck; get a Mac." The Ruby interpreter is slow on Windows; the VCS of the Rails community is Git, which barely works on Windows and certainly not as well as SVN or Hg; and the editor of choice for Rails, Text Mate, is OS X only. I'm getting tired of feeling like a second class citizen. Is Django development viable on windows? Or will I be locked out of some tools and using poor ports of others? As a corollary, what is the IDE of choice for Django? Or even just the best code editor? (And don't say Vim or Emacs.) Magicmat fucked around with this message at 23:22 on Jul 5, 2009 |
# ? Jul 5, 2009 23:08 |
|
Magicmat posted:How is Windows development support for Django, and Python in general? I'm talking about how well the actual interpreter works, as well as support tools like the version control system of choice for the Django community, and especially IDEs and/or editors. This is just for development; deployment would still be on the usual Linux stack. Magicmat posted:(Vim or Emacs.)
|
# ? Jul 5, 2009 23:36 |
|
deimos posted:Man, maybe I should just give in and do ASP.Net. At least that IDE is awesome.
|
# ? Jul 5, 2009 23:41 |
|
Django/Python can be done on Windows, but, yes, I'm sure it's horrible. Windows just isn't a random-language-friendly platform. Why not just use VirtualBox to run Linux and not have to deal with the bullshit of installing on Windows? As far as IDEs and editors go, Vim/Emacs or just something simple like Notepad++ should be plenty. But, really, if you don't want to do ASP/PHP, get a Mac or run Linux.
|
# ? Jul 5, 2009 23:46 |
|
Magicmat posted:So the answer is that Django development is no better on Windows than Rails? When I was messing around with it, I set up RoR with XAMPP and used Notepad++ all on Windows with no problems. I did use SVN, but I wouldn't say that there was any issue that made RoR development on a Windows box a hardship. You can even use Aptana with the RoR plugin if you want something more than just a text editor to develop in. That being said, gently caress if I could get Django to ever work on Windows (or Linux for that matter). I didn't spend much time though as it was just a curiosity to play around with.
|
# ? Jul 6, 2009 00:39 |
|
I had no problems developing on a windows machine with Django back in 0.96, and we used a Debian box for our production server. I used Notepad++ for editing and tortoise svn as an interface for using svn on windows. As for the python interpreter, I don't know if it runs any faster or slower, but I don't remember running into anything that stopped me from developing. Just make sure to setup all your path variables correctly in Windows and there shouldn't be any trouble.
|
# ? Jul 6, 2009 00:49 |
|
MonkeyMaker posted:Django/Python can be done on Windows, but, yes, I'm sure it's horrible. Windows just isn't a random-language-friendly platform. Why not just use VirtualBox to run Linux and not have to deal with the bullshit of installing on Windows? This just isn't even remotely true. I've been developing with Django on Windows and deploying on Linux full time for around a year now and I believe in that time I've had a grand total of one issue - some 3rd party Django app that had hard coded slashes in it rather than using os.sep Install Apache on Windows, MySQL or Postgres - everything just works.
|
# ? Jul 6, 2009 01:13 |
|
Magicmat posted:How is Windows development support for Django, and Python in general? I'm talking about how well the actual interpreter works, as well as support tools like the version control system of choice for the Django community, and especially IDEs and/or editors. This is just for development; deployment would still be on the usual Linux stack. edit: Catching this before the edit: king_kilr posted:Django (as well as Python) is fully supported on Python. No Safe Word fucked around with this message at 05:13 on Jul 6, 2009 |
# ? Jul 6, 2009 02:47 |
|
Django (as well as Python) is fully supported on Python. One of the Django core committers is a regular Windows user and verifies that everything works.
|
# ? Jul 6, 2009 05:05 |
|
Magicmat posted:So the answer is that Django development is no better on Windows than Rails? Django development is fine on Windows. I didn't encounter any problems or notice any quirks or anything from doing so during my albeit brief usage of Windows for development. I did get annoyed enough by general Windows stuff to offload my code to a Linux server and edit it remotely, though that's a reflection on my OS preferences rather than any sort of sleight against Python or Django. As for IDEs, it seems like most developers I know use Eclipse with PyDev, and the rest seem to use Wing or Komodo. Personally, I prefer just using a text editor, specifically TextMate on OS X, gedit on Linux, and Notepad++ on the rare occasions I use Windows.
|
# ? Jul 6, 2009 14:20 |
|
This might be worth looking into too: http://www.e-texteditor.com/ Billed as "TextMate for Windows" I dunno how true that is, but it supports TextMate bundles on Windows, so it may get you close.
|
# ? Jul 6, 2009 15:14 |
|
The issues I've run into on Windows mostly have to do with the binary distributions of third party apps not supporting newer versions of python. This was mostly last year when 2.6 had just come out, so I'm sure it won't be the same situation right now. It's just something you have to keep in mind when developing on Windows. Here is the MySQLdb which only supports python 2.4 and 2.5 on Windows. I don't know if it will work with 2.6. http://sourceforge.net/projects/mysql-python/files/
|
# ? Jul 6, 2009 20:10 |
|
Magicmat posted:So the answer is that Django development is no better on Windows than Rails? It works great. I use Eclipse with PyDev and it works fantastic. There are also python plugins for Netbeans and Visual Studio. Python is a microsoft anointed first class citizen on the Windows platform.
|
# ? Jul 7, 2009 06:22 |
|
duck monster posted:It works great. I use Eclipse with PyDev and it works fantastic. Ehhh.. IronPython is, which is generally up to date with CPython, but not 100%. For most uses it's up to date. The latest stable release brings it up to full Python 2.5 support but there's a beta that supports 2.6 and I've heard that it's pretty stable as well.
|
# ? Jul 7, 2009 06:33 |
|
Having a problem with Django's admin and ImageField. I know for a fact that PIL works fine. It'll open and modify any image I try in the shell and regular terminal, so I don't see how PIL could be the problem. Django's admin, however, won't accept any image, returning the error: "* Upload a valid image. The file you uploaded was either not an image or a corrupted image." for any image I give it. Any ideas?
|
# ? Jul 12, 2009 21:30 |
|
If you're on a semi-out of date trunk I'd upgrade right the hell now. For a while in the 1.1 dev process image fields were fairly messed up.
|
# ? Jul 12, 2009 22:07 |
|
|
# ? May 15, 2024 06:55 |
|
This is a pretty cool IBM developerWorks article on writing better Django models, with a mind to improving query performance and with the use of model managers.
|
# ? Jul 13, 2009 18:06 |