Re: disabling south for running tests

2011-11-26 Thread Chris Northwood
On 25 November 2011 23:59, Gelonida N  wrote:
> Hi,
>
> As for testing the database is created from scratch and as migrations
> are not really needed in this case I decided to disable south for
> running tests.
>
> I just wondered whether there were alternative /  more elegant ways.

There's a setting built into South which does this:
SOUTH_TESTS_MIGRATE
[http://south.aeracode.org/docs/settings.html#south-tests-migrate]

Regards,

Chris Northwood

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Bulk import of data

2011-11-26 Thread Fabio Natali

On 11/25/2011 05:23 PM, Fabio Natali wrote:

On 11/25/2011 03:12 PM, Tom Evans wrote:
[...]

It's not that tricky, is it?

Read the CSV file, split out the fields.
Get or create the category
Get or create the subcategory
Get or create the product

in code:

import csv
data = csv.reader(open('/path/to/csv', 'r'), delimiter=';')
for row in data:
category = Category.objects.get_or_create(name=row[0])
sub_category = SubCategory.objects.get_or_create(name=row[1],
defaults={'parent_category': category})
product = Product.objects.get_or_create(name=row[2],
defaults={'sub_category': sub_category})

http://docs.python.org/library/csv.html


Hey Tom, that's very kind of you, so helpful and fast!

I'll use that in my real scenario (which is a bit more complicated).
I'll be back here soon, reporting success :-) or asking for more help!

Cheers!


It works like a charm! Thanks again Tom.

--
Fabio Natali

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Where is redirect uri set? (Using Django on Heroku with django-la-facebook)

2011-11-26 Thread Riku
Hi!

I'm using Django with Heroku and django-la-facebook (https://
github.com/cartwheelweb/django-la-facebook)

I'm having trouble allowing Facebook authentication, but I actually
don't think my problem is very difficult.

When I try to sign-in with facebook, it throws me to the following
uri:

https://graph.facebook.com/oauth/authorizeredirect_uri=http%3A%2F%2Fexample.com%2Fla_facebook%2Fcallback&display=page&client_id=126197457491070

That redirect uri there is obviously not correct, but I can't find
where to set it? Would anyone have any idea? In my Django code,
Facebook or ?

Thanks for any help. That page gives me the following error:

{
   "error": {
  "message": "Invalid redirect_uri: Given URL is not permitted by
the application configuration.",
  "type": "OAuthException"
   }
}

Thanks a lot!

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: post_save problem

2011-11-26 Thread akshar raaj
Hi,

Let's assume your first model on which you want to have post_save be
User(django.contrib.auth.models.User). Say, you want to alter the data
of some other model whenever a User is saved i.e post_save for User.
Let's say this model as "MyModel". The code which you want to run on
post_save goes in a file, let's say "code_on_post_save.py". Let's name
the function which contains this code as "post_save_function". So, the
content of code_on_post_save.py becomes as follows

def post_save_function(sender, **kwargs):
abc = MyModel.objects.get(somefield='def')
abc.someotherfield = 'pqr'
.
.
abc.save()
..

Now you need to "connect" this code with your "User" model so that it
runs on "post_save" for the User. This can be done in any of your
views. Let's assume that as "views.py" of your app X.

So, in views.py you need to add this code. (You can have this code in
addition to whatever you normally have in your views.py)

from code_on_post_save import post_save_function
from django.db.models.signals import post_save
from django.contrib.auth.models import User

post_save.connect(post_save_function, sender=User)

I hope this suffice.

Thanks,
Akshar
So, in any of your other view, you need to
On Nov 26, 1:46 am, Vitor Duarte Venâncio 
wrote:
> Greetings.
> I'm trying to do a post_save command in a page oriented to one specific
> class, and make this post_save alter some data that's stored in objects of
> another class.
> Anyone has an example or guidance that can help?
> Thank you very much.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: post_save problem

2011-11-26 Thread Vitor Duarte Venâncio
Thank you very much for the answer, but I'm still having issues.

I've declared the funcion on the class that will be monitored for changing,
let's say, MyModelA. And then, in the view that controls the changes for
objects of the model I want to change, in this case MyModelB, I've used the
post_save.connect, just as you told me to.

But whe I try to do any sanity checks (i.e print('test')) in the
post_save_function, I end up with nothing. I don't get any error messages,
but the function is just not being called when I issue a save for MyModelA.

I've tried relocating the connect code in the views.py archive, but nothing
seems to make it work. How can I proceed?

On Sat, Nov 26, 2011 at 11:54 AM, akshar raaj  wrote:

> Hi,
>
> Let's assume your first model on which you want to have post_save be
> User(django.contrib.auth.models.User). Say, you want to alter the data
> of some other model whenever a User is saved i.e post_save for User.
> Let's say this model as "MyModel". The code which you want to run on
> post_save goes in a file, let's say "code_on_post_save.py". Let's name
> the function which contains this code as "post_save_function". So, the
> content of code_on_post_save.py becomes as follows
>
> def post_save_function(sender, **kwargs):
>abc = MyModel.objects.get(somefield='def')
>abc.someotherfield = 'pqr'
>.
>.
>abc.save()
>..
>
> Now you need to "connect" this code with your "User" model so that it
> runs on "post_save" for the User. This can be done in any of your
> views. Let's assume that as "views.py" of your app X.
>
> So, in views.py you need to add this code. (You can have this code in
> addition to whatever you normally have in your views.py)
>
> from code_on_post_save import post_save_function
> from django.db.models.signals import post_save
> from django.contrib.auth.models import User
>
> post_save.connect(post_save_function, sender=User)
>
> I hope this suffice.
>
> Thanks,
> Akshar
> So, in any of your other view, you need to
> On Nov 26, 1:46 am, Vitor Duarte Venâncio 
> wrote:
> > Greetings.
> > I'm trying to do a post_save command in a page oriented to one specific
> > class, and make this post_save alter some data that's stored in objects
> of
> > another class.
> > Anyone has an example or guidance that can help?
> > Thank you very much.
>
> --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Vitor Duarte Venâncio
Graduando em Ciência da Computação
Estagiario - FICRM
vitor.dua...@ficrm.com

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Cache timeout

