Re: Query builder or report builder

2009-07-29 Thread Sergey Smagin
Dear Mike, If you not afraid of a Java applet or an ActiveX control at your web page, you may have a look at Active Query Builder at http://www.activequerybuilder.com/ It has nice MS Access-like GUI and you may fill the list of database objects among with user-friendly aliases into it; you may l

Re: custom template tags and template loaders

2009-07-29 Thread krylatij
And do you want to avoid 'django.template.loaders.app_directories.load_template_source' ? It will work only when your template will not be found in default template directory So i guess there is no overhead when you use it in production. May be you have DEBUG=True in your development version and

How to handle local changes to apps in buildout/virtualenv

2009-07-29 Thread Harley Bussell
Hi im trying to sort out the best way to handle local changes to apps within a zc.buildout structure. The project contains a mix of eggs, vcs repos and tar files and uses buildout with virtualenv. If need to modify an app one option is to copy the source to a /src folder then add the /src/custom

Re: how save data into more than one table?

2009-07-29 Thread Asinox
Thanks a lot Mike, very nice help, you example helpe me with another thing :) good!!! now, when i said "key" (sorry!!) i want to say "some code like an encryption key, and random number, etc". im reading the django help and i cant find any topic about this part (how make query than affect two or

Re: how save data into more than one table?

2009-07-29 Thread Almir Karic
Over ride your models save() method (or use signals) to execute arbitrary code when a model is saved. On Wed, Jul 29, 2009 at 7:52 PM, Asinox wrote: > > Well im talking about save a form yes, but in the same moment i want > to save x data in another table, for example, i want to generate some > "

Re: Count from 1 to 50

2009-07-29 Thread brawaga
Use filter make_list Example: {% for i in number|make_list %} ... {% endfor %} Returns the value turned into a list. For an integer, it’s a list of digits. For a string, it’s a list of characters. When U use "10" instead of "number" (no quotes, plz) U should get result required. On Jul 14,

Help with Test Client, Templates and Context

2009-07-29 Thread mviamari
I'm trying to use the test client to verify my views, but when I check the templates and contexts I get 'None' returned instead of the context dict or the template. I do get the correct content and status code however. I was hoping someone could give me some tips. Here is some example code: #v

Re: how save data into more than one table?

2009-07-29 Thread mike
I'm not clear on what you mean by "key". Foreignkey? Or for instance, an encryption key stored in two tables? I'm left to guess you mean a foreignkey. In this case, the second 'table' you refer to could have a foreignkey relating it back to the first table. If this is what you mean, then ...

Re: Question on the ticket #11563

2009-07-29 Thread Karen Tracey
2009/7/29 Daybreaker > > Um My old convention worked well in the testing environment which > has DEBUG off. (./manage.py test) > I tried to say that even if your DEBUG settings are consistent, there may still be differences in the order in which modules are loaded in different environments.

Re: how save data into more than one table?

2009-07-29 Thread Asinox
Well im talking about save a form yes, but in the same moment i want to save x data in another table, for example, i want to generate some "key" while im saving the form data, but i want to save the "key" in another table. Thanks On Jul 29, 8:52 pm, mike wrote: > On Jul 29, 3:39 pm, Asinox

Re: Django and related_name

2009-07-29 Thread Asinox
Thanks, guys im sorry Ramiro, something bother you?, im sorry. i think the problem with the indentation is the copy/paste in case of wrong indentation django/python show error's. Yes Mike is a decimal :( On Jul 29, 9:54 pm, Ramiro Morales wrote: > On Wed, Jul 29, 2009 at 6:23 PM, Asinox

Re: sqlite error: Encrypted or Not a Database

2009-07-29 Thread Alex Gaynor
On Wed, Jul 29, 2009 at 9:06 PM, Art wrote: > > I have created a Django using sqlite as the database, and everything > works fine. But when I try to open the database using sqlite directly > rather than through Django: > sqlite mydatabase.db > I receive the message "File encrypted or not a databas

sqlite error: Encrypted or Not a Database

2009-07-29 Thread Art
I have created a Django using sqlite as the database, and everything works fine. But when I try to open the database using sqlite directly rather than through Django: sqlite mydatabase.db I receive the message "File encrypted or not a database." How can I access the database outside of Django? --

Re: Django and related_name

2009-07-29 Thread Ramiro Morales
On Wed, Jul 29, 2009 at 6:23 PM, Asinox wrote: > > Hi guys, first im so sorry with my english, im new with Django, u > know ;) > > I have a problem with a related_name, the tables are fine, but the > problem is that in the Select (DropDown) the data display is "bad", in > this way: Tarifas_object:

