Recursive function

2008-11-12 Thread gontran
Hello, I've got a problem with a recursive function: in my model, I have a class named myClass: each object in my class has an id, a parentId, and a name. I want to make a list of all my objects that looks like this: object1 object2 object3 object4 ob

Re: Recursive function

2008-11-12 Thread gontran
Just a correction: replace 'page' by 'element': def displayListObject(parentId, displayString): displayString += '' elements = myClass.objects.filter(parentId=parentId) for element in elements: if myClass.objects.filter(parentId=element.id): displayString += '' +

Re: don't escape html tags

2008-11-12 Thread izzy
Hi. I'm new to Django. And I'm having problems with templates. I have a richtext field that stores HTML(using TinyMCE). But when I display it on template it simply renders all in html: http://www.thesynapticleap.org/files/ tsl/images/tinymce_0_0.png" alt="sample image" width="530" height="392"

Re: Recursive function

2008-11-12 Thread gontran
Merci beaucoup! it works fine now. >Now, and while this is none of my problems, I'd seriously question the decision of building html that way. This would be better done using templates IMVHO. -> I'm using this function in a custom tag to build a menu On 12 nov, 10:59, bruno desthuilliers <[EMAI

Re: Apache Segmentation Fault on succesful authentication

2008-11-12 Thread huw_at1
An update on this. 'which python' returns: libpython2.5.so.1.0 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x0039a4a0) libdl.so.2 => /lib64/libdl.so.2 (0x0039a460) libutil.so.1 => /lib64/libutil.so.1 (0x0039b340) libm.so

Re: Problem saving form

2008-11-12 Thread urukay
what's your view function looks like? (also form's savefunction) R. Detlef Boddin wrote: > > > Hi, > > I'm quite new to Python and Django. > I realy really need help. > > I have the problem to save a form , > > I have 2 model classes. Item and detail. > The class detail has a one-to-o

Re: Recursive function

2008-11-12 Thread bruno desthuilliers
On 12 nov, 14:25, gontran <[EMAIL PROTECTED]> wrote: > On 12 nov, 13:22, Steve Holden <[EMAIL PROTECTED]> wrote: > > > gontran wrote: (snip - about using templates instead of building html in python code) > > > -> I'm using this function in a custom tag to build a menu > > > And is there a rule t

Re: Recursive function

2008-11-12 Thread Steve Holden
By all means use your custom tag. Inside the code for the tag, use a template to generate the HTML. That's all! regards Steve gontran wrote: > Could you be more explicite because I don't understand everything and > why not using my custom tag? (which works fine) > > On 12 nov, 14:43, bruno dest

Sort drop-down list in Admin module

2008-11-12 Thread Bobo
Hi everyone, In my admin module I've some drop-down lists that extract data from my database but the thing is that it sort the list from the Database ID and not alphabetically, starting with A and continuing. I've search the Django API and Admin docs for a solutions but it seem that I only find

Re: Sort drop-down list in Admin module

2008-11-12 Thread Daniel Roseman
On Nov 12, 2:30 pm, Bobo <[EMAIL PROTECTED]> wrote: > Hi everyone, > > In my admin module I've some drop-down lists that extract data from my > database but the thing is that it sort the list from the Database ID > and not alphabetically, starting with A and continuing. > > I've search the Django

Re: Recursive function

2008-11-12 Thread gontran
Ok, thank you all for your help On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote: > By all means use your custom tag. Inside the code for the tag, use a > template to generate the HTML. That's all! > > regards >  Steve > > gontran wrote: > > Could you be more explicite because I don't und

Re: Recursive function

2008-11-12 Thread gontran
Ok, thank you all for your help On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote: > By all means use your custom tag. Inside the code for the tag, use a > template to generate the HTML. That's all! > > regards >  Steve > > gontran wrote: > > Could you be more explicite because I don't und

Re: Recursive function

2008-11-12 Thread bruno desthuilliers
On 12 nov, 14:56, gontran <[EMAIL PROTECTED]> wrote: > Could you be more explicite because I don't understand everything and I thought it was explicit enough. A custom tag is usually made of a parser function and a rendering node (cf relevant part of django's documentation), so I gave you a snipp

Re: Recursive function

