Re: Auto import files into database

2011-03-20 Thread Daniel Roseman
On Sunday, March 20, 2011 1:04:46 AM UTC, Corey Farwell wrote: > > So would it look something along these lines: > > from app.models import NewModel > # parse csv data here > meow = NewModel(whatever = parsedData) > meow.save() > > Where should this script live? Is there a general place django

Re: Auto import files into database

2011-03-20 Thread werefr0g
IMHO, while dealing with database data modifications from a csv file, you should not let default commit on each save(). This will help you preserve data from accidents (if something is wrong inside the serie, maybe the serie shouldn't be processed) and you'll have better speed processing these

Re: About using Django Auth with my app, Auto saving the User

2011-03-20 Thread AJ
My form is not valid and I cannot figure out why. I am using Django's ModelForm to generate a form (As above). I printout out the request.POST and all it has is "csrfmiddlewaretokenname" Just putting it here. -- You received this message because you are subscribed to the Google Groups "Django

mssql2k and apache

2011-03-20 Thread kimia
Hi, I have to connect to mssql2k in my django app . everything goes well in "manage.py runserver" but I cant connect to mssql when I use apache . I tried both pymssql and pyodbc , nothing changed. installing sp4 "SQL2000.MSDE-KB884525-SP4-x86-ENU.EXE" changed nothing too. this line has problem cn

How should I solve?

2011-03-20 Thread Nge Nge
Hi everyone ! I am trying to connect facebook from django web page with login and registartion. I already try with the Django-Socialauth. I am facing the following error. How can I solve? Please help me. I am running with python 2.6 on aptana studio 3. http://127.0.0.1:8080/facebook_login/ Name

Re: How should I solve?

2011-03-20 Thread Shawn Milochik
Run a grep on your code and look for the word 'complete.' Then figure out where it's blowing up. If 'complete' doesn't appear anywhere in your code, then use pdb to trace into the django-socialauth code that's blowing up so you can figure out what your code is doing wrong that's breaking django-so

Re: How should I solve?

2011-03-20 Thread Calvin Spealman
How did you acquire and install socialauth? Looks like you are forgetting to quote a view name in your urls.py On Mar 20, 2011 10:55 AM, "Nge Nge" wrote: Hi everyone ! I am trying to connect facebook from django web page with login and registartion. I already try with the Django-Socialauth. I

Re: About using Django Auth with my app, Auto saving the User

2011-03-20 Thread AJ
No, the form submits, with other values too, to the view but it just does not validate. AJ -- 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

modify existing widget

2011-03-20 Thread rahul jain
All, How to edit existing foreign key/manytomany field widget. I would like to remove that + sign (link to add more enteries). [image: manytomany.png] Please let me know. Thanks. Rahul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Django on EC2

2011-03-20 Thread ydjango
I need to install a nginx(optional), Linux, Apache, Django 1.2, python2.6 env and Mysql on EC2 and ESB. Can you please point to any recent instructions on how to install on amazon 2 and which images to use? How has your experience been so far? -- You received this message because you are subs

Re: django-admin-py?

2011-03-20 Thread glenn hafstrom
Hi Steve I installed django with:python setup.py install After that I copied the django-admin.py to my Python-folder which I have as an executable path Regards glenn On 20 mar, 02:36, Steve Holden wrote: > Last I looked (though it's been a,while) the Django install dropped > django-admin.pt so

Parse template variables in custom tag

2011-03-20 Thread Turner
I'm working on a custom tag to which I would like to be able to pass template variables and filters. I found Variable(value).resolve(context) in the Django source. I have a couple of questions: 1) Is it safe to use Variable()? That is, is it part of the public API? Not having visibility modifiers

Re: Parse template variables in custom tag

2011-03-20 Thread Daniel Roseman
On Sunday, March 20, 2011 9:57:04 PM UTC, Turner wrote: > > I'm working on a custom tag to which I would like to be able to pass > template variables and filters. I found > Variable(value).resolve(context) in the Django source. I > have a couple of questions: > > You don't need to look at the c

Question regarding formfield_for_foreignkey in admin.py

2011-03-20 Thread Matteius
I have an Announcement class in my project that has an author field. I have a custom formfield_for_foreignkey which gets all staff users for any super user, and I do the same thing for other staff users. Ideally however we could set this to be only the existing author (if any) or the current user.

how to compose templates with widgets (that has dynamic contents in it)

2011-03-20 Thread django beginner
hi django experts! May I know how to create templates that has django widgets in it? please refer to my should-be template output below: Name: here is the sample model: class Name(models.Model): name_id = models.AutoField(primary_key=True)

case sensitive model fields: does object_id gets smallcap field?

2011-03-20 Thread django beginner
Hi all, Suppose I have these data: class Name(models.Model): nameId = models.AutoField(primary_key=True) name = models.CharField(max_length=20) nameAddress = models.CharField(max_length=50) on my views.py: def name_delete(request, object_id): conn = psycopg2.connect("dbname=mydb

Re: case sensitive model fields: does object_id gets smallcap field?

2011-03-20 Thread Shawn Milochik
1. Why are you creating models with the ORM (via a Model subclass), then using raw SQL instead of the ORM to manipulate the database? 2. Why are you overriding the primary key just to replace it with the same type? 3. Your view allows for SQL injection errors -- one of the things the ORM protects

Re: how to compose templates with widgets (that has dynamic contents in it)

2011-03-20 Thread Shawn Milochik
1. Create a Django form. 2. Add a ChoiceField to the form. 3. Populate the ChoiceField's 'choices' properly with an iterable (tuple or list) full of iterables containing the key and value you like. 4. Put the form into your template somewhere within your HTML form. Shawn P.S. I recommend doing

Re: Django on EC2

2011-03-20 Thread Nate Aune
For the DjangoZoom.com infrastructure we use the Ubuntu 10.10 AMIs provided by Canonical. We use the 32-bit and 64-bit images in us-east region: http://uec-images.ubuntu.com/releases/maverick/release/ They've also published a pretty good getting started with EC2 page here: https://help.ubuntu.c