Re: django-registration - stuck at Required templates topic

2011-08-04 Thread Bruce Dou
I also think that should be a default simple template in the package. On Fri, Aug 5, 2011 at 12:52 PM, Phang Mulianto wrote: > well..like the error said..you need to put {% csrf_token %} inside your > form.. do you read the tutorial? you should read it if you serious getting > in django. . it he

Re: django-registration - stuck at Required templates topic

2011-08-04 Thread Phang Mulianto
well..like the error said..you need to put {% csrf_token %} inside your form.. do you read the tutorial? you should read it if you serious getting in django. . it helps you alot as it help me too.. On Aug 5, 2011 12:12 PM, "bob gailer" wrote: > > > On Aug 4, 11:47 pm, Mario Gudelj wrote: >> Hey B

Re: django-registration - stuck at Required templates topic

2011-08-04 Thread bob gailer
On Aug 4, 11:47 pm, Mario Gudelj wrote: > Hey Bob, > > You can download some basic templates for this > pagehttp://devdoodles.wordpress.com/2009/02/16/user-authentication-with-d... OK - did that - now what? I can get the login form displayed - when I click get: Forbidden (403) CSRF verificat

Re: django-registration - stuck at Required templates topic

2011-08-04 Thread Mario Gudelj
Hey Bob, You can download some basic templates for this page http://devdoodles.wordpress.com/2009/02/16/user-authentication-with-django-registration/ Cheers, On 5 August 2011 12:42, bob gailer wrote: > I followed the installation & configuration of django-registration up > to the start of th

django-registration - stuck at Required templates topic

2011-08-04 Thread bob gailer
I followed the installation & configuration of django-registration up to the start of the Required templates topic. After that I am very lost. "In the default setup, you will need to create several templates required by django-registration" I have little idea what to do or where to do it. Read

ConFoo 2012: Call for Presenters (CFP)

2011-08-04 Thread Yannick Gingras
Dear Djangonauts, The 3rd edition of ConFoo, an international conference on Web technologies, will be held in Montreal from February 29th to March 2nd 2012. http://confoo.ca/en ConFoo addresses several aspects of the Web and covers many languages (PHP, Python, Ruby, .Net, Java). ConFoo is a confe

Re: Error "Cant import.." during manage.py syncdb

2011-08-04 Thread Adam Zedan
Problem Solved...just needed to register environmental variables On Aug 5, 2:58 am, Adam Zedan wrote: > Hi i am having problem importing a module > in my settings.py located in "D:\Django-1.3\django\bin\cms" > I added > INSTALLED_APPS = ( > . > . >         'coltrane', > ) > > The fold

Re: Calculation for each object in a QuerySet

2011-08-04 Thread nixlists
On Thu, Aug 4, 2011 at 5:31 PM, Javier Guerra Giraldez wrote: > On Thu, Aug 4, 2011 at 3:53 PM, nixlists wrote: >> What's the correct way to write the view then? Any work-arounds? > > - collect the modified objects to a list, don't rely on the queryset > to store them > > or > > - add a method to

Re: django smart-select

2011-08-04 Thread H . İbrahim Yılmaz
O.K. just a simple question: How can i chain *available_color *field to *color_name* field? Cheers... 2011/8/5 H.İbrahim Yılmaz > I tried many times. No answered what is the unclear? i cant understand... > What didn't you understand? > > > 2011/8/4 Tom Evans > >> On Thu, Aug 4, 2011 at 9:23 A

ANN: django-dynamo

2011-08-04 Thread Juergen Schackmann
Hi all, I have been thinking about dynamic models in Django for a while now. And inspired by https://code.djangoproject.com/wiki/DynamicModels and Will Hardy's https://github.com/willhardy/dynamic-models, I have created Dynamo, to let users and admins create and maintain their models dynamical

Re: django smart-select

2011-08-04 Thread H . İbrahim Yılmaz
I tried many times. No answered what is the unclear? i cant understand... What didn't you understand? 2011/8/4 Tom Evans > On Thu, Aug 4, 2011 at 9:23 AM, H.İbrahim Yılmaz > wrote: > > Any help? > > > > The question/what is wrong is unclear. > > I would have thought the number of people using t

Error "Cant import.." during manage.py syncdb

