Re: new user
Mate. What's up? On 22 Dec, 2012 10:08 AM, "hardik juneja"wrote: > > hello sir, > i m new to django and need some hep can u help me > > -- > 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/-/BiaGVHvURw4J. > 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. > -- 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:
Do you have the template_dirs setting in your settings.py pointing to project/app/templates/ ? On Sat, Dec 22, 2012 at 4:46 PM, vinoth kumar renganathanwrote: > i am new user to django .and i don't know how to add .html files > (template dirs ) to the apps folders .what are the things want to change > in settings.py > > > the error will be templatedoesnotexist >/polls > /admin.py > /__init__.py > /models.py > /tests.py > /urls.py > /views.py > /template >/polls > /index.html > and this order will be correct or not > > for example this will be codings > > {% if latest_poll_list %} > > {% for poll in latest_poll_list %} > {{ poll.question }} > {% endfor %} > > {% else %} > No polls are available. > {% endif %} > > is it necessary to add htmltag ,header tag and doctype before this html > codings > > > -- > 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. -- ...we look at the present day through a rear-view mirror. This is something Marshall McLuhan said back in the Sixties, when the world was in the grip of authentic-seeming future narratives. He said, “We look at the present through a rear-view mirror. We march backwards into the future.” http://www.warrenellis.com/?p=14314 -- 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.
[no subject]
i am new user to django .and i don't know how to add .html files (template dirs ) to the apps folders .what are the things want to change in settings.py the error will be templatedoesnotexist /polls /admin.py /__init__.py /models.py /tests.py /urls.py /views.py /template /polls /index.html and this order will be correct or not for example this will be codings {% if latest_poll_list %} {% for poll in latest_poll_list %} {{ poll.question }} {% endfor %} {% else %} No polls are available. {% endif %} is it necessary to add htmltag ,header tag and doctype before this html codings -- 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: New to Django; walking through djangoproject tutorial; can't get poll to work
Sorry for my delayed response. I didn't receive a notification that you had replied for some reason. Anyway, you're correct. That's exactly what the issue was and now I feel dumb. Thank you very much! On Wednesday, December 19, 2012 12:39:41 AM UTC-5, Jeff Tchang wrote: > > My first guess is that > > {% for choice in poll.choice_set.all %} > > is empty. So you have no choices attached to the poll. You can verify > this by looking at the generated HTML source and seeing if you have > any radio buttons at all. Since you said you didn't that is my guess. > > I didn't go back and look at the tutorial but try creating some > choices for the poll. > > -Jeff > > On Tue, Dec 18, 2012 at 7:56 PM, Deron> wrote: > > Hi, > > > > First post here. I'm extremely new to Django and I have been fumbling my > way > > through the DjangoProject "poll" app tutorial for a couple weeks now. I > > understand a lot of what's going on, but a lot of things are completely > lost > > on me as well. That said, I'm to the point of actually using the poll > app. > > I've created a view so you can view the poll, select a choice and then > click > > "vote." Problem is, when I view the page (/polls/1/) I see my heading > which > > is "What's Up?" and I see a "vote" input button, but no radio button. > I'm > > not exactly sure why it's not showing up. Anyone want to take a shot in > the > > dark on this one? Here's my "detail.html" view (copied straight from the > > tutorial): > > > > {{ poll.question }} > > {% if error_message %}{{ error_message }}{% > endif %} > > > > {% csrf_token %} > > {% for choice in poll.choice_set.all %} > > > value="{{ choice.id }}" /> > > {{ choice.choice > }} > /> > > {% endfor %} > > > > > > > > -- > > 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/-/DtV-YM6VU44J. > > 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/-/ThbLoEpqLPIJ. 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: A new kind of blocktrans that works with an unknown format string and a dictionary containing substitutes.
On Thu, Dec 20, 2012 at 7:18 AM, Kal Szewrote: > Hello, > > While trying to develop my first real Django project, I have come across > an *apparent* need to i18n'ize any arbitrary, unknown format string, with > an accompanying dictionary that contains the substitutes to insert into the > translated format string. For instance, I have a template that is displayed > when a certain SomeError is raised: > > except SomeError as error: > render_to_response('myapp/some_error.html', >{ 'the_error': error }, >context_instance=RequestContext(request)) > > I expect the SomeError object to contain information to be displayed to > the user. Specifically, SomeError will have a format_string attribute and > a substitute_dict attribute. The content of format_string is chosen at > runtime, but it is assumed that translations exist. For instance, > format_string could be: > > "{{user}}, you cannot upload this video because you are out of quota. > You only have {{capacity}} out of {{quota}} left in your account." > > or it could be: > > "{{user}}, you cannot upload this video because it is in a format that > we don't accept ({{video_format}})." > > Now assume that French, Spanish, Chinese, etc. translations exist for the > two example strings above. > > And substitute_dict would contain the correct substitute strings. For > instance: > > { > 'user': 'Alice', > 'capacity': '50 MB', > 'quota': '20 GB', > } > > or > > { > 'user': 'Alice', > 'video_format': '3ivx', > } > > As you can imagine, even Django's built-in {% blocktrans %} tag doesn't > seem to help here, for two reasons (as far as I understand): > >1. it requires the substitutes to be explicitly declared and bound to >variables right in the template file; >2. it requires the i18n string to be spelled out between {% blocktrans >%} and {% endblocktrans %}; it cannot work with an i18n string that is >itself inside a variable. > > Which means that I apparently need a new template tag, maybe something > called {% blockdicttrans format_string substitute_dict %}. > > Is this madness? Have I overlooked some Django or Pythonic way? Or is it > actually a justifiable use case? > > Cheers, > Kal > > > I will leave the answering of the meat of your question to someone who has actually performed internationalization (other than to say that support must be enabled in settings, and that there is a collection of mappings that must be produced, as you surmise, in a per app sub directory structure, IIUC). However, presuming that your try/render code is copied, rather than being a reduced summary, I would point out that render_to_response has a value which must be 'return'ed from the view in order to have any effect. Bill -- 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: new user
hello sir, i m new to django and need some hep can u help me -- 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/-/BiaGVHvURw4J. 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.
[no subject]
http://atilimyazilim.com/images/google.html -- 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: new user
On 12/21/2012 02:13 PM, Satinderpal Singh wrote: On Fri, Dec 21, 2012 at 5:57 PM, senthil mariyappanwrote: hi friends, i new one to django.. Welcome, man. I hope we can help you!!. Welcome to the Django family. -- Satinderpal Singh http://satindergoraya.blogspot.in/ http://satindergoraya91.blogspot.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-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: new user
On Fri, Dec 21, 2012 at 5:57 PM, senthil mariyappanwrote: > hi friends, i new one to django.. Welcome to the Django family. -- Satinderpal Singh http://satindergoraya.blogspot.in/ http://satindergoraya91.blogspot.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-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.
light Box with image slider
Hallo, I have a small area (400x400px) on the website I want to use to implement a slider in a zoomBox [1]. If a user clicks on it, it should enlarge (light box) and start a slider animation. Currently that box is filles with a "Chunks" by the django-chunks. Since I'm new to Django, what is the django way to implement such? 1. http://slideshow.triptracker.net/index.html Thanks for any support, Michael -- 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.
Monster query from searching in admin
I'm getting a monster query that hangs the database when a search is done in the admin interface. SELECT DISTINCT `clothes_outfit`.`id` FROM `clothes_outfit` INNER JOIN `clothes_outfit_articles` ON ( `clothes_outfit`.`id` = `clothes_outfit_articles`.`outfit_id` ) INNER JOIN `clothes_article` ON ( `clothes_outfit_articles`.`article_id` = `clothes_article`.`id` ) INNER JOIN `clothes_outfit_articles` T4 ON ( `clothes_outfit`.`id` = T4.`outfit_id` ) INNER JOIN `clothes_article` T5 ON ( T4.`article_id` = T5.`id` ) INNER JOIN `clothes_outfit_articles` T6 ON ( `clothes_outfit`.`id` = T6.`outfit_id` ) INNER JOIN `clothes_article` T7 ON ( T6.`article_id` = T7.`id` ) INNER JOIN `clothes_outfit_articles` T8 ON ( `clothes_outfit`.`id` = T8.`outfit_id` ) INNER JOIN `clothes_article` T9 ON ( T8.`article_id` = T9.`id` ) INNER JOIN `clothes_outfit_articles` T10 ON ( `clothes_outfit`.`id` = T10.`outfit_id` ) INNER JOIN `clothes_article` T11 ON ( T10.`article_id` = T11.`id` ) INNER JOIN `clothes_outfit_articles` T12 ON ( `clothes_outfit`.`id` = T12.`outfit_id` ) INNER JOIN `clothes_article` T13 ON ( T12.`article_id` = T13.`id` ) INNER JOIN `clothes_outfit_articles` T14 ON ( `clothes_outfit`.`id` = T14.`outfit_id` ) INNER JOIN `clothes_article` T15 ON ( T14.`article_id` = T15.`id` ) INNER JOIN `clothes_outfit_articles` T16 ON ( `clothes_outfit`.`id` = T16.`outfit_id` ) INNER JOIN `clothes_article` T17 ON ( T16.`article_id` = T17.`id` ) INNER JOIN `clothes_outfit_articles` T18 ON ( `clothes_outfit`.`id` = T18.`outfit_id` ) INNER JOIN `clothes_article` T19 ON ( T18.`article_id` = T19.`id` ) INNER JOIN `clothes_outfit_articles` T20 ON ( `clothes_outfit`.`id` = T20.`outfit_id` ) INNER JOIN `clothes_article` T21 ON ( T20.`article_id` = T21.`id` ) WHERE ( `clothes_article`.`name` LIKE '%Express%' AND T5.`name` LIKE '%Flare%' AND T7.`name` LIKE '%Jeans%' AND T9.`name` LIKE '%-%' AND T11.`name` LIKE '%0L%' AND T13.`name` LIKE '%Light%' AND T15.`name` LIKE '%Hot%' AND T17.`name` LIKE '%Pink%' AND T19.`name` LIKE '%Tank%' AND T21.`name` LIKE '%F21%' ) ORDER BY `clothes_outfit`.`id` DESC LIMIT 21; Here are the relevant parts of the model... class Article(models.Model): name = models.CharField(max_length=200) class Outfit(models.Model): articles = models.ManyToManyField(Article, related_name='outfits') And from admin: class OutfitAdmin(admin.ModelAdmin): search_fields = ['articles__name',] -- 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/-/LmiFC1Cc9Z4J. 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.
new user
hi friends, i new one to django.. -- 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/-/SDpcDnlGgxMJ. 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.
comments app customisation failure
Hi, I am trying to customise the comments app by adding rating field. i am using django-ratings along with jquery-star. I have followed the instructions mentioned in http://www.azavea.com/blogs/labs/2011/04/jquery-star-rating-with-django-ratings/ but i am getting an error when i try to post the comment. Below is the error i am getting Traceback: File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view 91. response = view_func(request, *args, **kwargs) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/views/decorators/http.py" in inner 41. return func(request, *args, **kwargs) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/contrib/comments/views/comments.py" in post_comment 109. comment = form.get_comment_object() File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/contrib/comments/forms.py" in get_comment_object 115. new = CommentModel(**self.get_comment_create_data()) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/db/models/base.py" in __init__ 367. raise TypeError("'%s' is an invalid keyword argument for this function" % kwargs.keys()[0]) Exception Type: TypeError at /comments/post/ Exception Value:* 'rating' is an invalid keyword argument for this function* I have copied my code in here https://gist.github.com/4347324 Can anyone help with this? Thanks Sri -- 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/-/rAHbChP2TKYJ. 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: Django community, is it active?
On Thu, Dec 20, 2012 at 10:14 PM, peterwrote: > > There is no stupid questions. There are only stupid answers Hi, welcome to the Django community. Stupid answers is my role, I'm the stupid answers coordinator for the Django email list project. Nice to meet you! L. -- 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 comments app customization
Hi, I am trying to customise the comments app by adding a rating field using django-ratings and jquery-star. But when i try to post a comment, i am getting below error. Traceback: File "/Users/django*demo/godjango/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response 111. response = callback(request, callback_args, *callback_kwargs) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view 91. response = view_func(request, args, *kwargs) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/views/decorators/http.py" in inner 41. return func(request, args, *kwargs) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/contrib/comments/views/comments.py" in post_comment 109. comment = form.get_comment_object() File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/contrib/comments/forms.py" in get_comment_object 115. new = CommentModel(**self.get_comment_create_data()) File "/Users/django_demo/godjango/lib/python2.7/site-packages/django/db/models/base.py" in __init*_ 367. raise TypeError("'%s' is an invalid keyword argument for this function" % kwargs.keys()[0]) Exception Type: TypeError at /comments/post/ Exception Value: *'rating'* is an invalid keyword argument for this function I am following the instructions mentioned in http://www.azavea.com/blogs/labs/2011/04/jquery-star-rating-with-django-ratings/ and https://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/ I have pasted my code in https://gist.github.com/4347324. __init__.py in my comments app looks like this https://gist.github.com/4347324#file-__init__-py models.py in my comments app looks like this https://gist.github.com/4347324#file-models-py forms.py in my comments app looks like this https://gist.github.com/4347324#file-forms-py widgets.py in comments app looks like this...https://gist.github.com/4347324#file-widgets-py and i have two template files to display the comments in my templates/comments folder, which looks like below https://gist.github.com/4347324#file-form-html https://gist.github.com/4347324#file-list-html Can anyone help solving this issue ? 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/-/ak6So4Ay7W4J. 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.