RE: http://www.djangobook.com/en/2.0/chapter03/

2009-06-29 Thread djangonoob
Hi all, i am following the tutorial on the link in the subject, http://www.djangobook.com/en/2.0/chapter03/ and i ran into some trouble. from django.conf.urls.defaults import * from mysite.views import hello, current_datetime, h

Re: http://www.djangobook.com/en/2.0/chapter03/

2009-06-29 Thread djangonoob
oh 0k. thanks dude! I was about to declare that myself. Thanks! On Jun 29, 11:45 pm, Alex Gaynor wrote: > On Mon, Jun 29, 2009 at 10:39 AM, djangonoob wrote: > > > Hi all, > > i am following the tutorial on the link in the subject, > >http://www.djangobook.com/en/2.0/

using python libraries in django?

2009-07-06 Thread djangonoob
Hi all, i was wondering if we can use python libraries in Django? Do we need to type in any form of extra commands ? For instance, if i want to use the urllib library, how do i do that? Best Regards. --~--~-~--~~~---~--~~ You received this message because you are

uploaidng media files ( such as mp3, images ) tutorial/how-to?

2009-07-11 Thread djangonoob
Hi all, may i know how do i upload media files such as mp3 files, images using djanog? I understand that there is a documentation on file uploads at : http://docs.djangoproject.com/en/dev/topics/http/file-uploads/ However, i do not quite understand the interaction between the models, views and t

Re: uploaidng media files ( such as mp3, images ) tutorial/how-to?

2009-07-11 Thread djangonoob
hey, i've managed to fix the problem successfully. thank u for your time. On Jul 11, 5:38 pm, Daniel Roseman wrote: > On Jul 11, 9:11 am, djangonoob wrote: > > > > > Hi all, > > may i know how do i upload media files such as mp3 files, images using > > djano

unable to render images in development server despite following instructions on serving static files

2009-07-12 Thread djangonoob
hi all, what i am trying to do is as follows (development server ): 1) upload an image to my media/userimage/ directory and save the location in mysql ( this is successful ) 2) retrive the image by showing on a generated html page. But my image is not showing as if the tag src url is wrong. Howev

Errors in installing django-photologue, Help Please?

2009-07-12 Thread djangonoob
Hi all, I'm using django 1.02, python version 2.6.2 with PIL installed. I'm on a Ubuntu machine, 9.04. I'm attempting to install django- photologue-2.2 I've followed the instructions as given in the install.txt and readme.txt but after running the python setup.py install command, i received the

Error in install django-tagging, help pls?

2009-07-12 Thread djangonoob
Hi all, i'm using django 1.02 and python version 2.6.2. I'm on a ubuntu machine version 9.04. Django's running fine, but i have problems installing django-tagging. After running the command python setup.py install, i received the following error: error: /usr/local/lib/python2.6/dist-packages/tag

Re: Errors in installing django-photologue, Help Please?

2009-07-12 Thread djangonoob
that dir :-), > an easy way out is to run the setup.py script as root (for example via > sudo) > > another way is to point your PYTHONPATH to where the "photologue" app resides. > > > > On Sun, Jul 12, 2009 at 4:03 PM, djangonoob wrote: > > > Hi all, > &g

Re: Unable to show all images whose location is stored in mysql

2009-07-12 Thread djangonoob
oh, the error i am receiving is: Exception Value: 'QuerySet' object has no attribute 'image' On Jul 13, 9:41 am, djangonoob wrote: > Hi all. > > I have uploaded 4 images where their location is stored in mysql. > I have no problems rendering a single image.

Re: Unable to show all images whose location is stored in mysql

2009-07-12 Thread djangonoob
oh, i managed to fix it. On Jul 13, 9:50 am, djangonoob wrote: > oh, the error i am receiving is: > Exception Value: > > 'QuerySet' object has no attribute 'image' > > On Jul 13, 9:41 am, djangonoob wrote: > > > Hi all. > > > I have u

Unable to show all images whose location is stored in mysql

2009-07-12 Thread djangonoob
Hi all. I have uploaded 4 images where their location is stored in mysql. I have no problems rendering a single image. But i am unable to show all 4 images. I am trying to use a for loop to show all 4 images from the image_upload class on my_images.html template How do i fix this problem? anyth

Style sheet not working after shifting from desktop to laptop