2011-11-26 Thread Addy Yeow
If I use cache_page() decorator for my view function, will the TIMEOUT be
able to take precedence over CACHE_MIDDLEWARE_SECONDS?

In my settings.py,

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': os.path.join(WEB_ROOT, "django_cache"),
'TIMEOUT': 5184000,
}
}
CACHE_MIDDLEWARE_SECONDS = 86400

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django - ValidationError on saving a model instance containing DateField

2011-11-26 Thread luke lukes
hi everyone. I'm working on this view: http://dpaste.com/661995/ and i
have a ValidationError while trying to save the model instance. the
error is 'Enter a valid date in -MM-DD format'. the datefield is
correctly filled, the type of instance passed to model is unicode. I
have to do something like a cast from unicode to datetime or there's
something i'm doing wrong before...?

this is the traceback: http://dpaste.com/661996/

any idea? thanx

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Error in running the django server

2011-11-26 Thread Mauro
Hello,

I'm trying to run the django server on my mac book pro 2011 with osx
lion but I get an error.

I'm using the mamp mysql database and I've already configured it
inside the setting file.

When I try to run the command:
python manage.py runserver

I got this error:

Validating models...

Unhandled exception in thread started by >
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/django/core/management/
commands/runserver.py", line 88, in inner_run
self.validate(display_num_errors=True)
  File "/Library/Python/2.7/site-packages/django/core/management/
base.py", line 249, in validate
num_errors = get_validation_errors(s, app)
  File "/Library/Python/2.7/site-packages/django/core/management/
validation.py", line 28, in get_validation_errors
from django.db import models, connection
  File "/Library/Python/2.7/site-packages/django/db/__init__.py", line
78, in 
connection = connections[DEFAULT_DB_ALIAS]
  File "/Library/Python/2.7/site-packages/django/db/utils.py", line
93, in __getitem__
backend = load_backend(db['ENGINE'])
  File "/Library/Python/2.7/site-packages/django/db/utils.py", line
33, in load_backend
return import_module('.base', backend_name)
  File "/Library/Python/2.7/site-packages/django/utils/importlib.py",
line 35, in import_module
__import__(name)
  File "/Library/Python/2.7/site-packages/django/db/backends/mysql/
base.py", line 14, in 
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: dlopen(/Users/maranomauro/.python-eggs/MySQL_python-1.2.3-
py2.7-macosx-10.7-intel.egg-tmp/_mysql.so, 2): Library not loaded: /
usr/local/lib/libmysqlclient.18.dylib
  Referenced from: /Users/maranomauro/.python-eggs/MySQL_python-1.2.3-
py2.7-macosx-10.7-intel.egg-tmp/_mysql.so
  Reason: image not found

I think the error is from the mysql-python requirments.

But I've already installed it using easy_install.

Maybe there is some problem with the mamp database?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Installation of Django

2011-11-26 Thread JJ Zolper
Thanks! Yes sounds like something from my UNIX class. I have now added it.

What will django-admin.py do for me? Oh are you just saying I can run it
from anywhere now? Any of the commands I want to work with python/django?

JJ

On Sat, Nov 26, 2011 at 12:56 AM, Timothy Makobu <
makobu.mwambir...@gmail.com> wrote:

