Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
Why , for example, collectstatic copied not static content? example, /home/peter/work/django/projects/src/mysite/polls/ - it's all new project file, there were no statics yet See there: Copying '/usr/local/lib/python2.7/dist-packages/django/contrib/admin/media/img/gis/move_vertex_off.png'

Re: making history

2011-08-10 Thread Mike Dewhirst
On 11/08/2011 9:51am, Shawn Milochik wrote: Mike, I'm doing something similar in another project. I created a sublass of models.Model and am using that throughout the project, which makes it much easier. I'm sub-classing models.Model to include created, updated and updated_by fields which is

Releasing my Fabfile for Django projects

2011-08-10 Thread Andrew Badr
Hi, I'm posting here to announce the release of the Fabfile that I use for Django projects. Using it, you can make your Django project live with a single command. It also comes with a default project layout that I like to start from. Get the code at https://github.com/reverie/django-fabfile, and

Re: making history

2011-08-10 Thread Shawn Milochik
Mike, I'm doing something similar in another project. I created a sublass of models.Model and am using that throughout the project, which makes it much easier. On the post-save of any subclass of my custom model, I serialize the model's fields as a JSON object and store it in a text field of my

Re: making history

2011-08-10 Thread Mike Dewhirst
On 10/08/2011 10:37pm, Shawn Milochik wrote: I do essentially that, using a post_save signal and dumping the serialized model instance to MongoDB with datestamp, etc. The relevant part is this (after importing Django's serializers): serialized_object = serializers.serialize(

Re: Displaying results in Template in a Table ? What is the proper way ?Any app?

2011-08-10 Thread David
I'm a fan of django_tables2. You have to write the CSS yourself if you want anything special, but I'm ok with that. It does a good job of handling server side pagination and sorting as well as custom column renderers. It also ties in pretty well with Django models if you need that kind of thing.

Re: Displaying results in Template in a Table ? What is the proper way ?Any app?

2011-08-10 Thread Brian Bouterse
I know it's not Django specific, but when I need a table for my Django projects, I use jQuery Datatable . It rocks! Brian On Wed, Aug 10, 2011 at 5:26 PM, Adam Zedan wrote: > Or in other words a good datagrid to use with Djano...What do u >

Re: spam in response to posting to this list

2011-08-10 Thread Brian Bouterse
+1 to your suggestion of folks not overusing +1 On Wed, Aug 10, 2011 at 5:51 PM, Michal Petrucha wrote: > On Thu, Aug 11, 2011 at 12:14:37AM +0300, Praveen Krishna R wrote: > > *+1 > > * > > On Wed, Aug 10, 2011 at 7:32 PM, Kayode Odeyemi > wrote: > >

Re: same form model with separate admins and data

2011-08-10 Thread Landy Chapman
If I understand you correctly, your situation is: FORM 1 --> [table 1] FORM 2 --> [table 2] where FORM1 and FORM2 are *identical*, and TABLE1 and TABLE2 are *identical* (same structure) *identical* meaning definition is the same but names are different for obvious reasons... If I

Re: spam in response to posting to this list

2011-08-10 Thread Michal Petrucha
On Thu, Aug 11, 2011 at 12:14:37AM +0300, Praveen Krishna R wrote: > *+1 > * > On Wed, Aug 10, 2011 at 7:32 PM, Kayode Odeyemi wrote: > > > I have been getting this too. Please, people, be at least a little bit reasonable. Let's not make this another completely pointless "+1,

Re: How to pass url parameters to template url tag

2011-08-10 Thread bruno desthuilliers
On 10 août, 21:52, Kayode Odeyemi wrote: > On Wed, Aug 10, 2011 at 6:57 PM, bruno desthuilliers < > > bruno.desthuilli...@gmail.com> wrote: > > On 10 août, 16:30, Tom Evans wrote: > > > Now for the third solution: write your own template tag. Not > >

Re: Displaying results in Template in a Table ? What is the proper way ?Any app?

2011-08-10 Thread Adam Zedan
Or in other words a good datagrid to use with Djano...What do u people suggest or use?? On Aug 11, 1:52 am, Adam Zedan wrote: > Hi i wanted to know what do most people here do when they need to show > results in a template which just needs to be displayed in Table. > For

Re: spam in response to posting to this list

2011-08-10 Thread Praveen Krishna R
*+1 * On Wed, Aug 10, 2011 at 7:32 PM, Kayode Odeyemi wrote: > I have been getting this too. > > > On Wed, Aug 10, 2011 at 5:15 PM, Tom Evans wrote: > >> On Wed, Aug 10, 2011 at 5:06 PM, Eric Hutchinson >> wrote: >> >

Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
on windows it also was 1.3 I collected statics as you said, but it brought also many not static files Actually all my sources went there. On 10 August 2011 22:49, Gelonida N wrote: > On 08/10/2011 09:01 PM, Peter Kovgan wrote: > > Ok, Ok, I've got it, read docs. > > > >

Displaying results in Template in a Table ? What is the proper way ?Any app?

2011-08-10 Thread Adam Zedan
Hi i wanted to know what do most people here do when they need to show results in a template which just needs to be displayed in Table. For example displaying data from a db etc in a template. I did try an app called django_tables2 but it just seems really simple with respect to presentation. I

Re: same form model with separate admins and data

2011-08-10 Thread brian
I'm using the Model->ModelForm flow. I was starting with the model and working my way up. Once I get the model I was going to switch to the form and then the view. Brian -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: How to pass url parameters to template url tag

2011-08-10 Thread Kayode Odeyemi
On Wed, Aug 10, 2011 at 6:57 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 10 août, 16:30, Tom Evans wrote: > > > Now for the third solution: write your own template tag. Not > necessarily required, but that's often the best solution wrt/ >

Re: dull look after install on ubuntu

2011-08-10 Thread Gelonida N
On 08/10/2011 09:01 PM, Peter Kovgan wrote: > Ok, Ok, I've got it, read docs. > > But why It must be so complex? > Why default admin statics become unavailable, if you use another server > and not that of development: "runner"? > > Should it mean, that I must find elsewhere my admin statics,

Re: 'str' object has no attribute 'resolve' when access admin site

2011-08-10 Thread raj
And yea, admin docs is in my installed list. Much appreciated. Still can't get it to work. This was my traceback: 'str' object has no attribute 'resolve' Request Method: GET Django Version: 1.3 Exception Type: AttributeError Exception Value: 'str' object has no attribute

Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
Ok, Ok, I've got it, read docs. " The static files tools are mostly designed to help with getting static files successfully deployed into production. This usually means a separate, dedicated static file server, which is a lot of overhead to mess with when developing locally. Thus, the staticfiles

Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
I resolved it, setting DEBUG = True, it was False for some reason, and it worked so on windows. I have some doubts, that static files should become unavailable when you set debug=false. What do you think? On 10 August 2011 21:46, Peter Kovgan wrote: > I seriously

Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
I seriously tried. you did not get, that I do not see statics of the ADMIN directory, not of my own creations. EVEN ADMIN does not work. So basically, python does not see admin's preinstalled static files. To be sure: I'm a beginner, I go through my first tutorial. I ran the same application on

Re: Installation Problem cant extract tar.gz file

2011-08-10 Thread Shawn Milochik
What's the output when you try this at the command line? tar -xzf django1.3.tar.gz -- 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

Re: same form model with separate admins and data

2011-08-10 Thread bruno desthuilliers
On 10 août, 19:57, brian wrote: > Hi Michal, > > Can you provide details about the QuerySets part?  I'm new to Django. > > One of the ideas I had was using inheritance.  For example: > --- > myBaseModel(models.Model) >    … > > class form1(

Re: How to pass url parameters to template url tag

2011-08-10 Thread bruno desthuilliers
On 10 août, 16:35, Reinout van Rees wrote: > > Best solution: calculate that url in your python view code and just pass > it along in the context. Definitly not the best solution if this has to work for more than exactly ONE view. > The generic rule is that most processing

Re: same form model with separate admins and data

2011-08-10 Thread brian
Hi Michal, Can you provide details about the QuerySets part? I'm new to Django. One of the ideas I had was using inheritance. For example: --- myBaseModel(models.Model) … class form1( myBaseModel ): pass --- The problem I'm seeing is

Re: Installation Problem cant extract tar.gz file

2011-08-10 Thread Andre Terra
Possible solutions: 1) Try downloading the file again 2) Checkout from the svn repository. 3) Use a different archive manager. I'd go with options #2, personally. Cheers, AT On Wed, Aug 10, 2011 at 1:08 PM, danielvanvane wrote: > Hello, > > I want to start with