2009-07-13 Thread djangonoob
Hi, I have developed a simple application on my desktop computer successfully using django 1.02, Ubuntu 9.04, python version 2.6.2 I copied my files over to my laptop computer and did the following: 1) ran the django-admin.py startproject projectName 2) cd to projectName folder, and ran the pytho

Complex form for a newbie with ImageField and ForeignField

2009-07-14 Thread djangonoob
I'm using django 1.02, Ubuntu 9.04, python 2.6.2 Issue: I am creating a simple application that allows users to upload images. I'm using the User from django.contrib.auth.models to manage my users. For the image class, i have a ForeignKey to the user and a ImageField to store my images My applic

Re: Complex form for a newbie with ImageField and ForeignField

2009-07-14 Thread djangonoob
False" in its model's field definition. > > class FormUpload(forms.ModelForm): > >     class Meta: >         model = ModelName >         exclude = ('user',) > > > > On Tue, Jul 14, 2009 at 5:53 PM, djangonoob wrote: > > > I'm using django 1.02, Ubu

Ajax-based generic views?

2009-07-22 Thread djangonoob
Hi all, i understand that this is a recurring topic. But i couldnt find any ajax-based generic views tutorials/threads, etc. How do we implement ajax-based generic views? BEst Rgds. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Ajax-based generic views?

2009-07-22 Thread djangonoob
l or google docs you are better off using pyjamas: http://pyjs.org/ You can use it with django. Btw you sent me a private email, it's better to post to django-users, others might join in in a discussion and the messages are available to the public. On Thu, Jul 23, 2009 at 4:19 AM, djangonoo

customization using form_class with generic views

2009-07-25 Thread djangonoob
I would like to use Django's generic views for create, update, delete operations. However, i am start with the first step: the create operation. What i want to do is to use the django.views.generic.create_update.create_object function, using the form_class as the required arguments. I would like

Re: customization using form_class with generic views

2009-07-26 Thread djangonoob
Not sure if this was the functionality you were looking > for. > > Cheers, > > Dan > > On Jul 25, 8:58 pm, djangonoob wrote: > > > I would like to use Django's generic views for create, update, delete > > operations. However, i am start with the first step

Re: customization using form_class with generic views

2009-07-26 Thread djangonoob
te = datetime.datetime.today() new_obj.save() # press_create.html {{ form.as_p }} On Jul 26, 12:33 pm, Dan Harris wrote: > Assuming that you set_sub_date() function just sets the publish date > to when the item was created and easy way to do this is in the model > > class PressRe

Re: customization using form_class with generic views

2009-07-26 Thread djangonoob
Hi Hebert, ok thanks i got what u mean. But what happens if my model is now like this: # models.py class Images(models.Model): title = models.CharField(max_length=200) images = models.ImageField(upload_to='userimages') user = models.ForeignKey(User) public = models.BooleanField()

Complex customization using generic views involving ImageField and ForeignKey(User)