Re: [solved]Re: test if GET is "empty"

2009-07-29 Thread Eric Abrahamsen
On Jul 29, 2009, at 9:57 PM, Salvatore Leone wrote: > > >> Given the way boolean tests go in Python, you should just be able to >> test for the dictionary itself: >> >> if request.GET: >> >> else: >> >> >> E >> > > mmm I don't think so, I think request.GET is true even if the > d

Textarea rows and cols not responding

2009-07-29 Thread Kenneth Gonsalves
hi, latest trunk: code: class Directoryform(ModelForm): def __init__(self,*args,**kwargs): super(Directoryform, self).__init__(*args, **kwargs) self.fields['address']=forms.CharField( widget=forms.Textarea(attrs={'rows':'3','cols':'40'}),max_length=500)

Re: Django and related_name

2009-07-29 Thread Mike Dewhirst
Asinox wrote: > > > Hi guys, first im so sorry with my english, im new with Django, u > know ;) > > I have a problem with a related_name, the tables are fine, but the > problem is that in the Select (DropDown) the data display is "bad", in > this way: Tarifas_object: > > Html code: > > Tarifa

Re: Query builder or report builder

2009-07-29 Thread Alex Gaynor
On Wed, Jul 29, 2009 at 7:36 PM, mike wrote: > >> I've written an app called django-filter which seems like it may be >> what you want:http://github.com/alex/django-filter/tree/master. >> Here's an example of it in use with a ticketing >> appliation:http://imgur.com/BPpmf.png >> >> Alex > > > Ale

Re: how save data into more than one table?

2009-07-29 Thread mike
On Jul 29, 3:39 pm, Asinox wrote: > Hi guys, i cant find a example about how ill save data in two or more > tables... somebody help me please > > Thanks You essentially use two form instances and feed both to your template. You can have multiple django forms in a single html form, so when they'

Re:

2009-07-29 Thread Vasil Vangelovski
Of course that the files specified in the class Media are accessed via GET. How else would they be accessed? It's possible to fetch a js file with additional get arguments and access those values from the js. So you can pass prePopulateString as a get parameter to the js file in class Media for ex

Re: Question on the ticket #11563

2009-07-29 Thread Daybreaker
Um My old convention worked well in the testing environment which has DEBUG off. (./manage.py test) Anyway, I have another question: When using admin.autodiscover(), how do I override the ModelAdmin classes provided by Django's original contrib packages like contrib.auth? I want to make a cu

Re: permalink don't works

2009-07-29 Thread Gabriel Gunderson
On Wed, Jul 29, 2009 at 2:45 AM, Brian May wrote: > I think django is great, unfortunately sometimes the documentation is lacking. Really? I think it rocks. It's way better them most projects I work with. Gabe --~--~-~--~~~---~--~~ You received this message beca

Re: Query builder or report builder

2009-07-29 Thread mike
> I've written an app called django-filter which seems like it may be > what you want:http://github.com/alex/django-filter/tree/master. > Here's an example of it in use with a ticketing > appliation:http://imgur.com/BPpmf.png > > Alex Alex, Thanks for the input! django-filter looks close. Ho

Re: Load order for fixtures

2009-07-29 Thread Russell Keith-Magee
On Thu, Jul 30, 2009 at 12:48 AM, Aaron wrote: > > Hi all, > > Is there a way to force the order of apps from which fixtures are > loaded? We have fixtures in one app that depend ( via foreign keys ) > on fixtures in another app being already loaded. In short no. The problem you describe only exi