> Yes, iPython is installed now. But now you need to add  C:\Python27\Scripts
> to your PATH variable, so you wont have to keep going there to run things.
> After you add it, you can run django-admin.py, easy_install, iPython ...
> from any directory in cmd.exe
>
> This link shows you how:
> http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
>
>
>
>
> On Sat, Nov 26, 2011 at 12:49 AM, JJ Zolper  wrote:
>
>> Tim,
>>
>> Okay I was able to get something to go there.
>>
>> At first I saw warnings so I wasn't sure but here are the images.
>>
>> http://madtrak.com/ipython1.png
>>
>> http://madtrak.com/ipython2.png
>>
>> Do you think I am in good shape with ipython?
>>
>> To perform the easy install of django would i execute: easy_install.exe
>> django?
>>
>> And if so would that just overwrite what I have already installed, like
>> would it be good to do it a second time even though I think it worked the
>> first. Honestly, I'd probably leave it for now just wanted your thoughts on
>> easy install.
>>
>> Thanks!
>>
>> JJ
>>
>> On Fri, Nov 25, 2011 at 1:20 PM, Timothy Makobu <
>> makobu.mwambir...@gmail.com> wrote:
>>
>>> Hi, you're welcome.
>>>
>>> Easy install is usually in C:\Python27\Scripts
>>>
>>> you can go there from within cmd.exe and run "easy_install.exe ipython"
>>>  It should work.
>>>
>>>
>>> On Fri, Nov 25, 2011 at 7:56 PM, JJ Zolper  wrote:
>>>
 Tim,

 I had a confirmation from William that I installed Django but you said
 iPython would be helpful and since I don't remember much Python I was
 hoping to make that work.

 Thanks so much for taking the time to help me get started you're a
 life saver! : )

 JJ

 On Nov 24, 11:56 pm, Timothy Makobu 
 wrote:
 >- Install setup toolshttp://pypi.python.org/pypi/setuptools/0.6c11
 >- Go to the command line (cmd.exe) and type
 >   - easy_install django
 >   - easy_install ipython (not needed by django, but very useful,
 as you
 >   will see when you come to running "python manage.py shell"
 >
 > That's all!
 >
 >
 >
 >
 >
 >
 >
 > On Fri, Nov 25, 2011 at 3:59 AM, JJ Zolper  wrote:
 > > Okay just so everyone knows!
 >
 > > I was able to extract the .tar file and I now see the files.
 >
 > > In order to import these files correctly should I place these files
 in the
 > > install directory of Python 2.7 and then attempt the commands?
 >
 > > Or is the location of Django just arbitrary can I place it wherever
 I like
 > > and then work from the Python prompt?
 >
 > > JJ
 >
 > > On Thu, Nov 24, 2011 at 11:58 AM, Ivo Brodien 
 wrote:
 >
 > >> windows users have extracted your command will look like this:
 ...
 > >> to execute the .tar file.
 >
 > >> as tom mentioned, you have to use 7zip two times.
 >
 > >> the tar file is another archive (like .zip, .gz ) which you have to
 > >> decompress and then you have the django directory and you can go
 on with
 > >> the tutorial.
 >
 > >> On Nov 24, 2011, at 17:55 , JJ Zolper wrote:
 >
 > >> JoeLinux,
 >
 > >> Oh interesting. It seems the 64 bit version is sort of unclear. Any
 > >> help there?
 >
 > >> Would I be able to install my Python is well with a smaller
 command? I
 > >> am back at ground zero because I had to adjust the Python version
 back
 > >> to 2.5 so Django would agree.
 >
 > >> I am interested just not sure how to work the 64 bit version.
 >
 > >> Thanks!
 >
 > >> JJ
 >
 > >> On Nov 24, 11:40 am, Joey Espinosa 
 wrote:
 >
 > >> If you install the "setuptools" package (http://goo.gl/UjFh),
 then all
 > >> you
 >
 > >> have to do to install Django (or any other Python library) is this:
 >
 > >> easy_install django
 >
 > >> And it will handle the rest. Just a suggestion.
 >
 > >> --
 >
 > >> Joey "JoeLinux" Espinosa
 >
 > >> Software Developerhttp://about.me/joelinux
 >
 > >> On Nov 24, 2011 10:37 AM, "Tom Evans" 
 wrote:
 >
 > >> On Thu, Nov 24, 2011 at 5:00 AM, JJ Zolper 
 wrote:
 >
 > >> Hello,
 >
 > >> I am new to Django! I was able to download and install: Python
 2.7.2
 >
 > >> x86 64 on my Windows 7 64 bit machine. I think that is all that I
 will
 >
 > >> need to execute the command line?
 >
 > >> I installed Python to C:/Python27 as the program intended.
 >
 > >> I then do

Re: Installation of Django

2011-11-26 Thread JJ Zolper
Looks like I am in good shape!

Thanks so much man!

http://madtrak.com/success.png

JJ

On Sat, Nov 26, 2011 at 1:51 PM, JJ Zolper  wrote:

> Thanks! Yes sounds like something from my UNIX class. I have now added it.
>
> What will django-admin.py do for me? Oh are you just saying I can run it
> from anywhere now? Any of the commands I want to work with python/django?
>
> JJ
>
>
> On Sat, Nov 26, 2011 at 12:56 AM, Timothy Makobu <
> makobu.mwambir...@gmail.com> wrote:
>
>> Yes, iPython is installed now. But now you need to add  C:\Python27\Scripts
>> to your PATH variable, so you wont have to keep going there to run things.
>> After you add it, you can run django-admin.py, easy_install, iPython ...
>> from any directory in cmd.exe
>>
>> This link shows you how:
>> http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
>>
>>
>>
>>
>> On Sat, Nov 26, 2011 at 12:49 AM, JJ Zolper  wrote:
>>
>>> Tim,
>>>
>>> Okay I was able to get something to go there.
>>>
>>> At first I saw warnings so I wasn't sure but here are the images.
>>>
>>> http://madtrak.com/ipython1.png
>>>
>>> http://madtrak.com/ipython2.png
>>>
>>> Do you think I am in good shape with ipython?
>>>
>>> To perform the easy install of django would i execute: easy_install.exe
>>> django?
>>>
>>> And if so would that just overwrite what I have already installed, like
>>> would it be good to do it a second time even though I think it worked the
>>> first. Honestly, I'd probably leave it for now just wanted your thoughts on
>>> easy install.
>>>
>>> Thanks!
>>>
>>> JJ
>>>
>>> On Fri, Nov 25, 2011 at 1:20 PM, Timothy Makobu <
>>> makobu.mwambir...@gmail.com> wrote:
>>>
 Hi, you're welcome.

 Easy install is usually in C:\Python27\Scripts

 you can go there from within cmd.exe and run "easy_install.exe ipython"
  It should work.


 On Fri, Nov 25, 2011 at 7:56 PM, JJ Zolper  wrote:

> Tim,
>
> I had a confirmation from William that I installed Django but you said
> iPython would be helpful and since I don't remember much Python I was
> hoping to make that work.
>
> Thanks so much for taking the time to help me get started you're a
> life saver! : )
>
> JJ
>
> On Nov 24, 11:56 pm, Timothy Makobu 
> wrote:
> >- Install setup toolshttp://
> pypi.python.org/pypi/setuptools/0.6c11
> >- Go to the command line (cmd.exe) and type
> >   - easy_install django
> >   - easy_install ipython (not needed by django, but very useful,
> as you
> >   will see when you come to running "python manage.py shell"
> >
> > That's all!
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Nov 25, 2011 at 3:59 AM, JJ Zolper 
> wrote:
> > > Okay just so everyone knows!
> >
> > > I was able to extract the .tar file and I now see the files.
> >
> > > In order to import these files correctly should I place these
> files in the
> > > install directory of Python 2.7 and then attempt the commands?
> >
> > > Or is the location of Django just arbitrary can I place it
> wherever I like
> > > and then work from the Python prompt?
> >
> > > JJ
> >
> > > On Thu, Nov 24, 2011 at 11:58 AM, Ivo Brodien 
> wrote:
> >
> > >> windows users have extracted your command will look like this:
> ...
> > >> to execute the .tar file.
> >
> > >> as tom mentioned, you have to use 7zip two times.
> >
> > >> the tar file is another archive (like .zip, .gz ) which you have
> to
> > >> decompress and then you have the django directory and you can go
> on with
> > >> the tutorial.
> >
> > >> On Nov 24, 2011, at 17:55 , JJ Zolper wrote:
> >
> > >> JoeLinux,
> >
> > >> Oh interesting. It seems the 64 bit version is sort of unclear.
> Any
> > >> help there?
> >
> > >> Would I be able to install my Python is well with a smaller
> command? I
> > >> am back at ground zero because I had to adjust the Python version
> back
> > >> to 2.5 so Django would agree.
> >
> > >> I am interested just not sure how to work the 64 bit version.
> >
> > >> Thanks!
> >
> > >> JJ
> >
> > >> On Nov 24, 11:40 am, Joey Espinosa 
> wrote:
> >
> > >> If you install the "setuptools" package (http://goo.gl/UjFh),
> then all
> > >> you
> >
> > >> have to do to install Django (or any other Python library) is
> this:
> >
> > >> easy_install django
> >
> > >> And it will handle the rest. Just a suggestion.
> >
> > >> --
> >
> > >> Joey "JoeLinux" Espinosa
> >
> > >> Software Developerhttp://about.me/joelinux
> >
> > >> On Nov 24, 2011 10:37 AM, "Tom Evans" 
> wrote:
> >
> > >> On Thu, Nov 24, 2011 at 5:00 AM, JJ Zolper 
> wrote:
> >
> > >> He

Re: disabling south for running tests

2011-11-26 Thread Gelonida N
Hi Chris,

Thanks a lot.

On 11/26/2011 09:51 AM, Chris Northwood wrote:
> On 25 November 2011 23:59, Gelonida N  wrote:

>> As for testing the database is created from scratch and as migrations
>> are not really needed in this case I decided to disable south for
>> running tests.
>>
>> I just wondered whether there were alternative /  more elegant ways.
> 
> There's a setting built into South which does this:
> SOUTH_TESTS_MIGRATE
> [http://south.aeracode.org/docs/settings.html#south-tests-migrate]
> 

I will use SOUTH_TESTS_MIGRATE=True.
This is nicer than my 'workaround'

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Installation of Django

2011-11-26 Thread Timothy Makobu
Nice. Now read ALL of this http://djangobook.com/en/2.0/


On Sat, Nov 26, 2011 at 9:55 PM, JJ Zolper  wrote:

> Looks like I am in good shape!
>
> Thanks so much man!
>
> http://madtrak.com/success.png
>
> JJ
>
>
> On Sat, Nov 26, 2011 at 1:51 PM, JJ Zolper  wrote:
>
>> Thanks! Yes sounds like something from my UNIX class. I have now added it.
>>
>> What will django-admin.py do for me? Oh are you just saying I can run it
>> from anywhere now? Any of the commands I want to work with python/django?
>>
>> JJ
>>
>>
>> On Sat, Nov 26, 2011 at 12:56 AM, Timothy Makobu <
>> makobu.mwambir...@gmail.com> wrote:
>>
>>> Yes, iPython is installed now. But now you need to add  C:\Python27\Scripts
>>> to your PATH variable, so you wont have to keep going there to run things.
>>> After you add it, you can run django-admin.py, easy_install, iPython ...
>>> from any directory in cmd.exe
>>>
>>> This link shows you how:
>>> http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
>>>
>>>
>>>
>>>
>>> On Sat, Nov 26, 2011 at 12:49 AM, JJ Zolper  wrote:
>>>
 Tim,

 Okay I was able to get something to go there.

 At first I saw warnings so I wasn't sure but here are the images.

 http://madtrak.com/ipython1.png

 http://madtrak.com/ipython2.png

 Do you think I am in good shape with ipython?

 To perform the easy install of django would i execute: easy_install.exe
 django?

 And if so would that just overwrite what I have already installed, like
 would it be good to do it a second time even though I think it worked the
 first. Honestly, I'd probably leave it for now just wanted your thoughts on
 easy install.

 Thanks!

 JJ

 On Fri, Nov 25, 2011 at 1:20 PM, Timothy Makobu <
 makobu.mwambir...@gmail.com> wrote:

> Hi, you're welcome.
>
> Easy install is usually in C:\Python27\Scripts
>
> you can go there from within cmd.exe and run "easy_install.exe
> ipython"  It should work.
>
>
> On Fri, Nov 25, 2011 at 7:56 PM, JJ Zolper  wrote:
>
>> Tim,
>>
>> I had a confirmation from William that I installed Django but you said
>> iPython would be helpful and since I don't remember much Python I was
>> hoping to make that work.
>>
>> Thanks so much for taking the time to help me get started you're a
>> life saver! : )
>>
>> JJ
>>
>> On Nov 24, 11:56 pm, Timothy Makobu 
>> wrote:
>> >- Install setup toolshttp://
>> pypi.python.org/pypi/setuptools/0.6c11
>> >- Go to the command line (cmd.exe) and type
>> >   - easy_install django
>> >   - easy_install ipython (not needed by django, but very
>> useful, as you
>> >   will see when you come to running "python manage.py shell"
>> >
>> > That's all!
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Fri, Nov 25, 2011 at 3:59 AM, JJ Zolper 
>> wrote:
>> > > Okay just so everyone knows!
>> >
>> > > I was able to extract the .tar file and I now see the files.
>> >
>> > > In order to import these files correctly should I place these
>> files in the
>> > > install directory of Python 2.7 and then attempt the commands?
>> >
>> > > Or is the location of Django just arbitrary can I place it
>> wherever I like
>> > > and then work from the Python prompt?
>> >
>> > > JJ
>> >
>> > > On Thu, Nov 24, 2011 at 11:58 AM, Ivo Brodien 
>> wrote:
>> >
>> > >> windows users have extracted your command will look like this:
>> ...
>> > >> to execute the .tar file.
>> >
>> > >> as tom mentioned, you have to use 7zip two times.
>> >
>> > >> the tar file is another archive (like .zip, .gz ) which you have
>> to
>> > >> decompress and then you have the django directory and you can go
>> on with
>> > >> the tutorial.
>> >
>> > >> On Nov 24, 2011, at 17:55 , JJ Zolper wrote:
>> >
>> > >> JoeLinux,
>> >
>> > >> Oh interesting. It seems the 64 bit version is sort of unclear.
>> Any
>> > >> help there?
>> >
>> > >> Would I be able to install my Python is well with a smaller
>> command? I
>> > >> am back at ground zero because I had to adjust the Python
>> version back
>> > >> to 2.5 so Django would agree.
>> >
>> > >> I am interested just not sure how to work the 64 bit version.
>> >
>> > >> Thanks!
>> >
>> > >> JJ
>> >
>> > >> On Nov 24, 11:40 am, Joey Espinosa 
>> wrote:
>> >
>> > >> If you install the "setuptools" package (http://goo.gl/UjFh),
>> then all
>> > >> you
>> >
>> > >> have to do to install Django (or any other Python library) is
>> this:
>> >
>> > >> easy_install django
>> >
>> > >> And it will handle the rest. Just a suggestion.
>> >
>

Re: django testing with postgres without permissions to create databases

2011-11-26 Thread Gelonida N
On 11/26/2011 01:23 AM, Gelonida N wrote:
> It seems I'm not the first one who wans to run django tests with
> postgressql and who doesn't have permissions to create databases.
> 
> I found two suggestions on the web:
> 
> One is to use sqlite for testing instead of postgres.
> However I'm not really happy with this solution, as sqlite is less
> sensitive to sloppyness in the code. I encountered already some issues
> only with postgres, but not with sqlite.
> 
> The other suggestion, that I found is implementing a custom test runner,
> that adapts setup_databases()
> 
> I'll probably try that approach, but was curious about other potential
> tricks.
> 

For the time being I just followed a third path, which is requesting
create privileges.

I could still imagine, that it would be a good idea for some users, if
the default test runner were able handle situations where one has no
create database privileges.


-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Installation of Django

2011-11-26 Thread Timothy Makobu
But first, all of this http://docs.python.org/tutorial/index.html


On Sat, Nov 26, 2011 at 10:19 PM, Timothy Makobu <
makobu.mwambir...@gmail.com> wrote:

> Nice. Now read ALL of this http://djangobook.com/en/2.0/
>
>
> On Sat, Nov 26, 2011 at 9:55 PM, JJ Zolper  wrote:
>
>> Looks like I am in good shape!
>>
>> Thanks so much man!
>>
>> http://madtrak.com/success.png
>>
>> JJ
>>
>>
>> On Sat, Nov 26, 2011 at 1:51 PM, JJ Zolper  wrote:
>>
>>> Thanks! Yes sounds like something from my UNIX class. I have now added
>>> it.
>>>
>>> What will django-admin.py do for me? Oh are you just saying I can run it
>>> from anywhere now? Any of the commands I want to work with python/django?
>>>
>>> JJ
>>>
>>>
>>> On Sat, Nov 26, 2011 at 12:56 AM, Timothy Makobu <
>>> makobu.mwambir...@gmail.com> wrote:
>>>
 Yes, iPython is installed now. But now you need to add  C:\Python27\Scripts
 to your PATH variable, so you wont have to keep going there to run things.
 After you add it, you can run django-admin.py, easy_install, iPython ...
 from any directory in cmd.exe

 This link shows you how:
 http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx




 On Sat, Nov 26, 2011 at 12:49 AM, JJ Zolper  wrote:

> Tim,
>
> Okay I was able to get something to go there.
>
> At first I saw warnings so I wasn't sure but here are the images.
>
> http://madtrak.com/ipython1.png
>
> http://madtrak.com/ipython2.png
>
> Do you think I am in good shape with ipython?
>
> To perform the easy install of django would i execute: easy_install.exe
> django?
>
> And if so would that just overwrite what I have already installed,
> like would it be good to do it a second time even though I think it worked
> the first. Honestly, I'd probably leave it for now just wanted your
> thoughts on easy install.
>
> Thanks!
>
> JJ
>
> On Fri, Nov 25, 2011 at 1:20 PM, Timothy Makobu <
> makobu.mwambir...@gmail.com> wrote:
>
>> Hi, you're welcome.
>>
>> Easy install is usually in C:\Python27\Scripts
>>
>> you can go there from within cmd.exe and run "easy_install.exe
>> ipython"  It should work.
>>
>>
>> On Fri, Nov 25, 2011 at 7:56 PM, JJ Zolper  wrote:
>>
>>> Tim,
>>>
>>> I had a confirmation from William that I installed Django but you
>>> said
>>> iPython would be helpful and since I don't remember much Python I was
>>> hoping to make that work.
>>>
>>> Thanks so much for taking the time to help me get started you're a
>>> life saver! : )
>>>
>>> JJ
>>>
>>> On Nov 24, 11:56 pm, Timothy Makobu 
>>> wrote:
>>> >- Install setup toolshttp://
>>> pypi.python.org/pypi/setuptools/0.6c11
>>> >- Go to the command line (cmd.exe) and type
>>> >   - easy_install django
>>> >   - easy_install ipython (not needed by django, but very
>>> useful, as you
>>> >   will see when you come to running "python manage.py shell"
>>> >
>>> > That's all!
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Fri, Nov 25, 2011 at 3:59 AM, JJ Zolper 
>>> wrote:
>>> > > Okay just so everyone knows!
>>> >
>>> > > I was able to extract the .tar file and I now see the files.
>>> >
>>> > > In order to import these files correctly should I place these
>>> files in the
>>> > > install directory of Python 2.7 and then attempt the commands?
>>> >
>>> > > Or is the location of Django just arbitrary can I place it
>>> wherever I like
>>> > > and then work from the Python prompt?
>>> >
>>> > > JJ
>>> >
>>> > > On Thu, Nov 24, 2011 at 11:58 AM, Ivo Brodien 
>>> wrote:
>>> >
>>> > >> windows users have extracted your command will look like this:
>>> ...
>>> > >> to execute the .tar file.
>>> >
>>> > >> as tom mentioned, you have to use 7zip two times.
>>> >
>>> > >> the tar file is another archive (like .zip, .gz ) which you
>>> have to
>>> > >> decompress and then you have the django directory and you can
>>> go on with
>>> > >> the tutorial.
>>> >
>>> > >> On Nov 24, 2011, at 17:55 , JJ Zolper wrote:
>>> >
>>> > >> JoeLinux,
>>> >
>>> > >> Oh interesting. It seems the 64 bit version is sort of unclear.
>>> Any
>>> > >> help there?
>>> >
>>> > >> Would I be able to install my Python is well with a smaller
>>> command? I
>>> > >> am back at ground zero because I had to adjust the Python
>>> version back
>>> > >> to 2.5 so Django would agree.
>>> >
>>> > >> I am interested just not sure how to work the 64 bit version.
>>> >
>>> > >> Thanks!
>>> >
>>> > >> JJ
>>> >
>>> > >> On Nov 24, 11:40 am, Joey Espinosa 
>>> wrote:
>>

Re: Bulk import of data

2011-11-26 Thread Petr Přikryl

>>> import csv
>>> data = csv.reader(open('/path/to/csv', 'r'), delimiter=';')
>>> for row in data:
>>> category = Category.objects.get_or_create(name=row[0])
>>> sub_category = SubCategory.objects.get_or_create(name=row[1],
>>> defaults={'parent_category': category})
>>> product = Product.objects.get_or_create(name=row[2],
>>> defaults={'sub_category': sub_category})

There are few potential problems with the cvs as used here.

Firstly, the file should be opened in binary mode.  In Unix-based
systems, the binary mode is technically similar to text mode.
However, you may once observe problems when you move
the code to another environment (Windows).

Secondly, the opened file should always be closed -- especially
when building application (web) that may run for a long time.
You can do it like this:

...
f = open('/path/to/csv', 'rb')
data = csv.reader(f, delimiter=';')
for ...
...
f.close()

Or you can use the new Python construct "with".

P.

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



[ date and null value ]

2011-11-26 Thread Lord Goosfancito

Hello.

I have problem when i declared field with "blank" the admin django show 
this error:


(1048, "Column 'fechaProyecto' cannot be null")

in my models.py:

fechaProyecto = models.DateField(verbose_name='Ingresó a la 
subdirección de Proyecto')

fechaProyecto.blank = True

What is the problem?

Thank's

Gustavo.

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Installation of Django

2011-11-26 Thread JJ Zolper
So you feel that that documentation of Python is the best reference? I'm
sure it is just wanted to ask.

JJ

On Sat, Nov 26, 2011 at 2:20 PM, Timothy Makobu  wrote:

> But first, all of this http://docs.python.org/tutorial/index.html
>
>
> On Sat, Nov 26, 2011 at 10:19 PM, Timothy Makobu <
> makobu.mwambir...@gmail.com> wrote:
>
>> Nice. Now read ALL of this http://djangobook.com/en/2.0/
>>
>>
>> On Sat, Nov 26, 2011 at 9:55 PM, JJ Zolper  wrote:
>>
>>> Looks like I am in good shape!
>>>
>>> Thanks so much man!
>>>
>>> http://madtrak.com/success.png
>>>
>>> JJ
>>>
>>>
>>> On Sat, Nov 26, 2011 at 1:51 PM, JJ Zolper  wrote:
>>>
 Thanks! Yes sounds like something from my UNIX class. I have now added
 it.

 What will django-admin.py do for me? Oh are you just saying I can run
 it from anywhere now? Any of the commands I want to work with 
 python/django?

 JJ


 On Sat, Nov 26, 2011 at 12:56 AM, Timothy Makobu <
 makobu.mwambir...@gmail.com> wrote:

> Yes, iPython is installed now. But now you need to add  
> C:\Python27\Scripts
> to your PATH variable, so you wont have to keep going there to run things.
> After you add it, you can run django-admin.py, easy_install, iPython ...
> from any directory in cmd.exe
>
> This link shows you how:
> http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
>
>
>
>
> On Sat, Nov 26, 2011 at 12:49 AM, JJ Zolper  wrote:
>
>> Tim,
>>
>> Okay I was able to get something to go there.
>>
>> At first I saw warnings so I wasn't sure but here are the images.
>>
>> http://madtrak.com/ipython1.png
>>
>> http://madtrak.com/ipython2.png
>>
>> Do you think I am in good shape with ipython?
>>
>> To perform the easy install of django would i execute: easy_install.exe
>> django?
>>
>> And if so would that just overwrite what I have already installed,
>> like would it be good to do it a second time even though I think it 
>> worked
>> the first. Honestly, I'd probably leave it for now just wanted your
>> thoughts on easy install.
>>
>> Thanks!
>>
>> JJ
>>
>> On Fri, Nov 25, 2011 at 1:20 PM, Timothy Makobu <
>> makobu.mwambir...@gmail.com> wrote:
>>
>>> Hi, you're welcome.
>>>
>>> Easy install is usually in C:\Python27\Scripts
>>>
>>> you can go there from within cmd.exe and run "easy_install.exe
>>> ipython"  It should work.
>>>
>>>
>>> On Fri, Nov 25, 2011 at 7:56 PM, JJ Zolper wrote:
>>>
 Tim,

 I had a confirmation from William that I installed Django but you
 said
 iPython would be helpful and since I don't remember much Python I
 was
 hoping to make that work.

 Thanks so much for taking the time to help me get started you're a
 life saver! : )

 JJ

 On Nov 24, 11:56 pm, Timothy Makobu 
 wrote:
 >- Install setup toolshttp://
 pypi.python.org/pypi/setuptools/0.6c11
 >- Go to the command line (cmd.exe) and type
 >   - easy_install django
 >   - easy_install ipython (not needed by django, but very
 useful, as you
 >   will see when you come to running "python manage.py shell"
 >
 > That's all!
 >
 >
 >
 >
 >
 >
 >
 > On Fri, Nov 25, 2011 at 3:59 AM, JJ Zolper 
 wrote:
 > > Okay just so everyone knows!
 >
 > > I was able to extract the .tar file and I now see the files.
 >
 > > In order to import these files correctly should I place these
 files in the
 > > install directory of Python 2.7 and then attempt the commands?
 >
 > > Or is the location of Django just arbitrary can I place it
 wherever I like
 > > and then work from the Python prompt?
 >
 > > JJ
 >
 > > On Thu, Nov 24, 2011 at 11:58 AM, Ivo Brodien 
 wrote:
 >
 > >> windows users have extracted your command will look like this:
 ...
 > >> to execute the .tar file.
 >
 > >> as tom mentioned, you have to use 7zip two times.
 >
 > >> the tar file is another archive (like .zip, .gz ) which you
 have to
 > >> decompress and then you have the django directory and you can
 go on with
 > >> the tutorial.
 >
 > >> On Nov 24, 2011, at 17:55 , JJ Zolper wrote:
 >
 > >> JoeLinux,
 >
 > >> Oh interesting. It seems the 64 bit version is sort of
 unclear. Any
 > >> help there?
 >
 > >> Would I be able to install my Python is well with a smaller
 command? I

Re: Installation of Django

2011-11-26 Thread JJ Zolper
Tim,

Does our system include a Python Interpreter?

"

The interpreter’s line-editing features usually aren’t very sophisticated.
On Unix, whoever installed the interpreter may have enabled support for the
GNU readline library, which adds more elaborate interactive editing and
history features. Perhaps the quickest check to see whether command line
editing is supported is typing Control-P to the first Python prompt you
get. If it beeps, you have command line editing; see Appendix *Interactive
Input Editing and History
Substitution*
for
an introduction to the keys. If nothing appears to happen, or if ^P is
echoed, command line editing isn’t available; you’ll only be able to use
backspace to remove characters from the current line.

"

JJ

On Sat, Nov 26, 2011 at 6:55 PM, JJ Zolper  wrote:

> So you feel that that documentation of Python is the best reference? I'm
> sure it is just wanted to ask.
>
> JJ
>
>
> On Sat, Nov 26, 2011 at 2:20 PM, Timothy Makobu <
> makobu.mwambir...@gmail.com> wrote:
>
>> But first, all of this http://docs.python.org/tutorial/index.html
>>
>>
>> On Sat, Nov 26, 2011 at 10:19 PM, Timothy Makobu <
>> makobu.mwambir...@gmail.com> wrote:
>>
>>> Nice. Now read ALL of this http://djangobook.com/en/2.0/
>>>
>>>
>>> On Sat, Nov 26, 2011 at 9:55 PM, JJ Zolper  wrote:
>>>
 Looks like I am in good shape!

 Thanks so much man!

 http://madtrak.com/success.png

 JJ


 On Sat, Nov 26, 2011 at 1:51 PM, JJ Zolper  wrote:

> Thanks! Yes sounds like something from my UNIX class. I have now added
> it.
>
> What will django-admin.py do for me? Oh are you just saying I can run
> it from anywhere now? Any of the commands I want to work with 
> python/django?
>
> JJ
>
>
> On Sat, Nov 26, 2011 at 12:56 AM, Timothy Makobu <
> makobu.mwambir...@gmail.com> wrote:
>
>> Yes, iPython is installed now. But now you need to add  
>> C:\Python27\Scripts
>> to your PATH variable, so you wont have to keep going there to run 
>> things.
>> After you add it, you can run django-admin.py, easy_install, iPython ...
>> from any directory in cmd.exe
>>
>> This link shows you how:
>> http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx
>>
>>
>>
>>
>> On Sat, Nov 26, 2011 at 12:49 AM, JJ Zolper wrote:
>>
>>> Tim,
>>>
>>> Okay I was able to get something to go there.
>>>
>>> At first I saw warnings so I wasn't sure but here are the images.
>>>
>>> http://madtrak.com/ipython1.png
>>>
>>> http://madtrak.com/ipython2.png
>>>
>>> Do you think I am in good shape with ipython?
>>>
>>> To perform the easy install of django would i execute: easy_install.exe
>>> django?
>>>
>>> And if so would that just overwrite what I have already installed,
>>> like would it be good to do it a second time even though I think it 
>>> worked
>>> the first. Honestly, I'd probably leave it for now just wanted your
>>> thoughts on easy install.
>>>
>>> Thanks!
>>>
>>> JJ
>>>
>>> On Fri, Nov 25, 2011 at 1:20 PM, Timothy Makobu <
>>> makobu.mwambir...@gmail.com> wrote:
>>>
 Hi, you're welcome.

 Easy install is usually in C:\Python27\Scripts

 you can go there from within cmd.exe and run "easy_install.exe
 ipython"  It should work.


 On Fri, Nov 25, 2011 at 7:56 PM, JJ Zolper wrote:

> Tim,
>
> I had a confirmation from William that I installed Django but you
> said
> iPython would be helpful and since I don't remember much Python I
> was
> hoping to make that work.
>
> Thanks so much for taking the time to help me get started you're a
> life saver! : )
>
> JJ
>
> On Nov 24, 11:56 pm, Timothy Makobu 
> wrote:
> >- Install setup toolshttp://
> pypi.python.org/pypi/setuptools/0.6c11
> >- Go to the command line (cmd.exe) and type
> >   - easy_install django
> >   - easy_install ipython (not needed by django, but very
> useful, as you
> >   will see when you come to running "python manage.py shell"
> >
> > That's all!
> >
> >
> >
> >
> >
> >
> >
> > On Fri, Nov 25, 2011 at 3:59 AM, JJ Zolper 
> wrote:
> > > Okay just so everyone knows!
> >
> > > I was able to extract the .tar file and I now see the files.
> >
> > > In order to import these files correctly should I place these
> files in the
> > > install directory of Python 2.7 and then attempt the commands?
> >
>>>

What read database and load values to diccionary?

2011-11-26 Thread Lord Goosfancito

Hello.

I need load a table to fill one dictionary, next use it in my model.

Example:

def Articles(models.Model):

rules = Here i need load table to fill rules filed...
   example: (
('1', 'one'),
('2', 'delete it'),
('3'.)
)

descripcion = models.CharField(max_length=100, verbose_name = 
'Description of article')

opcions = rules < here i need



Thank's.

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Form wizard and dynamic choices

2011-11-26 Thread brian mckinney
I've been trying to implement a relatively simple django app, in which
I need to have a multistep form and a dynamically generated choice
field. I'm using Django 1.3 and the Form Wizard.

In step one of the form, I ask for a URL from the user, which I'd like
to use to dynamically generate the list of choices for a select field
on the subsequent form. I've distilled the problem down to this: I
can't figure how to get the result of a field from the first step of
the form and pass an extra keyword argument to the form as it is
getting constructed, so that I can generate the choices and render the
form.

Anyone have any insight?

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: [ date and null value ]

2011-11-26 Thread Anoop Thomas Mathew
Hi,
Try this
*fechaProyecto = models.DateField(verbose_name=**'Ingresó a la subdirección
de Proyecto', blank=True, null=True)*
Thanks,
Anoop
atm
___
Life is short, Live it hard.




On 27 November 2011 05:22, Lord Goosfancito  wrote:

>  Hello.
>
> I have problem when i declared field with "blank" the admin django show
> this error:
>
>
> (1048, "Column 'fechaProyecto' cannot be null")
>
> in my models.py:
>
> fechaProyecto = models.DateField(verbose_name='Ingresó a la
> subdirección de Proyecto')
> fechaProyecto.blank = True
>
> What is the problem?
>
> Thank's
>
> Gustavo.
>
>  --
> 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
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Doesn't display any comments

2011-11-26 Thread Tsung-Hsien
I use comment of Django applicaition, and the comment page looks
anything good, but when I post the comment, there is no comment
displayed on the page without any problem showing.

the template code:

Comments
{% get_comment_count for bookmarks.sharedbookmark
shared_bookmark.id as comment_count %}
{% get_comment_list for bookmarks.sharedbookmark
shared_bookmark.id as comment_list %}
{% for comment in comment_list %}

Posted by: {{ comment.user_name }} on
{{ comment.submit_date }}
{{ comment.comment|escape|urlizetrunc:40|
linebreaks }}

{% endfor%}
Number of comments: {{ comment_count }}
{% render_comment_form for bookmarks.sharedbookmark
shared_bookmark.id %}

view.py:

def bookmark_page(request, bookmark_id):
shared_bookmark = get_object_or_404(SharedBookmark,
id=bookmark_id)
variables = RequestContext(request, {
'shared_bookmark' : shared_bookmark
})
return render_to_response('bookmark_page.html', variables)

form.html:
{% if user.is_authenticated %}

{% csrf_token %}
Post a comment:






{% else %}
Please log in to post comments.
{% endif %}

I tried replace shared_bookmark.id with
object_pk,causing the page can't display the comment form.

How to fix this?
Thanks!

-- 
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.