Missing POST request with WSGI

2011-08-10 Thread RoyWilliams
My problem is that POST data is not being copied into the request object that my Django code is getting, but the problem only happens with WSGI. When I fill in the web form with a browser, the POST data comes through correctly: request.method is POST and the QueryDict has my parameters. But when

Installation Problem cant extract tar.gz file

2011-08-10 Thread danielvanvane
Hello, I want to start with Django, but i got serval problem during the installation: First I installed Python 2.7 and MySQL then i downloaded django1.3 (and django 1.25) Now i clicked on the django1.3 .tar.gz and i got this problem(also on other versions): Archivmanager says: tar: This does

Worshkop

2011-08-10 Thread pankaj sharma
hello friends there is a workshop to be conducted in india (kolkata) by ednect services, it will also include information about django if we want that everybody use django so everybody will try to conduct same kind of workshop in their cities. and also like this link

Re: spam in response to posting to this list

2011-08-10 Thread Kayode Odeyemi
I have been getting this too. On Wed, Aug 10, 2011 at 5:15 PM, Tom Evans wrote: > On Wed, Aug 10, 2011 at 5:06 PM, Eric Hutchinson > wrote: > > I responded to the thread about ordering tables, and got this as a > > response > > > > I

Re: spam in response to posting to this list

2011-08-10 Thread Tom Evans
On Wed, Aug 10, 2011 at 5:06 PM, Eric Hutchinson wrote: > I responded to the thread about ordering tables, and got this as a > response > I reported the same thing a couple of days ago. Russell Keith-Magee is aware of the issue (he gets them too), but it seems