Re:

2009-07-29 Thread Margie
> > There's no easy way of passing dynamic javascript in the Media class. > However, you can fake it, with a bit of work, by passing the parameter > to the script in a querystring. So, for example, in the list of js > files to be included you would have >     'js/myfile.js?renderclass=%s' % self.

Re: Submitting a form

2009-07-29 Thread When ideas fail
Thank you On 30 July, 00:04, Adam Yee wrote: > Use the model's verbose field > namehttp://docs.djangoproject.com/en/dev/topics/db/models/#id2 > > On Jul 29, 3:55 pm, When ideas fail wrote: > > > Is there a way i can change the label for a field in the model form? > > > On 29 July, 21:44, When

Re: Submitting a form

2009-07-29 Thread Adam Yee
Use the model's verbose field name http://docs.djangoproject.com/en/dev/topics/db/models/#id2 On Jul 29, 3:55 pm, When ideas fail wrote: > Is there a way i can change the label for a field in the model form? > > On 29 July, 21:44, When ideas fail wrote: > > > > > Ok thanks seems to work now. >

Re: Submitting a form

2009-07-29 Thread When ideas fail
Is there a way i can change the label for a field in the model form? On 29 July, 21:44, When ideas fail wrote: > Ok thanks seems to work now. > > On 29 July, 21:27, Daniel Roseman wrote: > > > On Jul 29, 9:17 pm, When ideas fail wrote: > > > > I've created a model form and I was wondering what

Re: Submitting a form

2009-07-29 Thread When ideas fail
Is there a way i can change the label for a field in the model form? On 29 July, 21:44, When ideas fail wrote: > Ok thanks seems to work now. > > On 29 July, 21:27, Daniel Roseman wrote: > > > On Jul 29, 9:17 pm, When ideas fail wrote: > > > > I've created a model form and I was wondering what

Re: IDE for Django and Ext JS

2009-07-29 Thread Brandon
I've had a lot of success with Aptana + PyDev. Aptana is basically Eclipse without the JDK, so it's much lighter, and the 1.5 version is 64bit - much faster than 1.4.x No template language support, but you get code assist for everything else. You can also create Python runtimes for debuging, whic

Re: Global variables

2009-07-29 Thread Brandon
One way to accomplish this is to use a custom context processor to add the variable to each and every response. You will need to explicitly pass in the request_context for the view(s), as far as I know, to make this work. Brandon On Jul 28, 1:19 pm, Dirso wrote: > Hi, > I created a template wit

Re: Can I have custom validation in the admin change_list form when using ModelAdmin.list_editable?

2009-07-29 Thread Vasil Vangelovski
That works, thanx. On Thu, Jul 30, 2009 at 12:07 AM, Alex Gaynor wrote: > > On Wed, Jul 29, 2009 at 5:05 PM, Vasil > Vangelovski wrote: >> >> Is it possible to define custom validation for the form in the admin >> change list when using ModelAdmin.list_editable? >> >> > >> > > Yes, get_changelist

Re: how save data into more than one table?

2009-07-29 Thread Vasil Vangelovski
What exactly do you need to do? Please be more specific. On Wed, Jul 29, 2009 at 11:39 PM, Asinox wrote: > > Hi guys, i cant find a example about how ill save data in two or more > tables... somebody help me please > > Thanks > > > --~--~-~--~~~---~--~~ You recei

Re: Can I have custom validation in the admin change_list form when using ModelAdmin.list_editable?

2009-07-29 Thread Alex Gaynor
On Wed, Jul 29, 2009 at 5:05 PM, Vasil Vangelovski wrote: > > Is it possible to define custom validation for the form in the admin > change list when using ModelAdmin.list_editable? > > > > Yes, get_changelist_form, and get_changelist_formset: http://code.djangoproject.com/browser/django/trunk/dj

Can I have custom validation in the admin change_list form when using ModelAdmin.list_editable?

2009-07-29 Thread Vasil Vangelovski
Is it possible to define custom validation for the form in the admin change list when using ModelAdmin.list_editable? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

how save data into more than one table?