2009-07-26 Thread djangonoob
I would like to use generic views to allow users to upload images, with the image linked ( via ForeignKey ) to the user id. The following is my code: ( a link to dpaste is here: http://dpaste.com/71693/ ) # models.py class PressRelease(models.Model): title = models.CharField(max_length=100)

how to use form_class with generic views?

2009-07-26 Thread djangonoob
Hi all, I am wondering how can i use form_class with generic views? FOr example, according to the online doc, http://docs.djangoproject.com/en/dev/ref/generic-views/ we can use form_class as a required argument for create_object , update_object, delete_object But the online doc stopped short on

Re: how to use form_class with generic views?

2009-07-26 Thread djangonoob
hi thanks for your reply. may i know if the code you wrote exists in urls.py? or can i seperate them as per normal? For example: # models.py class MyFormClass(ModelForm): class Meta: model = MyModelClass #urls.py urlpatterns = = patterns('', ‘django.views.generic.create_update.update_o

Re: how to use form_class with generic views?

2009-07-26 Thread djangonoob
oh by the way, i've tried your method and i received the error: 'NoneType' object is not callable May i know how do i solve this issue? Best Regards, Eugene On Jul 27, 12:15 pm, Vasil Vangelovski wrote: > First you create a ModelForm: > > from django.forms import ModelForm > from myproject.my

Re: how to use form_class with generic views?

2009-07-27 Thread djangonoob
se you should separate that code, and form classes usually > go in forms.py, models in models.py. > Second, you are getting a 'NoneType object is not callable' beacause of > what you have in urls.py. Look at that carefully and you'll figure it out. > > djangonoob wrote: > &

Re: using python libraries in django?

2009-08-08 Thread djangonoob
Jul 6, 2009 at 8:30 AM, djangonoob wrote: > > > Hi all, > > i was wondering if we can use python libraries in Django? > > > Do we need to type in any form of extra commands ? > > > For instance, if i want to use the urllib library, how do i do that? > > > Be

Re: how much python do i need to know to learn/use Django?

2009-08-14 Thread djangonoob
hey, just some personal tips from my personal learning journey. I started off by learning the basics and syntax of python ( such as how the functions look like, the for loop, ifs else etc cos it is slightly different ). I read teh book : Dive into python which is available free online. I only rea

Unable to upload images via customized form

2009-08-24 Thread djangonoob
Hi all, I am creating a form ( a customized one ) which tries to upload ( bind ) an image file and save the file into my directory ( and its location in mysql database ) The code is right here : # views.py def customized_form(request): if request.method == 'POST': form = CustomizedFo

Re: cannot store images into file system using Imageupload

2009-08-24 Thread djangonoob
hi Ronghui, may i know what do u mean by "didnt save the file" using the form save () method? Do u mean that in Guptha's views.py, the function should have: form.save() in order to save the image? Best Regards. On Jul 24, 7:20 pm, Ronghui Yu wrote: > You didn't save the file in the form save(

Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi. I am new to django and never had to specify more than one TEMPLATE_DIRS. I am trying to add a second TEMPLATE_DIR to my existing one which looks like this: TEMPLATE_DIRS = [ os_path.join(PROJECT_PATH, 'templates'), ) The template I would also like to add is under templates/photologue. Ho

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Yes I noticed that we both had made typos :) No worries I tried your first example and I will now use this one which I am sure will work. Thank you very much. On Jan 27, 10:37 am, Mike Ramirez wrote: > On Wednesday 27 January 2010 00:32:24 Mike Ramirez wrote: > > > base_tmpl_dir = os_pa

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Yes I noticed that we both had made typos :) No worries I tried your first example and I will now use this one which I am sure will work. Thank you very much. On Jan 27, 10:37 am, Mike Ramirez wrote: > On Wednesday 27 January 2010 00:32:24 Mike Ramirez wrote: > > > base_tmpl_dir = os_pa

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Yes I noticed that we both had made typos :) No worries I tried your first example and I will now use this one which I am sure will work. Thank you very much. On Jan 27, 10:37 am, Mike Ramirez wrote: > On Wednesday 27 January 2010 00:32:24 Mike Ramirez wrote: > > > base_tmpl_dir = os_pa

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Unfortunately it is still not displaying the templates in the templates/photologue directory. I tried your idea. Is there anything else you can suggest? Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Unfortunately it is still not displaying the templates in the templates/photologue directory. I tried your idea. Is there anything else you can suggest? Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Unfortunately it is still not displaying the templates in the templates/photologue directory. I tried your idea. Is there anything else you can suggest? Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Unfortunately it is still not displaying the templates in the templates/photologue directory. I tried your idea. Is there anything else you can suggest? Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Hi Mike, Unfortunately it is still not displaying the templates in the templates/photologue directory. I tried your idea. Is there anything else you can suggest? Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Thank you it was my template directory which actually was templates/ photologue/templates. Still, your help was what led me to the result. Take good care -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Multiple template_dirs?

2010-01-27 Thread djangonoob
Thank you it was my template directory which actually was templates/ photologue/templates. Still, your help was what led me to the result. Take good care -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Creating an external url in the django admin section

2010-02-07 Thread djangonoob
Hi all. If someone could please help me as I am very new to django and getting desperate for help. The issue is as follows: For one of my apps in 'INSTALLED APPS' I need to add a link in the admin section that will cause the stats to be downloaded. The URL for this link is /questionnaire/export_

Single Login for two different applications?

2010-02-09 Thread djangonoob
Hello, I have the following problem which I hope someone could shed some light on. In my project I have the main site with login. I now implemented a questionnaire app that also requires a login. It would be great if someone could help me to take the first login from the main site and also enter

Downloadable CSV file of Survey?

2010-02-17 Thread djangonoob
Hi I have a quick question. I am currently using django-survey and was wondering if there is any way of downloading the results into a CSV format. It is a nice app but the download function is surely very important. Another way I though of was to write the results to CSV myself with csv writer bu