2011-08-04 Thread Adam Zedan
Hi i am having problem importing a module in my settings.py located in "D:\Django-1.3\django\bin\cms" I added INSTALLED_APPS = ( . . 'coltrane', ) The folder coltrane is next to the cms folder. Anyways when i go like as shown in cmd I get D:\Django-1.3\django\bin\cms>manage.py syn

how can I use ipdb with runserver_plus?

2011-08-04 Thread Tony Schmidt
Is this possible? -- 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, vis

Re: Calculation for each object in a QuerySet

2011-08-04 Thread Javier Guerra Giraldez
On Thu, Aug 4, 2011 at 3:53 PM, nixlists wrote: > What's the correct way to write the view then? Any work-arounds? - collect the modified objects to a list, don't rely on the queryset to store them or - add a method to the model, as i mentioned originally. -- Javier -- You received this mes

Re: Calculation for each object in a QuerySet

2011-08-04 Thread nixlists
On Thu, Aug 4, 2011 at 4:47 PM, Javier Guerra Giraldez wrote: > you're modifying the 'claim' objects cached by the queryset.  as soon > as the queryset loads another part of the table (typically it loads in > 21-record chunks) or if it's clone()'d (happens a lot), it will > construct new 'claim' o

Re: Calculation for each object in a QuerySet

2011-08-04 Thread Javier Guerra Giraldez
On Thu, Aug 4, 2011 at 3:26 PM, nixlists wrote: > for claim in cset: >    rebate = claim.quantity * price * rebate_pct #price and rebate_pct > are in other models >    claim.rebate = rebate you're modifying the 'claim' objects cached by the queryset. as soon as the queryset loads another part of

Re: djangoadvent.com is down ?

2011-08-04 Thread Lorenzo Franceschini
On 07/28/2011 04:55 PM, Lorenzo Franceschini wrote: Hi, some time ago I bookmarked some posts on http://djangoadvent.com that seemed very interesting to me; yesterday I wanted to read some of them, but I wasn't able to retrieve them. The website was unreacheable, and I was able to found a cac

Re: Calculation for each object in a QuerySet

2011-08-04 Thread nixlists
On Thu, Aug 4, 2011 at 4:10 PM, Javier Guerra Giraldez wrote: > On Thu, Aug 4, 2011 at 2:14 PM, nixlists wrote: >> I need to rewrite the view so that for each object I need to make a >> simple calculation based on the data in the fields of that object > > you can simply add a method to your model

Djangonaut is looking for a job

2011-08-04 Thread Eugeny Belykh
Hi everybody.I am Django newbee based in Russia. I am looking for a Django related job.Remote (telecommuting) only. 1 django-powered site in portfolio.Are there any vacancies? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Format queryset return dictionary of primary keys?

2011-08-04 Thread Javier Guerra Giraldez
On Thu, Aug 4, 2011 at 2:19 PM, diafygi wrote: > Is there a built in way to get: >>>Model.objects.all().something_pk_values() > {1 : {'vin':189554}, 2 : {'vin':189555}} built in to Python: dict ((o.pk, o) for o in Model.objecs.all()) -- Javier -- You received this message because you are

Re: Calculation for each object in a QuerySet