2009-07-29 Thread Asinox
Hi guys, i cant find a example about how ill save data in two or more tables... somebody help me please Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Django and related_name

2009-07-29 Thread Asinox
Hi guys, first im so sorry with my english, im new with Django, u know ;) I have a problem with a related_name, the tables are fine, but the problem is that in the Select (DropDown) the data display is "bad", in this way: Tarifas_object: Html code: Tarifas object how ill display the correct

Re:

2009-07-29 Thread Daniel Roseman
On Jul 29, 10:01 pm, Margie wrote: > Currently each of my autocomplete fields ends up rendering with this > long script containing the contents of that html snippet (but longer > since there are a bunch of other arguments).  Is there a way for me to > use the model that you're describing for thi

Django Permissions: Disabling automatic creation of default permissions

2009-07-29 Thread Jashugan
Hi, I use custom permissions in my application and do not use the default permissions. How do I disable the automatic creation of the default permissions (i.e. when manage.py syncdb is called), while still enabling creation of custom permissions? TIA --~--~-~--~~~---~

Re:

2009-07-29 Thread Margie
Ok - yes, that works great for my date widget. So now I have just a tiny .js file that contains this: $(document).ready(function() { Date.firstDayOfWeek = 0; Date.format = 'mm/dd/'; $('.chipvision_date_widget').datePicker();

Re: Submitting a form

2009-07-29 Thread When ideas fail
Ok thanks seems to work now. On 29 July, 21:27, Daniel Roseman wrote: > On Jul 29, 9:17 pm, When ideas fail wrote: > > > > > I've created a model form and I was wondering what the correct way to > > save this was. I've tried adapting the view from the standard django > > forms docs but maybe it

Re: Submitting a form

2009-07-29 Thread Daniel Roseman
On Jul 29, 9:17 pm, When ideas fail wrote: > I've created a model form and I was wondering what the correct way to > save this was. I've tried adapting the view from the standard django > forms docs but maybe it should be different? > > This is what i have in my view (it says contact form but its

Submitting a form

2009-07-29 Thread When ideas fail
I've created a model form and I was wondering what the correct way to save this was. I've tried adapting the view from the standard django forms docs but maybe it should be different? This is what i have in my view (it says contact form but its a form that should save contacts in a db): class Co

Re:

2009-07-29 Thread Vasil Vangelovski
> The way I do it is what you allude to at the end, have a special class > on the inputs and then use the inner Media class of the widget > (http://docs.djangoproject.com/en/dev/topics/forms/media/) to provide > a javascript file that'll automatically add the widget to all of the > items with that

Re:

2009-07-29 Thread Alex Gaynor
On Wed, Jul 29, 2009 at 2:25 PM, Margie wrote: > > I have a question about what people recommend when rendering custom > widgets.  My question relates to whether the rendered widgets should > contain their own scripts.  Let me use an example.  Say I have a table > and each row in the table has a d

django-users@googlegroups.com

2009-07-29 Thread Margie
I have a question about what people recommend when rendering custom widgets. My question relates to whether the rendered widgets should contain their own scripts. Let me use an example. Say I have a table and each row in the table has a date input. To the right of each date input I want to ren

Re: sqlcustom example?

2009-07-29 Thread Joshua Russo
On Jul 29, 12:48 pm, Joshua Russo wrote: > I'm confused about how sqlcustom fits into the dbsync process. > I ran "manage.py sqlcustom myapp" and it printed the sql properly but that's > all it did. Granted that's all the docs say it does anyway, but then how do > execute those statements? For a

Comment Detail URI

2009-07-29 Thread grElement
One thing I'm trying to do is have an view that shows an individual comment. So for instance I will have a list of comments and then you could link that to a page that pulled up a view that just displayed that individual comment. So I have urls that look something like: mysite.com/document/ch/se

Re: custom template tags and template loaders

2009-07-29 Thread chefsmart
I got no other custom tags. This is pretty confusing. It works perfectly on the django dev server with no code changes. Don't really know enough about the pre-requisites (settings.py, etc) for using custom templatetags, so haven't progressed much in my troubleshooting. On Jul 29, 9:24 pm, krylat

Oracle 11g + mod_wsgi + Apache + Django on Windows 2003 does not work

2009-07-29 Thread tcpipmen
Hi All, I have no problem running Oracle 11g with django on build-in development server and everything is fine. But When I setup with mod_wsgi with Apache I'm getting messages like below. I'm using python 2.6 and installed cx_Oracle-5.0.2-11g.win32-py2.6.msi. ORACLE_HOME is set to "C:\app\Admini

Re: templatetag issue

2009-07-29 Thread Daymien
My Setup is on the Intranet of my company (SLES 10 SP2 System with apache2 and Django 1.1) --~--~-~--~~~---~--~~ 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@google

Re: captcha

2009-07-29 Thread Gabriel .
On Wed, Jul 29, 2009 at 3:38 PM, ramanathan wrote: > > how to include captcha code in django ? > Did you try google? http://code.google.com/p/django-simple-captcha/ http://seeknuance.com/2008/03/18/integrating-recaptcha-with-django/ -- Kind Regards --~--~-~--~~~-

Re: inspectdb and MySQL

2009-07-29 Thread Joshua Russo
On Wed, Jul 29, 2009 at 2:39 PM, Juanjo Conti wrote: > 2009/7/29 Joshua Russo : > > On Wed, Jul 29, 2009 at 12:35 PM, Juanjo Conti > wrote: > >> > >> In http://docs.djangoproject.com/en/dev/ref/django-admin/ i read > >> "inspectdb works with PostgreSQL, MySQL and SQLite. Foreign-key > >> detecti

captcha

2009-07-29 Thread ramanathan
how to include captcha code in django ? Regards Ramanathan.M --~--~-~--~~~---~--~~ 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

Re: Query builder or report builder

2009-07-29 Thread Alex Gaynor
On Wed, Jul 29, 2009 at 12:38 PM, mike wrote: > > I'm new to django, somewhere between a newbie and novice :-). > > I'm looking for a query builder front end...middleware or app, and > thought I'd ask if anyone knows of such a django app or middleware. > I'm trying to avoid re-inventing the wheel,

Query builder or report builder

2009-07-29 Thread mike
I'm new to django, somewhere between a newbie and novice :-). I'm looking for a query builder front end...middleware or app, and thought I'd ask if anyone knows of such a django app or middleware. I'm trying to avoid re-inventing the wheel, but I'm willing write one if one doesn't exist. I've fo

Re: Where is the "Else if"... ?

2009-07-29 Thread Daniel Roseman
On Jul 29, 4:54 pm, Asinox wrote: > Hi guy, im looking for the simpley  if ...else if but i cant see > in the django documentation > > Thanks :) You need to be slightly less concise in your question. Do you mean in the template language? If so, it doesn't have one, by design. You can ne

Re: IDE for Django and Ext JS

2009-07-29 Thread Vasil Vangelovski
There's not much benefit in using an IDE like eclipse or netbeans for Python and JS, they are also slow enough to counter productivity. I'd rather waste those CPU cycles for playing random noises in the background. --~--~-~--~~~---~--~~ You received this message be

Re: Unsupported operand type(s) for *: 'Decimal' and 'Decimal'

2009-07-29 Thread Dave MacFarlane
On 28-Jul-09, at 8:40 PM, Karen Tracey wrote: > > I don't know if it's still an issue but I have a vague recollection > of seeing a similar problem mentioned fairly recently, and reported > as fixed by upgrading psycopg2. I'm not up on psycopg2 levels -- is > 2.0.7 the latest? > > You can s

Re: ANN: Django 1.1 released!

2009-07-29 Thread matt barto
Congrats! Can't wait to try it out. Thanks for all the hard work. On Jul 28, 11:23 pm, James Bennett wrote: > Tonight we're extremely proud to announce the release of Django 1.1, > the latest major milestone in Django's development. > > To learn about the new release: > > * Blog post:http://ww

Re: IDE for Django and Ext JS

2009-07-29 Thread Hank Gay
There's a well-reviewed [Python plugin](http://plugins.intellij.net/plugin/?id=631) for IntelliJ, though the Django front is not as promising. On Wed, Jul 29, 2009 at 12:06 PM, jvivs wrote: > > My development pattern at this point consists of Aptana + PyDev for > python and Textmate with Django b

Load order for fixtures

2009-07-29 Thread Aaron
Hi all, Is there a way to force the order of apps from which fixtures are loaded? We have fixtures in one app that depend ( via foreign keys ) on fixtures in another app being already loaded. Thanks in advance, Aaron --~--~-~--~~~---~--~~ You received this messa

Re: Full-text search: what to use

2009-07-29 Thread Kegan
Any thoughts on using PostgreSQL built-in full text search ? On Jul 29, 5:49 pm, "dlvosse...@gmail.com" wrote: > I've recently adopted the use of xapian for full text search, via the > djapian django app which works like a charm. Xapian is written in C++ > with python bindings, and with the dja

Re: custom template tags and template loaders

2009-07-29 Thread krylatij
And what about other custom tags? I actually have no more ideas, what it can be. --~--~-~--~~~---~--~~ 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.co

How can I reload attributes from the database

2009-07-29 Thread Fleg
Hi, I have a model mapping tables in a database with several foreign keys. class Scheduler(models.Model): id_schedule = models.AutoField(primary_key=True) id_parent = models.ForeignKey ("Scheduler",db_column='id_parent',to_field='id_schedule') id_object_type = models.Forei

Re: IDE for Django and Ext JS

2009-07-29 Thread jvivs
My development pattern at this point consists of Aptana + PyDev for python and Textmate with Django bundles for templating. I'm used to writing javascript in Intellij IDEA, so I really wish they would get their crap together and implement python/django support. Barring that, Aptana's pretty dece

Re: Where is the "Else if"... ?

2009-07-29 Thread Fred Chevitarese
Maybe you have to look on the python documentation. http://www.python.org/doc/ 2009/7/29 Asinox > > Hi guy, im looking for the simpley if ...else if but i cant see > in the django documentation > > Thanks :) > > > -- http://chevitarese.wordpress.com Fred Chevitarese - GNU/Linux -

Where is the "Else if"... ?

2009-07-29 Thread Asinox
Hi guy, im looking for the simpley if ...else if but i cant see in the django documentation Thanks :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

[solved]Re: file upload issue

2009-07-29 Thread Salvatore Leone
Again I found the answer... I forgot to put enctype="multipart/form-data" in my form... sorry for disturbing you. -S Salvatore Leone ha scritto: > Hello again, > > I know this is probably an already discussed question, but I can't get > out of this. I've got a form which may or may not send

Re: inspectdb and MySQL

2009-07-29 Thread Juanjo Conti
2009/7/29 Joshua Russo : > On Wed, Jul 29, 2009 at 12:35 PM, Juanjo Conti wrote: >> >> In http://docs.djangoproject.com/en/dev/ref/django-admin/ i read >> "inspectdb works with PostgreSQL, MySQL and SQLite. Foreign-key >> detection only works in PostgreSQL and with certain types of MySQL >> table

Re: file upload issue

2009-07-29 Thread cootetom
Use a modal form for this which includes a file field that has required set to false. http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#topics-forms-modelforms http://docs.djangoproject.com/en/dev/ref/forms/fields/#filefield Easier to let django handle the request then figure it all

file upload issue

2009-07-29 Thread Salvatore Leone
Hello again, I know this is probably an already discussed question, but I can't get out of this. I've got a form which may or may not send a file, here is the snippet of my view function: if request.method == POST: #process the form ... if request.FILES: att

[Internationalization] javascript catalog

2009-07-29 Thread Adrián Ribao
Hello, I'm trying to use the javascript catalog in a project. The documentation says: Those translation strings are taken from the application, project or Django core, according to what you specify in either the info_dict or the URL. Well, I need to load the strings from the project. I mean, Al

Re: Simple Pagination Problem

2009-07-29 Thread Alex Gaynor
On Wed, Jul 29, 2009 at 10:04 AM, Mark wrote: > > Ye thats what I was afraid of - i was hoping there was something in > the Pagination object that would help me out. > But I cant see anything. > > Maybe someone will point it out after I have implemented the above. > > Thanks. > > On Jul 29, 3:58 p

Re: Simple Pagination Problem

2009-07-29 Thread Mark
Ye thats what I was afraid of - i was hoping there was something in the Pagination object that would help me out. But I cant see anything. Maybe someone will point it out after I have implemented the above. Thanks. On Jul 29, 3:58 pm, cootetom wrote: > You may have to do a bit of computation b

Re: Simple Pagination Problem

2009-07-29 Thread cootetom
You may have to do a bit of computation back on the server in python code to get the data you're after. From the pagination object you know what page you are currently on, you also know how many items are on a page so: last_item = page_num * items_per_page first_item = last_item - items_per_page

Re: Simple Pagination Problem

2009-07-29 Thread Mark
These seem to be what I am looking for - but they are not available in the template from what I see. page2.start_index() page2.end_index() On Jul 29, 3:51 pm, Mark wrote: > Thanks, but I have been. Its still not clear - To date I have always > beendisplaying > > "Page 1 of 23. Showing 10results

Re: Simple Pagination Problem

2009-07-29 Thread Mark
Thanks, but I have been. Its still not clear - To date I have always been displaying "Page 1 of 23. Showing 10 results per page" I am just lost on how to do this. On Jul 29, 3:44 pm, krylatij wrote: > Read > documentationhttp://www.djangoproject.com/documentation/models/pagination/ --~--~

Re: Simple Pagination Problem

2009-07-29 Thread cootetom
Yes, have a read of the documentation. When you create a pagination class you have access to all the variables needed that tell you how many pages there are, what page you are currently on etc. http://docs.djangoproject.com/en/dev/topics/pagination/#topics-pagination On Jul 29, 3:15 pm, Aldo w

Re: Re: How to send form via email

2009-07-29 Thread el_kolo
Thank you for your answer but there is error "join() takes exactly one argument (3 given)" "Jeremy Boyd" pisze: > > Kolo, > > I'm not positive this is what you're asking, but it seems to me that > a) you might want to build up a string with the message as you'd like > it to be displayed. So, f

Re: templatetag issue

2009-07-29 Thread chefsmart
Where is your production setup? Webfaction? VPS? And which version of Django are you using? On Jul 29, 7:12 pm, Daymien wrote: > Your solution don't work for me yet :-( > I have been copy the note_tags.py to django/templatetags/ and > restartet Apache. > But I got the same issue. Is there anyth

Re: Simple Pagination Problem

2009-07-29 Thread krylatij
Read documentation http://www.djangoproject.com/documentation/models/pagination/ --~--~-~--~~~---~--~~ 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

Re: custom template tags and template loaders

2009-07-29 Thread chefsmart
I get the following message. Please note that everything is ok in my development setup, but the same thing doesn't work in my production setup. TemplateSyntaxError at /staff/ 'smart_if' is not a valid tag library: Could not load template library from django.templatetags.smart_if, No module name

Re: XML serialization and Unicode

2009-07-29 Thread l5x
Hello, On 29 Lip, 15:56, cootetom wrote: > To add, something just popped into my head. Have you got > DEFAULT_CHARSET = 'utf-8' in your settings.py fiile It didn't help. > On Jul 29, 2:51 pm, cootetom wrote: > > > I would imagine that the deserialize function tries to encode the > > input dow

Re: ANN: Django 1.1 released!

2009-07-29 Thread evilek
Good job! Congratulations and 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 em

Re: [solved]Re: test if GET is "empty"

2009-07-29 Thread Luke Seelenbinder
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is a more "pythonic" way to test, use request.GET.get(, False) e.g.: if request.GET.get('q', False): etc. That tests the dict for the key 'q' if it's not there, it returns false. Luke Seelenbinder luke.seelenbin...@gmail.com Salvatore Leon

Re: custom template tags and template loaders

2009-07-29 Thread krylatij
I my case custom tags are still working after i removed ''django.template.loaders.app_directories.load_template_source'' from settings. You can see comment in site-packages\django\template\loaders \app_directories.py: """ Wrapper for loading templates from "templates" directories in INSTALLED_APPS

Re: How to send form via email

2009-07-29 Thread Steve Schwarz
On Wed, Jul 29, 2009 at 9:08 AM, el_kolo wrote: > > Hi, > > I have a form (class myForm(forms.Form)) with a few fields. I want to > send this form to my email account. I have put this form to my > template with button SEND. Everything works fine but using send_mail > function I can send only ONE

Re: How to send form via email

2009-07-29 Thread Jeremy Boyd
Kolo, I'm not positive this is what you're asking, but it seems to me that a) you might want to build up a string with the message as you'd like it to be displayed. So, for example: subject = field1 + " has sent you a new message" message = " ".join("You have a new message! Here are the form fie

Simple Pagination Problem

2009-07-29 Thread Aldo
I want to display to my html page Displaying results 1- 10 of 55322 found. Is there something straight forward in the pagination to do this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: templatetag issue

2009-07-29 Thread Daymien
Your solution don't work for me yet :-( I have been copy the note_tags.py to django/templatetags/ and restartet Apache. But I got the same issue. Is there anything else to do? Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

How to send form via email

2009-07-29 Thread el_kolo
Hi, I have a form (class myForm(forms.Form)) with a few fields. I want to send this form to my email account. I have put this form to my template with button SEND. Everything works fine but using send_mail function I can send only ONE field from my from to my email account. send_mail('Subject her

Re: IDE for Django and Ext JS

2009-07-29 Thread Wiiboy
I use Kate for all my stuff, because, although not an IDE, it is one hell of text editor. --~--~-~--~~~---~--~~ 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@googleg

Re: [solved]Re: test if GET is "empty"

2009-07-29 Thread Salvatore Leone
> Given the way boolean tests go in Python, you should just be able to > test for the dictionary itself: > > if request.GET: > > else: > > > E > mmm I don't think so, I think request.GET is true even if the dictionary is empty, isn't it? so the test will allways return tru

Re: templatetag issue

2009-07-29 Thread Daymien
I have teh __init__.py in the directory, too. I use the newest stabel 1.1 So I will try your solution... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: XML serialization and Unicode

2009-07-29 Thread cootetom
To add, something just popped into my head. Have you got DEFAULT_CHARSET = 'utf-8' in your settings.py file. On Jul 29, 2:51 pm, cootetom wrote: > I would imagine that the deserialize function tries to encode the > input down to ascii. My suggestion would be to find the XML serializer > code a

Re: templatetag issue

2009-07-29 Thread chefsmart
In my case, I have the __init__.py just as I do on my development environment. On Jul 29, 6:46 pm, Greg Fuller wrote: > Are you  missing a __init__.py in the tags directory? > > On Jul 29, 7:57 am, Daymien wrote: > > > Hallo, > > > I created a templatetag, wich I use to display some notes on ad

Re: XML serialization and Unicode

2009-07-29 Thread cootetom
I would imagine that the deserialize function tries to encode the input down to ascii. My suggestion would be to find the XML serializer code and see what it is doing with the input string you pass to it. On Jul 29, 2:23 pm, l5x wrote: > Hello, > > first of all, congratulations! > > I have a p

sqlcustom example?

2009-07-29 Thread Joshua Russo
I'm confused about how sqlcustom fits into the dbsync process. I ran "manage.py sqlcustom myapp" and it printed the sql properly but that's all it did. Granted that's all the docs say it does anyway, but then how do execute those statements? --~--~-~--~~~---~--~~ Yo

Re: templatetag issue

2009-07-29 Thread Greg Fuller
Are you missing a __init__.py in the tags directory? On Jul 29, 7:57 am, Daymien wrote: > Hallo, > > I created a templatetag, wich I use to display some notes on admin > index template. > With the bildin develop webserver all works fine. > > But when I start the apache server with mod_wsgi or

  1   2   >