spam in response to posting to this list

2011-08-10 Thread Eric Hutchinson
I responded to the thread about ordering tables, and got this as a response (warning, raw source) Delivered-To: eric.hutchin...@burgopakusa.com Received: by 10.220.167.200 with SMTP id r8cs290642vcy; Wed, 10 Aug 2011 09:02:33 -0700 (PDT) Received: from mr.google.com ([10.91.50.12])

Re: How to order "links" in the Admin?

2011-08-10 Thread Eric Hutchinson
This is a meta option. from django.db import models import datetime class Directory(models.Model): website_name = models.CharField(max_length=200) website_url = models.CharField(max_length=200) website_position = models.IntegerField() pub_date = models.DateTimeField('date published')

Re: django and extjs: works well together?

2011-08-10 Thread Andre Terra
You've now successfully whetted my appetite http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/group-summary-grid.html I'll try to use that some time in the future. Cheers, AT On Wed, Aug 10, 2011 at 12:32 PM, william ratcliff < william.ratcl...@gmail.com> wrote: > We've used it--it's

Re: How to order "links" in the Admin?

2011-08-10 Thread creecode
Hello Andre, Try a Google search for "django admin drag drop reorder admin". Several results there that might point you in the right direction. I have used a variation on this Django Snippet < http://djangosnippets.org/snippets/1053/ > to do reordering in some of my projects.

Re: django and extjs: works well together?

