Re: i need help with this...
hello, i myself cannot parse this. what is the question? On Apr 30, 10:16 pm, kandee wrote: > I just got this new phone, and was trying to download some sound > affects, from a download Page, but an error page came on and said that > I needed to go on my django setting file and change it to false so it > can display 500 pages...but I didn't find it anywhere, so I Googled it > amd it brang me here... and I was trying to download django, but it > wouldn't let me...I really want to look at those sound affects. ..can > you help me...?.. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django-tinyMCE and django-filebrowser js error
Fixed this.. On Apr 30, 3:06 pm, John Wesonga wrote: > I've set up django-filebrowser in my app without any bugs, I already > had django-tinymce set up and it loads the editor in the admin forms. > I now want to use django-filebrowser with django-tinymce, but I keep > getting a weird javascript error when I click on "Image URL" in the > Image popup: > > r is undefined > the error is in js/tiny_mce/tiny_mce.js > > When I tried using js/tiny_mce/tiny_mce_src.js the error changed to f > is undefined. > > Not sure why this error is appearing, tried downgrading my tinyMCE > from 3.3.2 to 3.0 that didn't work. Been hitting my head on this for 3 > days without any possible sign of a resolution. > > Help!! > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Problems with Admin CSS
Hi I have set up a basic project and am trying to get it running under Apache in a shared virtual hosting environment. The aim is to get it working here first, and then work with my hosting company so that they can support Django for their customers. The problem is that I cannot configure it so that the admin CSS files are located properly. The admin application is working fine, just no style sheets. I keep getting www.mytestapp.com:80 127.0.0.1 - - [01/May/2010:09:37:38 +0100] "GET / admin/ HTTP/1.1" 200 1286 "http://www.mytestapp.com/admin/logout/"; "Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.9) Gecko/20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9" www.mytestapp.com:80 127.0.0.1 - - [01/May/2010:09:37:38 +0100] "GET / admin_media/css/base.css HTTP/1.1" 404 1239 "http://www.mytestapp.com/ admin/" "Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.9) Gecko/ 20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9" www.mytestapp.com:80 127.0.0.1 - - [01/May/2010:09:37:38 +0100] "GET / admin_media/css/login.css HTTP/1.1" 404 1240 "http://www.mytestapp.com/ admin/" "Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.9) Gecko/ 20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9" I have been trying to get this working for days, and have followed advice offered in several posts on this site to no avail. I am sure that I am either not understanding something fundamental, or are missing some simple trick or something basic. I have put all relevant information here. Any help would be appreciated. David My Project lives in TestProject. Its called mytestapp and was built using django-admin startproject mytestapp I have added a directory within mytestapp called /www where there is 1. a link called admin_media to the admin applicaion media files 2. a further directory with the django,wsgi script Here is the directory structure and files maxw...@shiraz:~/TestProject$ ls -alR drwxr-xr-x 3 maxweld maxweld 4096 2010-04-27 19:09 . drwxr-xr-x 58 maxweld maxweld 4096 2010-05-01 09:37 .. drwxr-xr-x 3 maxweld maxweld 4096 2010-05-01 08:59 mytestapp ./mytestapp: -rw-r--r-- 1 maxweld maxweld0 2010-04-27 19:09 __init__.py -rwxr-xr-x 1 maxweld maxweld 542 2010-04-27 19:09 manage.py -rw-r--r-- 1 maxweld maxweld 2851 2010-04-29 18:16 settings.py -rw-r--r-- 1 maxweld maxweld 542 2010-04-27 19:33 urls.py drwxr-xr-x 3 maxweld maxweld 4096 2010-05-01 09:21 www ./mytestapp/www: lrwxrwxrwx 1 maxweld maxweld 46 2010-05-01 09:06 admin_media -> /usr/ share/pyshared/django/contrib/admin/media drwxr-xr-x 2 maxweld maxweld 4096 2010-04-27 20:03 wsgi ./mytestapp/www/wsgi: -rw-r--r-- 1 maxweld maxweld 268 2010-04-27 20:03 django.wsgi The virtual host is configured thus: ServerName www.mytestapp.com ServerAlias mytestapp.com DocumentRoot /home/maxweld/TestProject/mytestapp/www WSGIScriptAlias / /home/maxweld/TestProject/mytestapp/www/wsgi/ django.wsgi Order deny,allow Allow from all urls.py is configured thus: maxw...@shiraz:~/TestProject/mytestapp$ cat urls.py from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^mytestapp/', include('mytestapp.foo.urls')), # Uncomment the admin/doc line below and add 'django.contrib.admindocs' # to INSTALLED_APPS to enable admin documentation: # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: (r'^admin/', include(admin.site.urls)), ) And settings.py is configured thus: # Django settings for mytestapp project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_em...@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'mysql' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME = 'myprojectdb' # Or path to database file if using sqlite3. DATABASE_USER = 'myprojectuser' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. # If running in a Windows environment this must be set to the same as your # system time zone. TIME_ZONE = 'Europe/London' # Language code for this installation. All choices can be found here: # http://www.i18nguy.com/unicode/language-identifiers.html LANGUAGE_CODE = 'en-gb' SITE_ID = 1 # If you set this to False, Django will make some optimizations so as not # to load the internationalization machinery. USE_I18N = False # Absolute path to the directory that holds media. # Example: "/home/media/
Re: i need help with this...
kandee wrote: > I just got this new phone, and was trying to download some sound > affects, from a download Page, but an error page came on and said that > I needed to go on my django setting file and change it to false so it > can display 500 pages...but I didn't find it anywhere, so I Googled it > amd it brang me here... and I was trying to download django, but it > wouldn't let me...I really want to look at those sound affects. ..can > you help me...?.. > Hello, If I understand you correctly, I think the instruction to change the django wtting is really meant for the django site's webmaster - it isn't something that you can do yourself. You need to contact the download site's webmaster, explain that there's a problem with the site and ask them to fix it. Cheers, Kev -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problems with Admin CSS
On May 1, 10:15 am, maxweld wrote: > Hi > I have set up a basic project and am trying to get it running under > Apache in a shared virtual hosting environment. The aim is to get it > working here first, and then work with my hosting company so that they > can support Django for their customers. > > The problem is that I cannot configure it so that the admin CSS files > are located properly. The admin application is working fine, just no > style sheets. I keep getting > The virtual host is configured thus: > > > ServerNamewww.mytestapp.com > ServerAlias mytestapp.com > > DocumentRoot /home/maxweld/TestProject/mytestapp/www > > WSGIScriptAlias / /home/maxweld/TestProject/mytestapp/www/wsgi/ > django.wsgi > > > Order deny,allow > Allow from all > > > You haven't got anything in here to actually serve the files from www. Surely you should have an Alias directive to point to the media folder, and a Directory directive for that path, as described in the docs. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Generic web-dev question: Best way to do a processing page?
This is mainly just curiosity at the moment. How do you create a "processing" intermediate page, like you see on travel sites when they are looking for the rates? I would always avoid this if at all possible, but sometimes you have a process that takes longer than usual. I've been looking around the web and I am not coming up with many examples. So far I have only found one. http://blog.ysatech.com/post/2010/02/06/ASPNET-redirect-a-web-page-with-AJAX-loading-indicator-image.aspx Is that pretty much how it's done? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Generic web-dev question: Best way to do a processing page?
You could try to juggle with comet, but I wouldn't if its the best solution, Otherwise you could let them fill in an email address, and send the result to that emailaddress On Sat, May 1, 2010 at 2:22 PM, Joshua Russo wrote: > This is mainly just curiosity at the moment. How do you create a > "processing" intermediate page, like you see on travel sites when they are > looking for the rates? I would always avoid this if at all possible, but > sometimes you have a process that takes longer than usual. > > I've been looking around the web and I am not coming up with many examples. > So far I have only found one. > > > http://blog.ysatech.com/post/2010/02/06/ASPNET-redirect-a-web-page-with-AJAX-loading-indicator-image.aspx > > Is that pretty much how it's done? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problems with Admin CSS
On May 1, 12:17 pm, Daniel Roseman wrote: > On May 1, 10:15 am, maxweld wrote: > > You haven't got anything in here to actually serve the files from www. > Surely you should have an Alias directive to point to the media > folder, and a Directory directive for that path, as described in the > docs. > > > That worked a treat, but I do not understand why the Document Root was not pre-ended to do the same thing. Why is the alias needed? Thanks Daniel. Virtual Host Config now looks like ServerName www.mytestapp.com ServerAlias mytestapp.com DocumentRoot /home/maxweld/TestProject/mytestapp/www Alias /admin_media/ /home/maxweld/TestProject/mytestapp/www/ admin_media/ Order deny,allow Allow from all WSGIScriptAlias / /home/maxweld/TestProject/mytestapp/www/wsgi/ django.wsgi Order deny,allow Allow from all -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Generic web-dev question: Best way to do a processing page?
On Sat, May 1, 2010 at 7:22 AM, Joshua Russo wrote: > This is mainly just curiosity at the moment. How do you create a > "processing" intermediate page, like you see on travel sites when they are > looking for the rates? I would always avoid this if at all possible, but > sometimes you have a process that takes longer than usual. some ideas: - a view checks if the task is done, if so, shows the result. if not, uses another template with the 'wait a sec..' message and a 'refresh' HTML header that reloads the page after a few seconds. - the 'wait' page starts with a javascript that does a periodic AJAX call to check if it's done. when it's so, redirects to the 'result' page. -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problems with Admin CSS
On May 1, 2:16 pm, maxweld wrote: > On May 1, 12:17 pm, Daniel Roseman wrote: > > > On May 1, 10:15 am, maxweld wrote: > > > You haven't got anything in here to actually serve the files from www. > > Surely you should have an Alias directive to point to the media > > folder, and a Directory directive for that path, as described in the > > docs. > The WSGIScriptAlias is stealing everything from \, so you need to explicitly exclude paths from being handled by WSGI. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
how to exclude objects with manytomany
hi, I have a model called 'Team' with a manytomany field to 'Player'. How do I select all the players who are not in any team? I remember doing this once, but cannot find what I did. -- regards Kenneth Gonsalves Senior Associate NRC-FOSS http://certificate.nrcfoss.au-kbc.org.in -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how to exclude objects with manytomany
On Saturday 01 May 2010 10:54:52 pm Kenneth Gonsalves wrote: > I have a model called 'Team' with a manytomany field to 'Player'. How do I > select all the players who are not in any team? I remember doing this > once, but cannot find what I did. > I have tried this: self.fields['members'].choices = [(x.id,x.name) for x in Player.objects.all() if x.team_set.all() == []] does not seem very elegant -- regards Kenneth Gonsalves Senior Associate NRC-FOSS http://certificate.nrcfoss.au-kbc.org.in -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Is it safe to alter Django generated tables in MySQL to have composite PK?
On Apr 30, 9:42 pm, Nick Arnett wrote: > If you don't have data in the table, just drop it and use "unique_together" > in models.py to define your composite key. You'll find that in the Django > docs. Then do syncdb and Django will create the table with your composite > key. I don't have data. Using "unique_together" wouldn't work because I want that composite index to be the clustered index. It'd only be the clustered index if it is the primary index. > Otherwise, you can make the change in models.py, as above, and change the PK > manually. So changing the PK manually wouldn't break some internal Django operations? For example when I save() an object, Django would use the PK to check if the object already exists or not and then decide whether to do an insert or update. By changing the PK manually, would I break the save() function? Presumably I'd need to keep the Django-generated PK which is an auto- increment, even though I have no use for it, right? There might be other similar situations where Django is interacting with the PK. I just wanted to make sure by changing the PK I wouldn't be breaking things. > If there are FKs involved, you might also want to make the appropriate > changes if you're not re-creating all the involved tables with syncdb. There wouldn't be FKs involved. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Any way to use the multi-database support in 1.2 for horizontal sharding?
Hi, I read the doc on the multi-database feature in 1.2. It seems it's mostly geared towards vertical partitioning of databases. Any way to use it for horizontal sharding? For example, say I have a Message class. I want to use a hash on Message.id to point to a database server where the specific message will be stored. Is there any way to do that with the multi-database support in 1.2? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Problem with letters like ÄÖÕÜ in django adm in
Well i put this if and following import & trace to several places, but all i got was the 500 error and pdb prompt did not show up. If you could provide me with exact info of where to put this trace in djang 1.2. beta 1 admin_list.py... then it would be really nice :P Alan -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Creating hierachical views and processing these in templates?
I am struggling to grasp the "full picture" when it comes to view queries and associated templates which deal with sets of "nested" parent/child relationships, and am hoping someone here can enlighten me. All the examples I have seen seem to deal with simple views showing one, or maybe two models at a time with very little processing (e.g. calculations). A "typical" (but very very simplified) sales model for a business could look something like this: class Area(models.Model): ZONE_CHOICES = ( (u'U', u'USA'), (u'E', u'Europe'), (u'A', u'Asia'), ) name = models.CharField(max_length=50) zone = models.CharField(maxlength =1, choices=ZONE_CHOICES) class Customer(models.Model): name = models.CharField(maxlength = 50) phone = models.CharField(maxlength = 50) area = models.ForeignKey(Area) class Order(models.Model): date = models.DateField() customer = models.ForeignKey(Customer) shipped = models.BooleanField() #has order been shipped? class Widget(models.Model): SIZE_CHOICES = ( (u'1', u'Small'), (u'2', u'Medium'), (u'3', u'Large'), ) name = models.CharField(maxlength = 50) size = models.IntegerField(choices=SIZE_CHOICES) price = models.FloatField() class OrderDetails(models.Model): widget = models.ForeignKey(Widget) order = models.ForeignKey(Order) number = models.IntegerField() #number of widgets purchased A typical report (Django view+template) that someone might want to see, is to show all orders for the current year, with order details, along with totals (counts and cost) at customer and order levels, for a given set of criteria e.g. all customers in Europe, who have ordered widgets of size 2, with orders that have a total value of $300 or more, in 2010. The report would need to be laid out in a hierarchical fashion, showing: alphabetically sorted customer name / phone and their total no. of orders, followed below by each order in date sequence - date, id and shipping status - followed below by the order details for that order (line for each widget, with name, size, number purchased and total cost), followed at the end by the total order cost. At the very end of the report, after all customers are displayed, the total cost of all orders, plus the average order cost. I would really like to see how (a) the view code would be constructed and (b) what the corresponding template specification would be. I can see, as a start, that the view might look something like: def view_order_details (request, zone, year, size, order_value): customers = Customer.objects.filter(area__zone=zone) But here is where I get stuck! How do I "nest" the orders for each customer, and also the order details (and the associated calculations)? What type of data structure gets created as a result? When does it get created? What does the template code, in turn, look like to be able to process this structure (or structures)? Note 1: Please note this is NOTHING at all like the models I am using - in case anyone thinks I am asking them to do my work! - its so that I can understand how such a nested system would be constructed - and how the template, in turn, would process it. Note 2: Yes, I realize these set of models could be improved with many-to-many or one-to-many relationship fields added. But, if at all possible, please just work with it "as is". Thanks - this will really help improve my understanding of a crucial conceptual area. Derek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Beyound django auth - custom login function - where?
On Apr 30, 4:44 pm, Aitch wrote: > I'm fearful this is a really dumb question but I'll go ahead anyway. > > My app is starting to need to go beyond basic auth. e.g. when a user > logs in, I need to check various related statuses, provide distinct > messages, set session vars and such like. > > What's not clear to me is, if I provide my own login() method (one > that calls auth.authenticate, auth.login etc, and doing my custom > activities as per docs) ... where (how) is it considered best practice > to implement this? > > Problem is similar to that described half way down > here:http://www.djangobook.com/en/2.0/chapter14/ > > Do I create a separate app dedicated to this task, or simply embed it > in an existing one? Aitch Not dumb. I think this would be a useful blog post. That aside... I think signals are the way to go. Look at recent posts on this topic (some linked to my name), e..g to "set session variables". I have not got this working yet, but if you do, perhaps you can "write up" some guidelines? Derek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Globally allow fields to be blank.
Very few of the fields in my models are required (in real life). But the default attribute for a django field is that it is required. http://docs.djangoproject.com/en/1.1/ref/models/fields/#django.db.models.Field.blank Is there a way to toggle that, globally, so that I can just make the few truly required fields. There's something slightly annoying in a non-dryish way to have blank=True in nearly every line of my model. Thanks, in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django-admin tab completion not working
I looked in the django_bash_completion script but didn't understand much. Anyone who has any idea of what could be wrong? Why DJANGO_AUTO_COMPLETE is not in the list of environment variables? -Martin On Fri, Apr 30, 2010 at 7:21 PM, Martin Lundberg wrote: > I'm taking a look in django/core/management/__init__.py in the completion > method the first couple of lines are (line 285): > > # Don't complete if user hasn't sourced bash_completion file. > if not os.environ.has_key('DJANGO_AUTO_COMPLETE'): > return > > Right after doing ". ~/Sources/django-trunk/extras/django_bash_completion" > if I run "printenv" DJANGO_AUTO_COMPLETE is not shown. > > -Martin > > On Fri, Apr 30, 2010 at 11:17 AM, Daniel Roseman wrote: > >> On Apr 30, 7:55 am, Martin Lundberg wrote: >> > Thanks, at least I know that it should work. Could it be that I don't >> have >> > bash-completion installed on osx? I've tried to install it with brew and >> it >> > seemed to work but I'm not sure if it is in fact installed and working >> and >> > I'm not sure how to test if it is. >> > >> > -Martin >> >> You shouldn't need to install anything to get bash completion to work >> - it's part of Bash. >> -- >> DR. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-us...@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com >> . >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Any way to use the multi-database support in 1.2 for horizontal sharding?
On Sun, May 2, 2010 at 2:52 AM, Continuation wrote: > Hi, > > I read the doc on the multi-database feature in 1.2. It seems it's > mostly geared towards vertical partitioning of databases. > > Any way to use it for horizontal sharding? > > For example, say I have a Message class. I want to use a hash on > Message.id to point to a database server where the specific message > will be stored. > > Is there any way to do that with the multi-database support in 1.2? It should be possible. A router that uses the hint objects (in your case, the hash of Message.id when the hint is a message) should be able to implement a sharding behavior. There are, of course, many little details -- for example, if an object has foreign keys to another object, both objects need to be routed to the same shard. However, these details mostly fall into the implementation of your application logic or your router logic. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
add button to admin change list at row level.
Hi, We are trying to customize Django admin change list displaying model objects. We want to add two buttons (Change, delete) to each row of the record, something very similar to "Add" and "Change" buttons on application list beside the model name. Could somebody give us some hint on this? The "list_display" can only take existing fields, but not the extra buttons we want to add, right? We do not want to provide user with batch admin actions option. That is why we want to add action to each row. Drop down actions menu is not our design preference. Thanks for your help. Wayne -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django-grappelli issue
I discovered the grappelli app today and just set up it. However, the admin site doesn't look as good as the screenshot from the site. Here is the screenshot of my admin page http://i979.photobucket.com/albums/ae280/jasonvoorheeszzz/Capture.png It looks like that on FF 3.5.9 and even worse on IE 8. Does anyone have the same issue ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.