2008-11-12 Thread gontran
Ok, thank you all for your help On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote: > By all means use your custom tag. Inside the code for the tag, use a > template to generate the HTML. That's all! > > regards >  Steve > > gontran wrote: > > Could you be more explicite because I don't und

Re: creating django middleware

2008-11-12 Thread Steve Holden
ershadul wrote: > Dear all, > please consider the following code-block: > > class SQLAlchemySessionMiddleware(object): > """ > This class instantiates a sqlalchemy session and destroys > """ > def process_request(self, request): > request.db_session = session() > re

Re: Recursive function

2008-11-12 Thread gontran
Could you be more explicite because I don't understand everything and why not using my custom tag? (which works fine) On 12 nov, 14:43, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 12 nov, 14:25, gontran <[EMAIL PROTECTED]> wrote:> On 12 nov, 13:22, Steve > Holden <[EMAIL PROTECTED]> wrot

Re: Sending mass, yet personalised email newsletters using Django

2008-11-12 Thread Patrick J. Anderson
On Tue, 11 Nov 2008 00:27:06 -0800, [EMAIL PROTECTED] wrote: > Hello Patrick, > > On Nov 11, 1:53 am, "Patrick J. Anderson" <[EMAIL PROTECTED]> > wrote: >> >> Some of the main requirements are: >> >> * Personalised HTML/text messages >> * Manual delivery twice a week >> * Message logging/archivi

Re: How to get comment_count in view?

2008-11-12 Thread David.D
Thank you. It worked. On 11月2日, 下午6时11分, "Chatchai Neanudorn" <[EMAIL PROTECTED]> wrote: > from django.contrib.comments.models import Comment > from post.models import Post > > #get comments for model > Comment.objects.for_model(Post).count() > > #get comment for instance > Comment.objects.for_mo

Performing an operation

2008-11-12 Thread [EMAIL PROTECTED]
Hi all, Just building my first site with django and Ive hit my first snag that I cant find in the documentation. Just as an example scenario, suppose I have my model- class User(models.Model): signup_date = models.DateTimeField() full_user_date = models.DateTimeField() full_user =

Re: Recursive function

2008-11-12 Thread bruno desthuilliers
On 12 nov, 09:22, gontran <[EMAIL PROTECTED]> wrote: > Hello, > > I've got a problem with a recursive function: > in my model, I have a class named myClass: each object in my class has > an id, a parentId, and a name. > I want to make a list of all my objects that looks like this: > > object1

Re: user-registration

2008-11-12 Thread Alex S.
Hi, I'm not exactly getting your problem. If you can't import the module registration something went wrong in the installation. I don't get why you want to change the code of the application. The application works like a charm (once correct installed). Maybe you should read the documentation for

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread urukay
Don't know if I fully understand what u want, but in my opinion, the best solution is to have two forms (first for User and second for UserProfile, don't forget to connect them in SETTINGS). Duplicationg data is really not the right way I think. I my project, I use User.email to confirm the regis

Re: 'NoneType' object is not iterable

2008-11-12 Thread Javi
It works!! Thank you very much!! The django.root PythonOption stripped the initial "/" Greetings. On Nov 11, 11:54 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > Hi Javi, > > > I've tried putting FORCE_SCRIPT_NAME="" but everything continues at > > the same state. I'm running the app in Apache2/

Re: don't escape html tags

2008-11-12 Thread Karen Tracey
On Wed, Nov 12, 2008 at 4:20 AM, izzy <[EMAIL PROTECTED]> wrote: > > Hi. > > I'm new to Django. And I'm having problems with templates. > > I have a richtext field that stores HTML(using TinyMCE). But when I > display it on template it simply renders all in html: > > http://www.thesynapticleap.org

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread urukay
sorry Alex, i was not specific with that "connection" :-) so i mean this: http://docs.djangoproject.com/en/dev/topics/auth/?from=olddocs#storing-additional-information-about-users One form would be for creating USERs and the other one for creating UserProfiles (can use ModelForm). Never tried t

Re: TemplateDoesNotExist

2008-11-12 Thread [EMAIL PROTECTED]
This is running on Dreamhost, who doesn't allow running independent servers, so I am currently unable to test using the development server. I'll set something up on my local machine and see what happens. Thanks, Jason On Nov 11, 8:49 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2