2011-08-04 Thread Javier Guerra Giraldez
On Thu, Aug 4, 2011 at 2:14 PM, nixlists wrote: > I need to rewrite the view so that for each object I need to make a > simple calculation based on the data in the fields of that object you can simply add a method to your model class: class Claim(models.Model): contract = models.ForeignKey(Co

Re: Format queryset return dictionary of primary keys?

2011-08-04 Thread diafygi
Right, that's what I'm currently doing. I was just wondering if there was a pre-defined way. On Aug 4, 4:06 pm, Shawn Milochik wrote: > I don't know about built-in, but you could do it in Python by iterating > through your list and creating a dictionary with a key of the id and > value of the res

Re: Format queryset return dictionary of primary keys?

2011-08-04 Thread Shawn Milochik
I don't know about built-in, but you could do it in Python by iterating through your list and creating a dictionary with a key of the id and value of the rest of the dictionary. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: Calculation for each object in a QuerySet

2011-08-04 Thread nixlists
On Thu, Aug 4, 2011 at 3:17 PM, Jacob Kaplan-Moss wrote: > Well, without more details about your model(s) and what calculation > you'd like to make it's impossible to give you a specific answer. > However, you may want to take a look at Django's > aggregation/annotation commands (http://django.me/

Format queryset return dictionary of primary keys?

2011-08-04 Thread diafygi
Howdy all, I'm know you can create a list of dictionaries for a queryset using values(). However, I'm wondering if you can create one dictionary where the keys are the primary keys of the result. For example: class Car(models.Model): vin = models.IntegerField() >>Model.objects.all().values(

Re: Calculation for each object in a QuerySet

2011-08-04 Thread Jacob Kaplan-Moss
On Thu, Aug 4, 2011 at 2:14 PM, nixlists wrote: > How one would approach this? Do I iterate over the whole QuerySet, > adding a calculated value to each object? What about pagination as > done in the generic methods? Well, without more details about your model(s) and what calculation you'd like t

Calculation for each object in a QuerySet

2011-08-04 Thread nixlists
Hi. I have a view that currently simply takes a QuerySet and displays it using pagination with the list_detail.object_list generic method: return list_detail.object_list( request, queryset = cset, paginate_by=30 ) I need to rewrite the view so that for each

Re: Django + PyPy = ?

2011-08-04 Thread Dmitry Pisklov
In site-packages there's only one .pth file named PIL.pth, mentioning only PIL, but it doesn't prevent pypy from importing other modules from there: $ ls /home/wsgi/pypy-1.5/site-packages/ Cheetah/ Cheetah-2.4.2.1.egg-info/ django/ Django-1.2.3.egg-info flup/ flup-1.0.2.egg-info/ lsb_release.py

Re: cannot import blank value to IntegerField()

2011-08-04 Thread Jeremy Dunck
On Wed, Aug 3, 2011 at 5:08 PM, Didymus wrote: ... > ERROR:  invalid input syntax for integer: "" > CONTEXT:  COPY train_emp, line 1, column phone: "" ... > I have tried the following code in models.py > > phone  = models.IntegerField(blank=True) > phone  = models.IntegerField(null=True) > phone  

Re: How to display Scientific Notation for a field on the admin pages?

2011-08-04 Thread Jeremy Dunck
On Tue, Aug 2, 2011 at 12:32 PM, DjangoOfWar wrote: > Right now I have a Decimal field in my model but I'd like it to > display as scientific notation on the admin pages. > > Do I need to make a custom model field, that uses a custom form field > or is there an easier way? > > (I'm on Django 1.2 i

Re: Request for new user account via email Django

2011-08-04 Thread Shawn Milochik
In your view you should be instantiating the form with the data from request.POST instead of reading the values directly. Also, you mention that you get a 403 error when you post your name and password, but the form and template you pasted don't include password, so I suspect the error is comi

Re: Django can't see my static files

2011-08-04 Thread Stuart MacKay
Guillaume, Here are some settings that you should compare to see if your project is set up correctly: In settings.py # define the root directory to your project - this is just a convenience so everything is referenced correctly. PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) # t

Re: Django can't see my static files

2011-08-04 Thread Amao Zhao
Hi, you should conform the django.contrib.staticfiles in your INSTALLED_APPS, then add the prefix to your template:{% load static %}, On Thursday, August 4, 2011, Guillaume Chorn wrote: > Hi All, > > It's been a couple of days since I last wrote and no response so I'm trying again (see below). P

Re: Django can't see my static files

2011-08-04 Thread Guillaume Chorn
Hi All, It's been a couple of days since I last wrote and no response so I'm trying again (see below). Please help if you can; without being able to link to external static files I really can't do anything else with my site. CSS is the very least of my concerns--worst case I can include that inf

Re: About user auth page

2011-08-04 Thread shacker
On Aug 3, 7:45 am, william ratcliff wrote: > I might also recommend using the django-registration package. I haven't built a Django site yet that didn't use the combination of django-registration and django-profiles. Would love to see the pair of them find their way into contrib. ./s -- You re

Request for new user account via email Django

2011-08-04 Thread Sheogora
I am trying to make a little function for a user to request an account and the information he puts in is sent to a person who will make an account. I was following this example mostly http://djangosnippets.org/snippets/261/ but it is very old and might be inaccurate for I have got and thus I have p

Re: Cant override change_form.html in Django..Why??

2011-08-04 Thread christian.posta
where did you read that? you don't say it explicitly, but i'm guessing you're trying to change the way things are edited/displayed within the admin application? On Aug 4, 3:29 am, Hayyan Rafiq wrote: > Hi i read that > "By default, the admin application will look for a template in several > plac

Re: Django for a front end designer

2011-08-04 Thread Andre Terra
I personally learned python without any previous programming knowledge. TBH, I used to write scripts for mIRC, so I knew *some* very basic things, but be certain I had to rewire my entire brain to think like a real programmer. I'm now on my third django project and while my developing speed has im

Re: Intro Tutorial-- Poll/Choice SQL writes

2011-08-04 Thread christian.posta
If you point me to exactly what part of the tutorial shows Choice objects being saved instantaneously, I can explain it to you. On Aug 3, 5:36 pm, Gall wrote: > I'm working through the introductory tutorial @ djangoproject.com. Why > does the poll object require an explicit save() call, while cho

Re: django smart-select

2011-08-04 Thread Tom Evans
On Thu, Aug 4, 2011 at 9:23 AM, H.İbrahim Yılmaz wrote: > Any help? > The question/what is wrong is unclear. I would have thought the number of people using this particular package is probably not high enough to be randomly answered on a django mailing list. Have you tried contacting the author

Re: Django for a front end designer

2011-08-04 Thread paulo couto
Well I am trying to avoid PHP at all costs. Maybe im thinking it the wrong way, but after tweaking a wordpress theme, PHP seems very "ugly" and "unreadable" to me. I also developed some kind of mental block about PHP and I know for sure that if I have to learn it I will hate every second of it...he

Re: Recommended management of static HTML files?

2011-08-04 Thread Tom Evans
On Thu, Aug 4, 2011 at 2:31 PM, Tom Evans wrote: > staticfiles. > > The content should be put into an application static files directory, s/application/project/ > separate from per-app static content. > > Cheers > > Tom > -- You received this message because you are subscribed to the Google Grou

Re: Recommended management of static HTML files?

2011-08-04 Thread Tom Evans
On Thu, Aug 4, 2011 at 5:30 AM, Rodney Topor wrote: > OK, I understand that static JavaScript files, stylesheets and images > should be stored in a /static/ directory and managed by the > django.contrib.staticfiles app. > > But a typical project will contain both dynamic HTML pages generated > by

Re: Run an application periodically on django

2011-08-04 Thread Dmitry Kuznetsov
If you want to run a server-side script every 30 seconds, look into Cron, or Django-Celery. If you want to refresh a webpage every 30 seconds, use Javascript. On Aug 4, 1:12 am, Mohamed Ghoneim wrote: > Hey guys, > > I am new to djnago and I have heard a lot about its powerful capabilities, > so

Re: Run an application periodically on django

2011-08-04 Thread emre yılmaz
use management commands for the cron jobs. "cd /var/www/project_directory && python manage.py custom_management_command" https://docs.djangoproject.com/en/dev/howto/custom-management-commands/ -- web developer http://www.emreyilmaz.me -- You received this message because you are subscribed to

RE: Run an application periodically on django

2011-08-04 Thread Sells, Fred
You can run a django module directly if you do something like: if __name__ == '__main__': sys.path.append( '/all/projects/one-up-from-site directory) #may not be needed in all cases. os.environ['DJANGO_SETTINGS_MODULE'] = 'mds30.settings' The problem I just encountered using

Re: Intro Tutorial-- Poll/Choice SQL writes

2011-08-04 Thread Dan Poirier
On Wed. 2011-08-03 at 08:36 PM EDT, Gall wrote: > I'm working through the introductory tutorial @ djangoproject.com. Why > does the poll object require an explicit save() call, while choice > objects are inserted into the db instantaneously? There are different ways to create objects, and some i

Cant override change_form.html in Django..Why??

2011-08-04 Thread Hayyan Rafiq
Hi i read that "By default, the admin application will look for a template in several places, using the first one it finds. The template names it looks for are as follows, in this order: 1. admin/flatpages/flatpage/change_form.html 2. admin/flatpages/change_form.html 3. admin/change_for

Re: ModelForm bug or documentation error?

2011-08-04 Thread bruno desthuilliers
On Aug 4, 12:34 pm, tow wrote: > In the ModelForm documentation (https://docs.djangoproject.com/en/dev/ > topics/forms/modelforms/) the following snippet appears: > > # Create a form to edit an existing Article. > > >>> a = Article.objects.get(pk=1) > >>> f = ArticleForm(instance=a) > >>> f.save(

Re: Django for a front end designer

2011-08-04 Thread kenneth gonsalves
On Thu, 2011-08-04 at 11:45 +0100, Cal Leeming wrote: > On Wed, Aug 3, 2011 at 9:15 AM, Andre Lopes > wrote: > If you want to start with a PHP Framework, consider > CodeIgniter. It is > the easier Framework for a starter. > > > I personally came from CodeIgniter. Trust me

Re: Run an application periodically on django

2011-08-04 Thread kenneth gonsalves
On Thu, 2011-08-04 at 13:43 +0300, Praveen Krishna R wrote: > On djcelery, I think you need to configure RabbitMQ or something to > work with!? correct me Kenneth, if I'm wrong. yes -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Django for a front end designer

2011-08-04 Thread Cal Leeming [Simplicity Media Ltd]
On Wed, Aug 3, 2011 at 9:15 AM, Andre Lopes wrote: > If you want to start with a PHP Framework, consider CodeIgniter. It is > the easier Framework for a starter. > OP: I personally came from CodeIgniter. Trust me, it is a *terrible* framework (in comparison to lightweight PHP frameworks and djan

Re: Django for a front end designer

2011-08-04 Thread Cal Leeming
On Wed, Aug 3, 2011 at 9:15 AM, Andre Lopes wrote: > If you want to start with a PHP Framework, consider CodeIgniter. It is > the easier Framework for a starter. > I personally came from CodeIgniter. Trust me, it is a *terrible* framework (in comparison to lightweight PHP frameworks and django).

Re: Run an application periodically on django

2011-08-04 Thread Praveen Krishna R
*If you are on Linux machine, you can use cron jobs to schedule the jobs.* * * *When I faced such a problem what I did was, I created a view to update my site with a secret Url. I have scheduled a cron job to call this url. So when the view gets called (with "curl" command I'm correct), the site ge

ModelForm bug or documentation error?

2011-08-04 Thread tow
In the ModelForm documentation (https://docs.djangoproject.com/en/dev/ topics/forms/modelforms/) the following snippet appears: # Create a form to edit an existing Article. >>> a = Article.objects.get(pk=1) >>> f = ArticleForm(instance=a) >>> f.save() I may be doing something wrong, but I can't s

Re: Integrating Selenium tests into Django unit tests.

2011-08-04 Thread Tom Christie
This... https://code.djangoproject.com/attachment/ticket/2879/django_live_server_1.0.2.diff With changes to reflect the fact that the database settings layout has changed since 1.0, like so... = # Must do database stuff in this new thread if database in memory.

Re: django smart-select

2011-08-04 Thread H . İbrahim Yılmaz
Any help? 2011/8/2 H.İbrahim Yılmaz > Any help pls? > > 2011/8/2 Dr.Linux > > Hi all, >> >> I'm so sorry for this e-mail. May be you answered similar questions >> many times. But I really need your help to learn how it's works. >> >> There is a little problem with third-level(?) models (or many

Re: Problim With Class Name and Methods

2011-08-04 Thread kenneth gonsalves
On Thu, 2011-08-04 at 00:16 -0700, Showket Bhat wrote: > I Am new to Django.. I have created few class in my models.py file.. > However i have writen clas names in small alphabits.. now when i call > the classname.objects.all() method it gives me an error. and if i > have created a class with its

Intro Tutorial-- Poll/Choice SQL writes

2011-08-04 Thread Daniel Roseman
They're not. You must have misread. You always need to save. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/X7Qgt1zv0z8J. To post to this group,

Problim With Class Name and Methods

2011-08-04 Thread Showket Bhat
Hi All.. I Am new to Django.. I have created few class in my models.py file.. However i have writen clas names in small alphabits.. now when i call the classname.objects.all() method it gives me an error. and if i have created a class with its initial letter as Capital it works Then.. Will anybod

Odp: Re: Constructing / rendering a complex

2011-08-04 Thread Slafs
Hi! Maybe You should take a look at http://pypi.python.org/pypi/django-tables2 Cheers -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/pbnH5vggj40J. To pos