2011-08-10 Thread william ratcliff
Incidentally, the example website was coded by a high school student over the course of a 6 week summer internship with us (who had to learn javascript, django, and python during that time), so I think the learning curve shouldn't be too steep William On Wed, Aug 10, 2011 at 11:32 AM,

Re: django and extjs: works well together?

2011-08-10 Thread william ratcliff
We've used it--it's really domain specific, but you can look at tripleaxis.smallangles.net (please don't crash us :>). We do the front end with extjs and the back-end with django. We have a number of ajax calls made by extjs and then handled by django. We're also finishing up a dataflow

django and extjs: works well together?

2011-08-10 Thread Reinout van Rees
Hi, Several people in my workplace are looking at extjs now. http://www.sencha.com/products/extjs/examples/ Basically, a big javascript UI construction kit. To me it feels like a desktop app in a browser window. Question: does anyone have experience (positive or negative) with extjs in

GeoDjango and pyspatialite

2011-08-10 Thread Sean
GeoDjango normally looks for libspatialite for Spatialite functionality. I want to use, instead, pyspatialite which has the spatialite functions built into the sqlite3 library. I changed the reference in the standard sqlite3 backend base.py to use pyspatialite instead of pysqlite2/sqlite3. I

Re: Generating urls for a search-engine-like application

2011-08-10 Thread samuele.mattiuzzo
Yeah, i'll be taking the best out of every hint! The big problem is that the user has a lot of freedom. If he just wants to search for "barber" he can and urls will be /barber/ /... Every parameter is optional, they're just bound to an order, if they're all present... So i don't have a "special"

Re: How to pass url parameters to template url tag

2011-08-10 Thread Reinout van Rees
On 10-08-11 16:17, Kayode Odeyemi wrote: I need some help on how to pass url parameters to template url tag. Something like this: my page page is the url parameter I want to get Best solution: calculate that url in your python view code and just pass it along in the context. The generic

Re: How to pass url parameters to template url tag

2011-08-10 Thread Tom Evans
On Wed, Aug 10, 2011 at 3:17 PM, Kayode Odeyemi wrote: > Hello friends, > I need some help on how to pass url parameters to template url tag. > Something like this: > my page > page is the url parameter I want to get > Thank you You have two options: you can extract the value

Re: Generating urls for a search-engine-like application

2011-08-10 Thread Reinout van Rees
On 10-08-11 15:50, samuele.mattiuzzo wrote: I was considering the option/country/italy/city/milan/job/engineer/, it wasn't that bat, but i'm risking very long urls if 4-5 parameters are set... If /italy/milan/barber is the normal url, by all means use that. The other scenarios can then get a

How to pass url parameters to template url tag

2011-08-10 Thread Kayode Odeyemi
Hello friends, I need some help on how to pass url parameters to template url tag. Something like this: my page page is the url parameter I want to get Thank you -- Odeyemi 'Kayode O. http://www.sinati.com. t: @charyorde -- You received this message because you are subscribed to the

Re: Generating urls for a search-engine-like application

2011-08-10 Thread samuele.mattiuzzo
Well, i don't understand it plenty, since i never spoke with them directly. Btw, our "seo consultants" said that /london/designer/ is SEO-OK while ?city=london=designer is SEO-BAD. I really don't think there's much difference between the two, but i cannot discuss too much with them :) On Aug 10,

Re: Generating urls for a search-engine-like application

2011-08-10 Thread Venkatraman S
On Wed, Aug 10, 2011 at 2:50 PM, samuele.mattiuzzo wrote: > my boss told me to use get requests instead of post, so i could > explicit the parameters, but SEO experts said "NO WAY!". i don't like > get method either, but the reason is different :P > I dont understand SEO

Re: Generating urls for a search-engine-like application

2011-08-10 Thread samuele.mattiuzzo
Yeah, it was just a shorthand to let you understand my problem, it wasn't my actual url definition :) I was considering the option /country/italy/city/milan/job/engineer/, it wasn't that bat, but i'm risking very long urls if 4-5 parameters are set... On Aug 10, 12:18 pm, Reinout van Rees

Re: dull look after install on ubuntu

2011-08-10 Thread Tom Evans
On Wed, Aug 10, 2011 at 3:53 AM, Peter Kovgan wrote: > Thank you guys. > > "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/storage.py", > line 23, in __init__ >     raise ImproperlyConfigured("You're using the staticfiles app " >

Re: Is there a way to use a tree control in my template

2011-08-10 Thread Tiago Almeida
As far as I know, Django does not ship with that by defaut. Try searching for an app or a snippet on http://djangosnippets.org It shouldn't be too hard to do. Best regards On Aug 10, 1:31 pm, Hayyan Rafiq wrote: > Which form element giveds the tree control ?? > > > > > > >

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Kayode Odeyemi
Thanks. I just simply result to core Django to get done what I need. On Wed, Aug 10, 2011 at 12:22 PM, Tom Evans wrote: > On Wed, Aug 10, 2011 at 12:16 PM, Subhranath Chunder > wrote: > > You seem to have heavily used external django apps like

Re: Newbie: Help with validation

2011-08-10 Thread Shawn Milochik
In [1]: x = '1234' In [2]: x.isdigit() Out[2]: True -- 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

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Thomas Weholt
On Wed, Aug 10, 2011 at 11:56 AM, Subhranath Chunder wrote: > You can either override a particular, or give a completely alternative > change_list page. > For your case, overriding seems to be a better option to me >

Re: making history

2011-08-10 Thread Shawn Milochik
I do essentially that, using a post_save signal and dumping the serialized model instance to MongoDB with datestamp, etc. The relevant part is this (after importing Django's serializers): serialized_object = serializers.serialize( "json", sender.objects.filter(pk =

RE: Is there a way to use a tree control in my template

2011-08-10 Thread Hayyan Rafiq
Which form element giveds the tree control ?? > Date: Tue, 9 Aug 2011 22:57:36 -0700 > Subject: Re: Is there a way to use a tree control in my template > From: francescor...@gmail.com > To: django-users@googlegroups.com > > What part are you missing? How to write the django template, how to >

Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
Gelonida N: "Very probably an error in settings.py" ok.. " STATIC_ROOT has to be an absolut path name using '/' and not '\' characters pointing to a directory, that is empty (collectstatic will store files there) " ok... "STATICFILES_DIRS should point to the directory, where you put your

Re: MySQLdb module not found even though it's installed.

2011-08-10 Thread Subhranath Chunder
On Wed, Aug 10, 2011 at 2:20 PM, babak wrote: > Did that and it didn't fail. > But when I run: > python2.6 manage.py syncdb > > everything works fine, so problem solved. > Your python mysql library binder is currently installed with the python2.6 instance only, and not

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Tom Evans
On Wed, Aug 10, 2011 at 12:16 PM, Subhranath Chunder wrote: > You seem to have heavily used external django apps like django-pagination > and django-tables. > I haven't used either of them myself, so it'll be difficult for me to follow > your code like this. Maybe, some else

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Subhranath Chunder
You seem to have heavily used external django apps like django-pagination and django-tables. I haven't used either of them myself, so it'll be difficult for me to follow your code like this. Maybe, some else with experience on those might be able to help you better. On Wed, Aug 10, 2011 at 4:22

Re: MySQLdb module not found even though it's installed.

2011-08-10 Thread babak
Did that and it didn't fail. But when I run: python2.6 manage.py syncdb everything works fine, so problem solved. On 10 Aug, 10:48, Subhranath Chunder wrote: > You can check with the following: > > python manage.py shell > > then do the, > import MySQLdb > > If this fails

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Kayode Odeyemi
Thanks. Here's the views.py class TransactionReport(tables.ModelTable): identifier = tables.Column(sortable=False, visible=False) created = tables.Column(sortable=True, visible=True) @classmethod def get_reports_paid(self, object, req): return TransactionReport(object,

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Subhranath Chunder
On Mon, Aug 8, 2011 at 5:04 PM, Kayode Odeyemi wrote: > Hello, > > Please why am I get the following error: > > Caught NameError while rendering: global name 'name' is not defined. > > Initially I did not receive this sort of error, it just surfaced all > off a sudden. I

Re: Generating urls for a search-engine-like application

2011-08-10 Thread Reinout van Rees
On 10-08-11 11:20, samuele.mattiuzzo wrote: url(//, search_view), url(//, search_view), url(///, search_view) as you can see, case 1 and case 2 are a trouble: country and city are both strings, how's the url supposed to know if a link pointed to one url or another? Should i use named views in

Re: 'str' object has no attribute 'resolve' when access admin site

2011-08-10 Thread Reinout van Rees
On 09-08-11 17:41, raj wrote: I keep getting this error: 'str' object has no attribute 'resolve' # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: (r'^admin/doc/',

Re: Tutorial: New class based generic views

2011-08-10 Thread Reinout van Rees
On 09-08-11 23:25, Gelonida N wrote: This is the first part of a series of blog posts I'm writing about class based generic views: What I'm wondering about those class based *generic* views is whether that name is good: - Pre-django-1.3 generic views aren't used that much. Most views are

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Kayode Odeyemi
Please I'm still stuck on this. I have posted it to SO at http://stackoverflow.com/questions/6993387/django-tables-caught-nameerror-while-rendering-global-name-name-is-not-defin. But it's still not getting resolved. I'll appreciate some pointers to the root cause of this. Thanks On Mon, Aug 8,

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Subhranath Chunder
You can either override a particular, or give a completely alternative change_list page. For your case, overriding seems to be a better option to me https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates If you are going for new change_list template

Re: Generating urls for a search-engine-like application

2011-08-10 Thread samuele.mattiuzzo
i wanted to keep urls as clean as possible, but i was studying something like mysite.com/country.italy/city.milan/job.king/ i do not like it so much, but it's the cleanest thing i can think of... On Aug 10, 11:47 am, Subhranath Chunder wrote: > If you are planning for

Re: Generating urls for a search-engine-like application

2011-08-10 Thread Subhranath Chunder
If you are planning for reverse URL in your templates, then named URL pattern is the thing for you. https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns Else to simply, you might also consider changing the url patterns to something like: /country// /city// If you have the

[Sharing] django-custom-auths

2011-08-10 Thread Subhranath Chunder
I was working on these django applications which simplifies the use of third-party logins for a django project without breaking any existing code. My concerns were: - No existing code breakage. - Easy integration with django's own authenication system API. This is a work in progress with perhaps

Generating urls for a search-engine-like application

2011-08-10 Thread samuele.mattiuzzo
Hi all, i'm developing a search-engine-like application using django 1.3 and apache-solr as "database" I'm now stuck with urls handling. Basically, i need to compose urls with the parameters used to query solr. Fair enough, but i faced a problem. Basically, you can filter your results by

Re: making history

2011-08-10 Thread Mike Dewhirst
On 10/08/2011 7:08pm, Subhranath Chunder wrote: You could probably consider using post_save signals and make things a bit little more generic. Thanks - I'll read up on that ... Cheers Mike On Wed, Aug 10, 2011 at 1:38 PM, Mike Dewhirst

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Thomas Weholt
Hmmm ... Not sure how to do that. You could say I want an alternative change_list page, but not by overriding or extending the existing default one. Do you know of any example or documentation on how to achive this? Anyway, thanks for your input :-) Regards, Thomas On Wed, Aug 10, 2011 at

Re: making history

2011-08-10 Thread Subhranath Chunder
You could probably consider using post_save signals and make things a bit little more generic. On Wed, Aug 10, 2011 at 1:38 PM, Mike Dewhirst wrote: > I want to update a history record whenever a particular record changes. > > Is it reasonable to call a method from within

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Subhranath Chunder
Yes, you can do that. You would have to override the default change_view_template. And if required, then probably the changelist_view() too. On Wed, Aug 10, 2011 at 2:28 PM, Thomas Weholt wrote: > Is it possible to keep the filtering done in an admin change_list in a >

Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Thomas Weholt
Is it possible to keep the filtering done in an admin change_list in a custom page? For instance, I got a app showing photos where you can filter on camera, width, height, exif-date, iso speed, exposure etc and the admin makes filtering my data very easy using a custom AdminModel. My filter shows

Re: Set order from admin

2011-08-10 Thread Thomas Orozco
You can use a single foreign key and store last changed in your B model. You can then use object_a.b_set.order_by('myTimeStamp') Le 10 août 2011 10:23, "Isaac" a écrit : -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: MySQLdb module not found even though it's installed.

2011-08-10 Thread Subhranath Chunder
You can check with the following: python manage.py shell then do the, import MySQLdb If this fails then you are probably running on different python environments. On Wed, Aug 10, 2011 at 2:02 PM, babak wrote: > Hi I've installed MySQLdb om my mac and can import it: >

Re: [Commercial] Freelance developer looking for long-term/contract based work

2011-08-10 Thread Subhranath Chunder
Now I'm available for immediate start of work. Looking for long-term work only, on hourly basis. I can put in as many as monthly 100 hours if required. Please let me know if anyone is interested to hire me, asap. On Fri, Aug 5, 2011 at 8:58 PM, Subhranath Chunder wrote: >

MySQLdb module not found even though it's installed.

2011-08-10 Thread babak
Hi I've installed MySQLdb om my mac and can import it: Python 2.6.7 (r267:88850, Jul 20 2011, 12:30:08) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import MySQLdb But when I try to create database I get the following

Re: How to order "links" in the Admin?

2011-08-10 Thread Andre Lopes
Hi, Thanks for the reply. I use the field "website_position" to control the position of the url, this is an Integer field. The model I use is this: from django.db import models import datetime class Directory(models.Model): website_name = models.CharField(max_length=200) website_url =

Set order from admin

2011-08-10 Thread Isaac
Hi folks, I've having trouble to find a clear solution to my problem. All I want is to set a relation between 2 classes, and set filter order from admin to the rest of queries. pseudocode: Class A has_many B Class B foreign_key A And then, I want to retrieve B objects from a given

making history

2011-08-10 Thread Mike Dewhirst
I want to update a history record whenever a particular record changes. Is it reasonable to call a method from within the save method of a model to go off and do the work? def updatehistory(recordx): """ if HistoryX doesn't exist, insert it so the RecordX author can add commentary.

Re: dull look after install on ubuntu

2011-08-10 Thread Peter Kovgan
my settings.py # Django settings for mysite project. DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_em...@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql',

Re: dull look after install on ubuntu

2011-08-10 Thread Gelonida N
On 08/10/2011 04:53 AM, Peter Kovgan wrote: > Thank you guys. > > I use development server of django(manage.py runserver). > > I created an app. from the official site of the django, this one of the > first tutorial. > > I did it on windows installation. > > Then I came home, installed the

Re: dull look after install on ubuntu

2011-08-10 Thread Praveen Krishna R
*please dump your *settings.py ?! On Wed, Aug 10, 2011 at 5:53 AM, Peter Kovgan wrote: > Thank you guys. > > I use development server of django(manage.py runserver). > > I created an app. from the official site of the django, this one of the > first tutorial. > > I did it

Re: how to save inlines?

2011-08-10 Thread francescortiz
The django documentation about ModelAdmin.save_model seems to be what you look for. The example they give does almost what you want: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model On Aug 8, 11:32 pm, galgal wrote: >