Re: Performing an operation

2008-11-12 Thread Daniel Roseman
On Nov 12, 5:02 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi all, > Just building my first site with django and Ive hit my first snag that > I cant find in the documentation. > > Just as an example scenario, suppose I have my model- > > class User(models.Model): >     signup_date =  mod

Re: user-registration

2008-11-12 Thread Steve Holden
Maximus007 wrote: > Hi guys, > I am not able to change any of the file > ("views.py,""form.py,""models.py","urls.py") in user registration > module which I have installed in Python's sitepackages.It is giving me > permission denied msg. > I have to use email id as an username instead of seprate u

[Errno 13] Permission denied while using apache2

2008-11-12 Thread laspal
hi, I am trying to create folder. here is the code: if not os.path.isdir(str(_user.username)): os.mkdir(str(_user.username) ) filepathwithname = os.path.join(str(_user.username), file_name) if not os.path.isfile(filepathwithname): workbook.save(os.path.join(str(_user.u

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread Alex Koshelev
Hi, Alex! Look at the small merging framework [1]. It allows to track changes of objects and merge them when they change. Here is [2] a usage example formed as unit test:-) [1]: http://svn.turbion.org/turbion/trunk/turbion/utils/merging.py [2]: http://svn.turbion.org/turbion/trunk/turbion/utils/t

user-registration

2008-11-12 Thread Maximus007
Hi guys, I am not able to change any of the file ("views.py,""form.py,""models.py","urls.py") in user registration module which I have installed in Python's sitepackages.It is giving me permission denied msg. I have to use email id as an username instead of seprate username in my project. I have

Re: Performing an operation

2008-11-12 Thread [EMAIL PROTECTED]
Thanks for your help Daniel! I havent got hosting sorted yet so its something Ill have to set up later. I guess I can set up the custom command and do it manually for now. Phil On Nov 12, 5:29 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 12, 5:02 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTE

Re: Categorisation

2008-11-12 Thread bruno desthuilliers
On 11 nov, 21:41, coderb <[EMAIL PROTECTED]> wrote: > Hi All, > > I'm having trouble getting my head around how to set up my data entry > and queries, so that a listing/detail entry is categorised properly. > > firstly, my models look like this: > > class Category(models.Model): > name

creating django middleware

2008-11-12 Thread ershadul
Dear all, please consider the following code-block: class SQLAlchemySessionMiddleware(object): """ This class instantiates a sqlalchemy session and destroys """ def process_request(self, request): request.db_session = session() return None def process_response

Upload Form does not validate

2008-11-12 Thread Israel Fdez. Cabrera
Hi: I'm trying to upload some CSV file I need to import into a database; to do so I have the following Django form: class CaptureEquipmentForm(forms.Form): area = forms.FileField() equipo = forms.FileField() tipo = forms.FileField() this Django template: Capt

Re: Recursive function

2008-11-12 Thread Steve Holden
gontran wrote: > Merci beaucoup! > it works fine now. > >> Now, and while this is none of my problems, I'd seriously question the > decision of building html that way. This would be better done using > templates IMVHO. > > -> I'm using this function in a custom tag to build a menu And is there

Re: Upload Form does not validate

2008-11-12 Thread Adi Jörg Sieker
On 12.11.2008 18:52 Uhr, Israel Fdez. Cabrera wrote: > Hi: > > I'm trying to upload some CSV file I need to import into a database; > to do so I have the following Django form: > > [code snipped] > this Django template: > > > > > > [code snipped] > The problem is that in the view th

Re: Logout- Back Button

2008-11-12 Thread jai_python
hi.. i tried with logout_then_login method. But i am still facing that back button after logout issue.. any other suggestion? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Forbidden - install django under apache + modpython on windows...

2008-11-12 Thread durumdara
Hi! I have this problem: I set up the site by the djangobook in apache config. Everything is working but /img/ dir (media files) not. I used the Location directive, but it isn't working for me. After I set the DocumentRoot to point the docroot, I got 403 error. For the root ("/") too. Why???

Re: Two related select boxes, update the second depending on the first

2008-11-12 Thread Matias Surdi
This is exactly what I'm trying to do. Thanks for your help. Low Kian Seong escribió: > Have a go with this: > > > http://gtitsworth.blogspot.com/2007/07/chaining-selects-with-django-and-ajax.html > > On Wed, Nov 12, 2008 at 3:54 AM, Matias Surdi <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I wa

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread Alex S.
Thanks for your answers! @ urukay: So you would use two profile forms (for the two models - so I could use ModelForm) when you have one view that calls a template displaying both? There is no way known to me to pass two form classes to James Bennett's django-profiles. So you would just copy his c

Re: Upload Form does not validate

2008-11-12 Thread Daniel Roseman
On Nov 12, 5:52 pm, "Israel Fdez. Cabrera" <[EMAIL PROTECTED]> wrote: > Hi: > > I'm trying to upload some CSV file I need to import into a database; > to do so I have the following Django form: > > > > class CaptureEquipmentForm(forms.Form): >    area = forms.FileField() >    equipo = forms.FileF

Django Forums

2008-11-12 Thread IMTheNachoMan
I realize that Django uses google groups for discussions and what not but I was wondering how people felt about a Forum? Something with a little better UI and better organization. With respect to the UI, quotes and code would have separate blocks so they are easier to spot. With respect to organ

Re: TemplateDoesNotExist

2008-11-12 Thread [EMAIL PROTECTED]
I tried this using the development server on my local machine and got the same result: Template-loader postmortem Django tried loading these templates, in this order: * Using loader django.template.loaders.filesystem.load_template_source: o /django_projects/django_templates/polls/

Re: Template translation

2008-11-12 Thread davidynamic
On Nov 11, 1:12 pm, "Antoni Aloy" <[EMAIL PROTECTED]> wrote: > I have such a problem once and it was solved adding the application in > the config file. > > On the other hand, I assume you have extracted thetranslationstrings > and you're using the right language in your browser, that is the > la

Django newbie observation

2008-11-12 Thread ayayalar
I've been using Django for about 1-2 weeks now. I must say it is one of the most exciting web frameworks I ever worked with. It is clean, elegant, easy, and most importantly makes sense. I've tried to use many other MVC frameworks but Django is by far better. However I am also disappointed on a fe

Re: 404 Error HTTP_FORBIDDEN

2008-11-12 Thread Brandon Martin
Sorry it was as usual a stupid me error. I didn't have the correct document root set in the main apache conf file. Thanks -- Brandon On Wed, 12 Nov 2008 11:05:14 -0800 (PST), Raja <[EMAIL PROTECTED]> wrote: > > Did you get this working fine in a dev environment? Id assume that > everything und

App for creating "subsites"

2008-11-12 Thread Andreas
Hi, Using Pinax I am looking to create a site where users can create their own "subsites", ie similar to Ning.com or Wordpress.com. Each subsite will be administered by the user that created it, and several different Django Apps are needed to give each subsite the functionality it needs (photo ga

apache mod_wsgi/nginx config: different behaviors if www pre-pended

2008-11-12 Thread Serdar T.
Can someone offer advice on server deployment headaches involving apache/mod_wsgi/nginx? I seem to be having two problems: 1) Apache/mod_wsgi correctly serves dynamic content from a test app (located in a ~/public_html directory) when the url starts with "www". But apache reverts to serving the

Re: Apache Segmentation Fault on succesful authentication

2008-11-12 Thread huw_at1
echo '/usr/local/lib' >> /etc/ld.so.conf more /etc/ld.so.conf include ld.so.conf.d/*.conf /usr/local/lib ldd /usr/local/bin/python libpython2.5.so.1.0 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x0039a4a0) libdl.so.2 => /lib64/libdl.so.2 (0x0039

404 Error HTTP_FORBIDDEN

2008-11-12 Thread Brandon Martin
I had everything running fine with my django setup and apache vhost. My project root dir was: /home/user/public_html/django/project I wanted to change the dir so I moved everything to: /srv/django/project I went into my vhost and changed the paths so they correspond to the new ro

Re: Recursive function

2008-11-12 Thread David Christiansen
Hi gontran, Why not check out using one of the two tree libraries that are out there (django-mptt and treebeard)? They include functions for traversing trees already, and you save yourself a lot of work dealing with the schema stuff. We use django-mptt where I work to do exactly what you're desc

Re: Recursive function

2008-11-12 Thread gontran
Ok, thank you all for your help On 12 nov, 15:19, Steve Holden <[EMAIL PROTECTED]> wrote: > By all means use your custom tag. Inside the code for the tag, use a > template to generate the HTML. That's all! > > regards >  Steve > > gontran wrote: > > Could you be more explicite because I don't und

Re: Recursive function

2008-11-12 Thread gontran
Hello Steve, Maybe I'm wrong but I want to display this menu in all pages of my site, so by using a custom tag, I can display my menu without having to import my model in my different views. On 12 nov, 13:22, Steve Holden <[EMAIL PROTECTED]> wrote: > gontran wrote: > > Merci beaucoup! > > it wor

Re: Django newbie observation

2008-11-12 Thread Brian Neal
On Nov 12, 1:12 pm, ayayalar <[EMAIL PROTECTED]> wrote: > I've been using Django for about 1-2 weeks now. I must say it is one > of the most exciting > web frameworks I ever worked with. It is clean, elegant, easy, and > most importantly makes sense. > I've tried to use many other MVC frameworks b

Re: SECRET_KEY

2008-11-12 Thread Marty Alchin
On Tue, Nov 11, 2008 at 10:05 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-11-12 at 00:12 -0200, Juanjo Conti wrote: >> Is there any problem with changing my SECRET_KEY from a running project? > > Searching for all uses for the word SECRET_KEY in the source of Django > would ha

Re: App for creating "subsites"

2008-11-12 Thread Rock
First you have to figure out how you want to map your users to their pages. Do you want to use subdomains? How about something like the delicious.com scheme (i.e., http://delicious.com/username/ ) Or perhaps you have something else in mind. After you figure out your URL mapping, the rest looks li

Cannot set values on a ManyToManyField which specifies an intermediary model.

2008-11-12 Thread Radim Blazek
Hi, I specified an intermediate model for ManyToManyField with through argument but I am getting error if I save form (generated by contrib.admin): "Cannot set values on a ManyToManyField which specifies an intermediary model. Use GroupPermissions's Manager instead." The intermediate model is sp

Re: Turning key=value1&key=value2&key=value3 into a list

2008-11-12 Thread bruno desthuilliers
On 12 nov, 21:44, Peter Bengtsson <[EMAIL PROTECTED]> wrote: > If I publishhttp://someurl/myview?foo=1&foo=2&foo=3 > > How do I turn this into foo = ['1','2','3']? foo = request.GET.getlist('foo') http://docs.djangoproject.com/en/dev/ref/request-response/#querydict-objects --~--~-~--~-

Trouble extending User

2008-11-12 Thread joshuajenkins
So I'm doing basically what Chapter 12 references in the djangobook on how to add a profile to Users. All is well in terms of adding users and pulling out the profile with get_profile() on single users, but when I'm trying to pull out all Users in my view and append the profile data, I'm lost. B

Re: Trouble extending User

2008-11-12 Thread bruno desthuilliers
On 12 nov, 22:05, joshuajenkins <[EMAIL PROTECTED]> wrote: > So I'm doing basically what Chapter 12 references in the djangobook on > how to add a profile to Users. > > All is well in terms of adding users and pulling out the profile with > get_profile() on single users, but when I'm trying to p

Re: Trouble extending User

2008-11-12 Thread joshuajenkins
I'm not sure how I would call it from within the template. Ideally I'd like to call it from the view so I can manipulate that data before passing it to the template. Basically what I'm trying to do is split my Users up by a field in the profile and pass each of those lists individually to the te

Re: 404 Error HTTP_FORBIDDEN

2008-11-12 Thread Raja
Did you get this working fine in a dev environment? Id assume that everything under ~user/public_html will have Apache Location directive setup for allowing access and that might not be the case for other directories. Testing this on a sandbox environment should help to know where the problem is (

admin's media on apache

2008-11-12 Thread prem1er
Still having a problem from the other day. I can't get the media (css + images) to show up on my admin pages after I moved it over to Apache. I tried a sym link from /home/dev/Django-1.0/django/contrib/ admin/media/ to /home/dev/djprojects/xxx/media (my site root) and still no luck. I have also

Re: Apache Segmentation Fault on succesful authentication

2008-11-12 Thread marco ghidinelli
On Wed, Nov 12, 2008 at 03:22:02AM -0800, huw_at1 wrote: > > An update on this. > > 'which python' returns: > > libpython2.5.so.1.0 => not found > libpthread.so.0 => /lib64/libpthread.so.0 (0x0039a4a0) > libdl.so.2 => /lib64/libdl.so.2 (0x0039a460) >

Turning key=value1&key=value2&key=value3 into a list

2008-11-12 Thread Peter Bengtsson
If I publish http://someurl/myview?foo=1&foo=2&foo=3 How do I turn this into foo = ['1','2','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-user

Re: admin's media on apache

2008-11-12 Thread Brian Neal
On Nov 12, 3:32 pm, prem1er <[EMAIL PROTECTED]> wrote: > Still having a problem from the other day.  I can't get the media (css > + images) to show up on my admin pages after I moved it over to > Apache.  I tried a sym link from /home/dev/Django-1.0/django/contrib/ > admin/media/ to /home/dev/djpr

Re: [Errno 13] Permission denied while using apache2

2008-11-12 Thread Steve Holden
laspal wrote: > hi, > I am trying to create folder. > here is the code: > if not os.path.isdir(str(_user.username)): > os.mkdir(str(_user.username) ) > filepathwithname = os.path.join(str(_user.username), file_name) > if not os.path.isfile(filepathwithname): > workbook

slow django builtin webserver

2008-11-12 Thread Sven Richter
Hi all, i recently reinstalled my workingstation. Nothing wild, just changed from single hdd to a raid system. However, scince that day my django server has a horrible response on the new system. Loading the server takes up to ca. 5 secs and requesting a site from it the same amount of time. Fir

temperamental ImportError

2008-11-12 Thread sico
just an FYI here as have fixed the problem. was getting the error as described here http://groups.google.com/group/django-users/browse_thread/thread/04fa8425d18f9242 but only every so often then I noticed the ProcessID at the top of the error was always the same. Apache was running 11 p

Re: Django newbie observation

2008-11-12 Thread Ovnicraft
2008/11/12 ayayalar <[EMAIL PROTECTED]> > > I've been using Django for about 1-2 weeks now. I must say it is one > of the most exciting > web frameworks I ever worked with. It is clean, elegant, easy, and > most importantly makes sense. > I've tried to use many other MVC frameworks but Django is b

Re: Trouble extending User

2008-11-12 Thread joshuajenkins
Nevermind - was overcomplicating things as always. On Nov 12, 1:30 pm, joshuajenkins <[EMAIL PROTECTED]> wrote: > I'm not sure how I would call it from within the template. > > Ideally I'd like to call it from the view so I can manipulate that > data before passing it to the template. > > Basical

Re: admin's media on apache

2008-11-12 Thread prem1er
Overlooked that. AMAZING thank you thank you! On Nov 12, 4:36 pm, Brian Neal <[EMAIL PROTECTED]> wrote: > On Nov 12, 3:32 pm, prem1er <[EMAIL PROTECTED]> wrote: > > > > > Still having a problem from the other day.  I can't get the media (css > > + images) to show up on my admin pages after I

Re: Queries regarding Installation of Django.

2008-11-12 Thread urukay
1. download Django at http://www.djangoproject.com/download/ - file Django-1.0.tar.gz - or download SVN and use SVN to download latest Django version 2. download and install python 3. download and install SQL (MySQL, SQLite etc) guess, u'll be needing internet after all ;) R. sadeesh

General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread Alex S.
Hi guys, if you're using django-registration, auth and django-profiles there is a small but (at least for me) important bit of information missing in the documentation (or elsewhere; it's just completey absent at the moment). How to "merge" the data of the standard auth.User and the data for the

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread Alex S.
Hi urukay, I get your point with "to many fields in one template are not user- friendly" and agree totally. I will split up my data for users in a profile and a settings template where profile should contain: - firstname - lastname - email - birthdate - gender and settings should contain all the

Queries regarding Installation of Django.

2008-11-12 Thread sadeesh Arumugam
Hi friends, I'm a new bie to Django and i've a doubt in installing django in my Home pc. I've installed Linux Ubuntu in my PC. I want to install Django, do i need an internet connection. I didn't have Python, SVN or any other supporting files of Django. Please Guide me in this regard for install

Re: creating django middleware

2008-11-12 Thread Jeff FW
I also wrote middleware for SQLAlchemy--I'd post it, but it depends on other libraries that I wrote that I can't really share. What I found is that, at least while using the dev server, the process_response method would get called when serving media files, even if the process_request hadn't. So,

Dynamic Paths for File Uploads

2008-11-12 Thread Tim
Hi all - I have a site that allows users to upload files. I would like to store the files to settings.MEDIA_ROOT + os.sep + logged_in_user + os.sep + filename (that is, the files uploaded by a given user will be uploaded to a subdirectory of settings.MEDIA_ROOT specific to that user). I can't se

Re: Django Forums

2008-11-12 Thread Russell Keith-Magee
On Thu, Nov 13, 2008 at 3:37 AM, IMTheNachoMan <[EMAIL PROTECTED]> wrote: > > I realize that Django uses google groups for discussions and what not > but I was wondering how people felt about a Forum? Something with a > little better UI and better organization. Search the archives. This has come

Re: Performing an operation

2008-11-12 Thread Steve Holden
Just make sure when you *do* set your hosting up that you get shell (command line) access of some kind so you can set up the cron jobs. regards Steve [EMAIL PROTECTED] wrote: > Thanks for your help Daniel! I havent got hosting sorted yet so its > something Ill have to set up later. > I guess I

Re: apache mod_wsgi/nginx config: different behaviors if www pre-pended

2008-11-12 Thread Graham Dumpleton
On Nov 13, 6:48 am, "Serdar T." <[EMAIL PROTECTED]> wrote: > Can someone offer advice on server deployment headaches involving > apache/mod_wsgi/nginx? I seem to be having two problems: > > 1) Apache/mod_wsgi correctly serves dynamic content from a test app > (located in a ~/public_html director

Re: Apache Segmentation Fault on succesful authentication

2008-11-12 Thread Graham Dumpleton
On Nov 12, 11:44 pm, huw_at1 <[EMAIL PROTECTED]> wrote: > echo '/usr/local/lib' >> /etc/ld.so.conf > > more /etc/ld.so.conf > > include ld.so.conf.d/*.conf > /usr/local/lib > > ldd /usr/local/bin/python > >         libpython2.5.so.1.0 => not found >         libpthread.so.0 => /lib64/libpthread.s

Re: Permission denied while using apache2

2008-11-12 Thread Graham Dumpleton
On Nov 12, 11:44 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > laspal wrote: > > hi, > > I am trying to create folder. > > here is the code: > > if not os.path.isdir(str(_user.username)): > >          os.mkdir(str(_user.username) ) > > filepathwithname = os.path.join(str(_user.username), file_na

Re: Django newbie observation

2008-11-12 Thread Russell Keith-Magee
On Thu, Nov 13, 2008 at 4:12 AM, ayayalar <[EMAIL PROTECTED]> wrote: > > I know Django is new and improving. I just wanted to point out these > issues a newbie is might be facing. Thanks for taking the time to give us this feedback. However, I would point out that while you have told us what is w

Re: Dynamic Paths for File Uploads

2008-11-12 Thread Tim
Just to add some more information - I have been messing around with making the upload_to a callable, but I still have the same problem in that I need to build the path based on information that only exists during runtime (that is, a call to a view). Basically, I don't know the value of upload_to u

Testing system and alternate template languages

2008-11-12 Thread Erik
I am involved in a project that's using django with the mako_django package for template rendering. I'm working on the unit tests, but I'm running into the problem that the context and template are not returned after a query from the test client (the members in the response are empty). I'm assu

admin errors with null datefield in sqlite3

2008-11-12 Thread Jerry Stratton
When I set up a date_hierarchy on a DateField that has NULL values, the admin interface won't let me focus below year; when I click on a month, I get redirected to a URL ending in ?e=1. I'm using Django 1.0, sqlite3 (3.4.0). Here's the field definition: purchaseDate = models.DateField("Purchase

Re: Django Forums

2008-11-12 Thread joshuajenkins
I think this provides a significant barrier to those trying to adopt the language. While those that are used to mailing lists are fond of them I don't think the general development public is nearly as infatuated. People that might consider switching to Django from, say, PHP or ASP.NET will probabl

Re: Django Forums

2008-11-12 Thread Tom Badran
I would disagree, any developer worth his salt is already likely to be on multiple mailing lists, especially if they are just checking out django and not already using as their primary development platform. Forums are an absolutely nightmare as soon as you need to be on more that one, mailing lists

Re: Testing system and alternate template languages

2008-11-12 Thread Russell Keith-Magee
On Thu, Nov 13, 2008 at 9:58 AM, Erik <[EMAIL PROTECTED]> wrote: > > I am involved in a project that's using django with the mako_django > package for template rendering. I'm working on the unit tests, but > I'm running into the problem that the context and template are not > returned after a que

Re: slow django builtin webserver

2008-11-12 Thread Steve Holden
Sven Richter wrote: > > Hi all, > > i recently reinstalled my workingstation. Nothing wild, just > changed from single hdd to a raid system. However, scince > that day my django server has a horrible response on > the new system. > Loading the server takes up to ca. 5 secs and requesting > a sit

Re: Django Forums

2008-11-12 Thread Russell Keith-Magee
On Thu, Nov 13, 2008 at 10:13 AM, joshuajenkins <[EMAIL PROTECTED]> wrote: > > Personally, I detest the mail list format. There are forums out there > that aren't all about signatures and annoying avatars, Vanilla is > something that comes to mind. It's all about the presentation. I can't do anyt

Re: TemplateDoesNotExist

2008-11-12 Thread Karen Tracey
On Wed, Nov 12, 2008 at 1:39 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>wrote: > > I tried this using the development server on my local machine and got > the same result: > > Template-loader postmortem > > Django tried loading these templates, in this order: > >* Using loader > django.template.

Re: Django Forums

2008-11-12 Thread Gustavo Picón
Edit your google groups settings in https://groups.google.com/group/django-users/subscribe and set it to "No Email". Now bookmark the django web forum in https://groups.google.com/group/django-users/topics Also, an advantage of google groups is that chances are that the potential new user alread

Re: Django Forums

2008-11-12 Thread Nick Lo
> I think this provides a significant barrier to those trying to adopt > the language. While those that are used to mailing lists are fond of > them I don't think the general development public is nearly as > infatuated. People that might consider switching to Django from, say, > PHP or ASP.NET wi

Problem with named URL and parameters

2008-11-12 Thread Brandon Taylor
Hi everyone, So I have a question/problem with a named URL pattern... #urls.py url(r'^resources/conversions/(?P[-\w]+)/$', 'my_site.views.conversions', name='conversions'), This is a mostly static site, but I would like to be able to pass the "conversion_template" parameter to do a dynamic incl

Re: Django newbie observation

2008-11-12 Thread LeBurt
> I disagree with "Django is not easy to start for a newbie". Well... I disagree. Django IS tough, especially if you're from a PHP/ SQL school of thought. Don't get me wrong, I think it's worth toughing it out. How many times however have I been stuck on simple things, seeing the SQL I want but

Re: Setting Up Django on Vista and Creating a Database

2008-11-12 Thread John Antony
I have now used all your suggestions.. 1) Installed in C:\Python25\ (Marcelo Barbero) 2)Installed Python 2.5 instead of Python 2.6 (Karen Tracey) and finally 3)Added the environment variables in "path" (not PATH, should i create a new one named PATH) for both django and python. I installed d

Re: Problem with named URL and parameters

2008-11-12 Thread Karen Tracey
On Wed, Nov 12, 2008 at 10:27 PM, Brandon Taylor <[EMAIL PROTECTED]>wrote: > > Hi everyone, > > So I have a question/problem with a named URL pattern... > > #urls.py > url(r'^resources/conversions/(?P[-\w]+)/$', > 'my_site.views.conversions', name='conversions'), > > This is a mostly static site,

  1   2   >