Language Translation using multilingual in django
Hi! I am new in django. I use multilingual & create flatpages. I add different languages into settings.py & i display all available languages in template, But i want to covert the content of flatpages into another language as per user requirement by using url getting current language code, can anybody suggest how it should be done? Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/F0Bw4f_Zt7wJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Language Translation using multilingual in django
Thanks for the reply I create flatpages using multilingual flagpages in different languages. I want to call that pages in different urls, how it should be done? Mulilingual package has its own views & urls. On Thursday, May 10, 2012 7:05:53 PM UTC+5:30, juanpex wrote: > > If you only want to display information but dont want to work with > translations in code you can try > > https://github.com/juanpex/django-model-i18n/ > > On Thu, May 10, 2012 at 10:13 AM, Madhu wrote: > >> Hi! >> I am new in django. >> I use multilingual & create flatpages. >> I add different languages into settings.py & i display all available >> languages in template, >> But i want to covert the content of flatpages into another language as >> per user requirement by using url getting current language code, >> can anybody suggest how it should be done? >> >> Thanks in advance. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-users/-/F0Bw4f_Zt7wJ. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > > > -- > juanpex > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/FMAvbAWqyAsJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Soap Webservices with suds returns pdf response
Hi! all I make client using suds & call the SOAP webservice & i get the response as pdf string format, but it is not in proper format, i want to convert it into proper format & store it in the pdf file. Can anybody suggest me, how this can be done? Thanks in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/hQ7x45WJeVYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Webservice return pdf
Hi! all I create client & through client i call the web service. which returns pdf file, i want to stored that file directly. I use this response['Content-Disposition'] = 'attachment; filename= 'demo.pdf' but it will ask the user to store the file, but i want to store it automatically on server. can anybody please suggest me, how it should be done? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/HYf0CRpi6rQJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Merging results from two tables
Hi! How should i get the details from B and some content of A using that foreign key? Thanks Madhu On Saturday, January 31, 2009 10:37:58 PM UTC+5:30, Daniel Roseman wrote: > > On Jan 31, 12:27 pm, Markus wrote: > > Hi > > > > just starting to use Django, am stuck with the following problem: > > > > Given > > > > class A(models.Model): > > ...some fields... > > > > class B(models.Model): > >A = models.ForeignKey(A) > >some fields... > > > > I would like to generate a Queryset that returns values from both > > tables, ie in SQL > > > > SELECT A.field1, A.field2, B.field1, B.field2 > > FROM A, B > > WHERE A.id = B.A_id AND some filter on A AND .. some further > > conditions to ensure only one row from table B is matched > > > > So far, I found a way to achieve this using the extra operator: > > > > A.objects.filter(..some filter on A..).extra(select={'field1': "select > > B.field1 from B ...", 'field2': 'select B.field2 from B ..."}) > > > > This quickly becomes clumsy as the number of fields in table B > > increases. There must be a better way? As I couldnt find anything in > > the documentation, I would appreciate a nudge in the right direction. > > > > Thanks > > Markus > > You haven't explained exactly what you want from B - all the values, > or just the ones that have values in A, or just the ones for a single > value of A? > > If you just want all the associated B for each value of A, then a > simple queryset will do the trick. > qs = A.objects.all() > for a in qs: > print a.b_set.all() > > You can make this a bit more efficient by calling the initial queryset > with select_related. > qs = A.objects.all().select_related() > > I would suggest reading the section on related objects again: > http://docs.djangoproject.com/en/dev/topics/db/queries/#related-objects > -- > DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ZjB35hjPVbYJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Retrieve Data from Database
Hi! I am new in django, i want to get the table from one table also want the some content from another table. Can anybody tell me how it should be done? My module class structure is as below class A(models.Model): name =models.CharField(max_length=100) content = models.CharField(max_length=100) B = models.ForeignKey(B) class B(models.Model): details =models.CharField(max_length=100) i want to display the details from table A as name, content also wants to display details from table B. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wqLW58kbqfEJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Adding Button in admin form
Hello, I want to add the button along with field in admin form. ex. Field name "URL" with the "Choose Page" button. If admin clicks on "Choose Page" button then some list from the database table will be display and admin select any one from that list. Can anybody help me to add the button in admin form? Thanks, Madhu -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wSJXqEJkYzoJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Adding Button in admin form
Thanks for the replay. Using foreign key it creates dropdown list, but i want the URL as the character field and "Choose Page" button which having the function which retrieves the database query list. On Friday, August 17, 2012 12:51:35 PM UTC+5:30, Thomas Orozco wrote: > > If you're using a ForeignKey for this field, you'll get this behavior by > default in the Django admin. > Le 17 août 2012 08:45, "Madhu" > a > écrit : > >> Hello, >> >> I want to add the button along with field in admin form. >> >> ex. Field name "URL" with the "Choose Page" button. >> If admin clicks on "Choose Page" button then some list from the database >> table will be display and admin select any one from that list. >> >> Can anybody help me to add the button in admin form? >> >> Thanks, >> Madhu >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/django-users/-/wSJXqEJkYzoJ. >> To post to this group, send email to django...@googlegroups.com >> . >> To unsubscribe from this group, send email to >> django-users...@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 view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/gsOd9uZzCUgJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Adding Button in admin form
Can you please tell me how to add the Buttom on admin form in django? I want to add the button beside the field. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WACTMw1ykxMJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Adding Button in admin form
I try the row_id_fields, but its not helpful for me. I want the button will be display in admin form. Using row_id_fields its just the linking of foreign key i don't want that. The button functionality will be later before that i want the button tag will be display on admin form. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7CrtkDOzAycJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Adding Button in admin form
Ok. I will explain it in brief. I want the button like the image field having the Browse button with the Image field in admin side i want the same button but the functionality may be different. Don't want that the browser button functionality but i want the button along with the my URL character field. That button should be be display and we i click on that button then some functionality. Right now i didn't understand, how to add that button in admin form. Can you please suggest? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/Ov0QyqEbsCQJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Adding Button in admin form
No. URL linking is not the problem. I have the problem to add the input button in admin form. There will be so many buttons in admin form like save, add, delete. I want to add my own button, but in the middle of admin form not at the submit line or upper part of the admin form. That button should be display near to my character field. Using html we create then button tag will be display in the html page. I want the same input button on the admin form. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/LVBJArH-RH8J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Adding Button in admin form
Yes, That's right. I tried to change the admin form, but the button is not added. the fuctionality Jani Tiainen said i want the same fuctionality, but the now first problem is adding button in change form. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/P3fIv6ngxmsJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Import data from csv file to database from django admin side
Hi! I tried to import the data from csv file to database. I refer below link https://groups.google.com/forum/#!msg/django-users/usjC-X9-p5E/94bf4tw3Ni8J I have create the models and view same like above link. I have create the "import" buttom on admin side by changing "app/change_list" html. On the "import" onclick method i call the my import view. But it gives me error as 'DataInput' object has no attribute 'cleaned_data' And form.is_valid() always return false. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/s-RFFmtwKDAJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Reports
rlib.sicompos.com http://www.htmltopdf.org/ http://openreport.org/index.py/static/page/docs On Apr 2, 2:51 pm, "Marinho Brandao" <[EMAIL PROTECTED]> wrote: > Sorry, I sent to wrong user group > > 2008/4/2, Marinho Brandao <[EMAIL PROTECTED]>: > > > > > Olá, > > > para geração de gráficos, dê uma olhadinha aqui também: > > > http://marinho.webdoisonline.com/blog/p/136/ > > > 2008/3/27, Justin Lilly <[EMAIL PROTECTED]>: > > > > Django handles it as well as Python. > > > > Here are some resources I would suggest checking out: > > > report lab:http://www.reportlab.org/index.html > > > google charts:http://toys.jacobian.org/hg/googlecharts/ > > > and > > >http://toys.jacobian.org/hg/googlecharts/raw-file/tip/docs/examples.html > > > (examples) > > > django-graphs:http://code.google.com/p/django-graphs/ > > > > -justin > > > > On Thu, Mar 27, 2008 at 4:03 PM, Percy Gonzales <[EMAIL PROTECTED]> > > > wrote: > > > > > Hello, as Django's handling of the issue: > > > > * Generate reports PDF > > > > * Graphics statistics (bars, cakes ,...) > > > > > Thanks > > > > > Percy > > > > -- > > > Justin Lilly > > > Web Developer/Designer > > >http://justinlilly.com > > > -- > > Marinho Brandão (José Mário) > > http://marinho.webdoisonline.com/ > > -- > Marinho Brandão (José Mário)http://marinho.webdoisonline.com/ --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Django + XUL
How to use XUL (templates) in Django ? --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + XUL
Jacob Kaplan-Moss wrote: On 12/24/06 11:24 PM, Alagu Madhu wrote: > How to use XUL (templates) in Django ? Write a template that returns XUL instead of HTML. You might want to check out chapter 11 of the Django book, which deals with generating non-HTML content: http://www.djangobook.com/en/beta/chapter11/ Jacob thanks Madhu Alagu --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django + XUL
Django + xul - woking fine.The code is bellow. view.py : from django import http def index(request): resp = http.HttpResponse() resp.headers['Content-Type'] = 'application/vnd.mozilla.xul+xml' resp.write('') resp.write('') resp.write('http://www.w3.org/1999/xhtml"; xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";>') resp.write(""" const SERVER_URL = "post/"; function doLogin() { req = new pythonRequest(); //req.add('0',username); //req.add('1',password); var response = req.execute(); } function doClose() { window.close(); } function pythonRequest() { this.parms = new Array(); this.parmsIndex = 0; this.execute = pythonRequestExecute; this.add = pythonRequestAdd; this.server = SERVER_URL; } function pythonRequestAdd(name,value) { this.parms[this.parmsIndex] = new Pair(name,value); this.parmsIndex++; } function pythonRequestExecute() { var targetURL = this.server; try { var httpRequest = new XMLHttpRequest(); }catch (e){ alert('Error creating the connection!'); return; } try { var txt=""; for(var i in this.parms) { txt = txt+this.parms[i].name+'='+this.parms[i].value; } httpRequest.open("POST", targetURL, false, null, null); httpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); httpRequest.send(txt); }catch (e){ alert('An error has occured calling the external site: '+e); return false; } switch(httpRequest.readyState) { case 1,2,3: alert('Bad Ready State: '+httpRequest.status); return false; break; case 4: if(httpRequest.status !=200) { alert('The server respond with a bad status code: '+httpRequest.status); return false; } else { var response = httpRequest.responseText; } break; } return response; } function Pair(name,value) { this.name = name; this.value = value; } """) resp.write('') return resp thanks Madhu Alagu --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
old plain db-api
Hi, I like to use django with just plain db-api.I'm looking for example or reference. thanks Madhu Alagu --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
old plain db-api
Hi, I like to use django + plain db-api(psycopg2).I'm looking for example or reference. Thanks Madhu Alagu --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: old plain db-api
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 email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
XMLHttpRequest - HttpResponseRedirect - Issue
Hi All, I am facing a problem in login screen using XMLHttpRequst sending the data to the controller.controller is getting the value through request.POST. but its not redirecting the same. from django.http import HttpResponse, HttpResponseRedirect import db def login(request): args = [] proc_name='c_user_f' args.append(request.POST['username']) args.append(request.POST['password']) result = db.fetchOne(proc_name,args) if result[0]: return HttpResponseRedirect("/main/") else: return HttpResponseRedirect("/login/") HttpResponseRedirect is working fine with html but with XMLHttpRequest is not working. Please help us in this regard. Thanks in advance, Madhu Alagu --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Django + XUL
I'm looking for django + xul example or reference. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
XUL template
Hi, from django.shortcuts import render_to_response def login(request): return render_to_response('login.xul', mimetype="application/ vnd.mozilla.xul+xml") and def login(request): response = render_to_response('login.xul') response['Content-Type'] = "application/vnd.mozilla.xul+xml" return response I would like to use XUL template.It is not works. Thanks Madhu Alagu -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: XUL template
Firefox 4 - Remote XUL support removed On May 21, 12:09 pm, Alagu Madhu wrote: > Hi, > > from django.shortcuts import render_to_response > > def login(request): > return render_to_response('login.xul', mimetype="application/ > vnd.mozilla.xul+xml") > > and > > def login(request): > response = render_to_response('login.xul') > response['Content-Type'] = "application/vnd.mozilla.xul+xml" > return response > > I would like to use XUL template.It is not works. > > Thanks > > Madhu Alagu -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Serving static file on Windows
Hi, sample/ media/ js/jquery.1.6.1.min.js css/ static/ js/jquery.1.6.1.min.js css/ settings.py import os PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media/') MEDIA_URL = '/media/' STATIC_ROOT = os.path.join(PROJECT_DIR, 'static/') STATIC_URL = '/static/' urls.py urlpatterns = patterns('', (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), http://192.168.1.141:44/static/js/jquery.1.6.1.min.js Page not found (404) 'js\jquery.1.6.1.min.js' could not be found Thanks Madhu -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Serving static file on Windows
Hi, sample/ static/ js/jquery.1.6.1.min.js css/ settings.py APP_DIR = os.path.abspath(os.path.dirname(__file__)) STATIC_ROOT = os.path.join(APP_DIR, 'static/') STATIC_URL = '/static/' INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', ) urls.py urlpatterns = patterns('', (r'^$', 'hydra.views.index'), ) http://192.168.1.141:44/static/js/jquery.1.6.1.min.js Page not found (404) 'js\jquery.1.6.1.min.js' could not be found Thanks Madhu On May 24, 9:44 pm, shofty wrote: > ignore that last comment, im clearly behind a version! > > not sure why you're needing to static.serve the static files, if > you're on django 1.3 it does that bit for you. > > On May 24, 9:22 am, AlaguMadhu wrote: > > > > > > > > > Hi, > > > sample/ > > media/ > > js/jquery.1.6.1.min.js > > css/ > > static/ > > js/jquery.1.6.1.min.js > > css/ > > > settings.py > > > import os > > PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) > > MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media/') > > MEDIA_URL = '/media/' > > STATIC_ROOT = os.path.join(PROJECT_DIR, 'static/') > > STATIC_URL = '/static/' > > > urls.py > > > urlpatterns = patterns('', > > (r'^media/(?P.*)$', 'django.views.static.serve', > > {'document_root': settings.MEDIA_ROOT}), > > (r'^static/(?P.*)$', 'django.views.static.serve', > > {'document_root': settings.STATIC_ROOT}), > > >http://192.168.1.141:44/static/js/jquery.1.6.1.min.js > > > Page not found (404) > > 'js\jquery.1.6.1.min.js' could not be found > > > Thanks > > >Madhu -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Serving static file on Windows
urls.py from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('', (r'^$', 'hydra.views.index'), ) On May 30, 12:28 pm, Praveen Krishna R wrote: > *could you dump your urls.py ? > * > > > > > > > > > > On Mon, May 30, 2011 at 12:19 PM, Alagu Madhu wrote: > > Hi, > > > sample/ > > static/ > > js/jquery.1.6.1.min.js > > css/ > > > settings.py > > > APP_DIR = os.path.abspath(os.path.dirname(__file__)) > > STATIC_ROOT = os.path.join(APP_DIR, 'static/') > > STATIC_URL = '/static/' > > INSTALLED_APPS = ( > > 'django.contrib.auth', > > 'django.contrib.contenttypes', > > 'django.contrib.sessions', > > 'django.contrib.sites', > > 'django.contrib.messages', > > 'django.contrib.staticfiles', > > ) > > > urls.py > > > urlpatterns = patterns('', > > (r'^$', 'hydra.views.index'), > > ) > > >http://192.168.1.141:44/static/js/jquery.1.6.1.min.js > > > Page not found (404) > > 'js\jquery.1.6.1.min.js' could not be found > > > Thanks > > > Madhu > > > On May 24, 9:44 pm, shofty wrote: > > > ignore that last comment, im clearly behind a version! > > > > not sure why you're needing to static.serve the static files, if > > > you're on django 1.3 it does that bit for you. > > > > On May 24, 9:22 am, AlaguMadhu wrote: > > > > > Hi, > > > > > sample/ > > > > media/ > > > > js/jquery.1.6.1.min.js > > > > css/ > > > > static/ > > > > js/jquery.1.6.1.min.js > > > > css/ > > > > > settings.py > > > > > import os > > > > PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) > > > > MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media/') > > > > MEDIA_URL = '/media/' > > > > STATIC_ROOT = os.path.join(PROJECT_DIR, 'static/') > > > > STATIC_URL = '/static/' > > > > > urls.py > > > > > urlpatterns = patterns('', > > > > (r'^media/(?P.*)$', 'django.views.static.serve', > > > > {'document_root': settings.MEDIA_ROOT}), > > > > (r'^static/(?P.*)$', 'django.views.static.serve', > > > > {'document_root': settings.STATIC_ROOT}), > > > > >http://192.168.1.141:44/static/js/jquery.1.6.1.min.js > > > > > Page not found (404) > > > > 'js\jquery.1.6.1.min.js' could not be found > > > > > Thanks > > > > >Madhu > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-users@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. > > -- > Thanks and Regards, > *Praveen Krishna R* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Serving static file on Windows
Hi, I use Django 1.3. sample/ static/ js/jquery.1.6.1.min.js css/ settings.py APP_DIR = os.path.abspath(os.path.dirname(__file__)) STATIC_ROOT = os.path.join(APP_DIR, 'static/') STATIC_URL = 'http://192.168.1.141:44/static/' TEMPLATE_DIRS = ( os.path.join(APP_DIR, 'templates/') ) urls.py from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('', (r'^$', 'hydra.views.index'), ) The above settings works. Thanks Madhu On May 31, 9:44 am, Praveen Krishna R wrote: > *Pasting one of my earlier replies to the same question* > *** > * > *Please check django official docs to find out how static files are served > on production and development server. > > in the dev server include a similiar snippet into your projects > urls.py, urlpatterns: > > (r'^site_media/(?P.*)$', 'django.views.static.serve',{'document_root': > 'D:/djangoprojects/praveensprofile/templates/static'}), > > and in the templates something similar to the below text. > > > * > > > > > > > > > > On Mon, May 30, 2011 at 1:57 PM, Alagu Madhu wrote: > > urls.py > > > from django.conf.urls.defaults import patterns, include, url > > > urlpatterns = patterns('', > > (r'^$', 'hydra.views.index'), > > ) > > > On May 30, 12:28 pm, Praveen Krishna R > > wrote: > > > *could you dump your urls.py ? > > > * > > > > On Mon, May 30, 2011 at 12:19 PM, Alagu Madhu wrote: > > > > Hi, > > > > > sample/ > > > > static/ > > > > js/jquery.1.6.1.min.js > > > > css/ > > > > > settings.py > > > > > APP_DIR = os.path.abspath(os.path.dirname(__file__)) > > > > STATIC_ROOT = os.path.join(APP_DIR, 'static/') > > > > STATIC_URL = '/static/' > > > > INSTALLED_APPS = ( > > > > 'django.contrib.auth', > > > > 'django.contrib.contenttypes', > > > > 'django.contrib.sessions', > > > > 'django.contrib.sites', > > > > 'django.contrib.messages', > > > > 'django.contrib.staticfiles', > > > > ) > > > > > urls.py > > > > > urlpatterns = patterns('', > > > > (r'^$', 'hydra.views.index'), > > > > ) > > > > >http://192.168.1.141:44/static/js/jquery.1.6.1.min.js > > > > > Page not found (404) > > > > 'js\jquery.1.6.1.min.js' could not be found > > > > > Thanks > > > > > Madhu > > > > > On May 24, 9:44 pm, shofty wrote: > > > > > ignore that last comment, im clearly behind a version! > > > > > > not sure why you're needing to static.serve the static files, if > > > > > you're on django 1.3 it does that bit for you. > > > > > > On May 24, 9:22 am, AlaguMadhu wrote: > > > > > > > Hi, > > > > > > > sample/ > > > > > > media/ > > > > > > js/jquery.1.6.1.min.js > > > > > > css/ > > > > > > static/ > > > > > > js/jquery.1.6.1.min.js > > > > > > css/ > > > > > > > settings.py > > > > > > > import os > > > > > > PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) > > > > > > MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media/') > > > > > > MEDIA_URL = '/media/' > > > > > > STATIC_ROOT = os.path.join(PROJECT_DIR, 'static/') > > > > > > STATIC_URL = '/static/' > > > > > > > urls.py > > > > > > > urlpatterns = patterns('', > > > > > > (r'^media/(?P.*)$', 'django.views.static.serve', > > > > > > {'document_root': settings.MEDIA_ROOT}), > > > > > > (r'^static/(?P.*)$', 'django.views.static.serve', > > > > > > {'document_root': settings.STATIC_ROOT}), > > > > > > >http://192.168.1.141:44/static/js/jquery.1.6.1.min.js > > > > > > > Page not found (404) > > > > > > 'js\jquery.1.6.1.min.js' could not be found > > > > > > > Thanks > > > > > > >Madhu > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "Django users" group. > > > > To post to this group, send email to django-users@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > django-users+unsubscr...@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/django-users?hl=en. > > > > -- > > > Thanks and Regards, > > > *Praveen Krishna R* > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django users" group. > > To post to this group, send email to django-users@googlegroups.com. > > To unsubscribe from this group, send email to > > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/django-users?hl=en. > > -- > Thanks and Regards, > *Praveen Krishna R* -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Serving static file on Windows
Hi, I use Django 1.3. sample/ static/ js/jquery.1.6.1.min.js css/ settings.py APP_DIR = os.path.abspath(os.path.dirname(__file__)) STATIC_ROOT = os.path.join(APP_DIR, 'static/') STATIC_URL = 'http://192.168.1.141:44/static/' TEMPLATE_DIRS = ( os.path.join(APP_DIR, 'templates/') ) urls.py from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('', (r'^$', 'hydra.views.index'), (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root':'/django/spl/kk/static'}), ) The above settings works. Thanks Madhu -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django Multilingual Model
Hi I am looking best model for the following tables: - ---Table : groups_t - CREATE TABLE groups_t ( id BIGINT NOT NULL, code VARCHAR NOT NULL, version BIGINT NOT NULL ); - ---Table : groups_i18n_t - CREATE TABLE groups_i18n_t ( group_id BIGINT NOT NULL, lang_id BIGINT NOT NULL, description TEXT NOT NULL, version BIGINT NOT NULL ); - ---Table : groups_lookup_t - CREATE TABLE groups_lookup_t ( group_id BIGINT NOT NULL, lang_id BIGINT NOT NULL, code VARCHAR NOT NULL, description TEXT NOT NULL, lookup_text TEXT NOT NULL ); Thanks Madhu Alagu -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Locating the Django admin Page
I am running apache tomcat server in Amazon EC2 and running django application The admin page of Django is not here http://ipaddress:8080/admin Where do I find it -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.