Search Results

Search found 3558 results on 143 pages for 'django templatetags'.

Page 53/143 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • Django logging features?

    - by MikeN
    I need to run a lot of Django management commands in the crontab and want to log the output of each run to a special timestamped file. Is there a Django or Python module to help me do this or do I just have to roll my own?

    Read the article

  • How to represent "{{" in a django template?

    - by rxin
    I'm trying to output in bibtex format in Django and the template looks like this: @{{ pubentry.type }{, author = {{% for author in pubentry.authors.all %}{{ author.first_name }} {{ author.middle_name }} {{ author.last_name }}{% if not forloop.last %} and {% endif %} {% endfor %}}, title = {{{ pubentry.title }}}, journal = {{{ pubentry.journal }}} } The problem is with the "{{{" or "{{%". One way to go around the problem is to add a space after the first "{", but that kind of tamper the format. What's the right way to escape { in Django templates?

    Read the article

  • Plural blocktrans problem with Django

    - by jorde
    I'm trying to translate a small block of text using Django's build in i18n. I don't know why but the following won't show up in different language: {% if store.rating_count %} {% blocktrans with store.rating_count as count %} {{ count }} review {% plural %} {{ count }} reviews {% endblocktrans %} {% else %} {% trans "No reviews" %} {% endif %} And a snipplet from my django.po (created with makemessages): #: templates/reviews/category.html:65 #, python-format msgid "%(count)s review" msgid_plural "%(count)s reviews" msgstr[0] "%(count)s arvostelu" msgstr[1] "%(count)s arvostelua" Other strings translate fine from the same template. I have rerun compilemessages few times.

    Read the article

  • What setup in .Net would most resemble Django

    - by Mingus Rude
    At work we are inte process of starting development on a new web-based product. Before doing so we need to establish what technology stack we are going to use. For this application my preference would have been to use Django but since the development- and management-team is soo heavily rooted with Microsoft the new product will have to be based on Microsoft technologies. So my question is, what setup, with Microsoft technologies, would most resemble a django setup with its MVT-design?

    Read the article

  • django multi-language (i18n) and seo

    - by fumer
    hi, I am developing a multi-language site in django. In order to improve SEO, i will give every language version a unique URL like below, english: www.foo.com/en/index.html french: www.foo.com/fr/index.html chinese: www.foo.com/zh/index.html However, Django looks for a "django_language" key in user's session or cookie to determine language in default, so,Despite which language user chose, URL is always the same. for instance: http://www.foo.com/index.html how to resolve this problem ? thank you!

    Read the article

  • django-admin.py startproject mysite not working well on windows 7

    - by john
    Hi I'm learning django and I did successfully start a site on Window XP by following the tutorial. However, on Window 7 when I issued: django-admin.py startproject mysite python.exe was started and a window appeared to ask me to choose either python.exe or other program to open a file.... did I do anthing wrong or there are more tricks for window 7? thanks.

    Read the article

  • Can Django be used for web services?

    - by alex
    My friend said, "Pylons is so much better for web services." My other friend said, "You can modify Django in a way to do exactly whatever you like." In Django, what is necessary to be modified (urls.py? models classes? settings?) in order to do "web services" with APIs and REST and versioning, etc etc.?

    Read the article

  • Django's local web server works, but not apaches

    - by tipu
    I've made no changes to the django project after running django-admin.py startproject Twingle When I run the local web server using python manage.py runserver, I can view the splash page telling me everything is working fine. But when I try to visit that project through apache, it fails. You can see the error at http://djaffry.selfip.com:8080/ The exception: Exception Value: No module named Twingle.urls (the project is Twingle)

    Read the article

  • How do I include the Django settings file?

    - by alex
    I have a .py file in a directory , which is inside the Django project folder. I have email settings in my settings.py, but this .py file does not import that file. How can I specify to Django that settings.py should be used , so that I can use EmailMessage class with the settings that are in my settings.py?

    Read the article

  • Django @ Google App Engine - Site Map Framework

    - by dkp
    Hi Folks, has anybody managed to get Djangos site map framework to run on Google App Engine? I receive the following exception: ImproperlyConfigured at /sitemap.xml You haven't set the DATABASE_ENGINE setting yet. Request Method: GET Request URL: http://127.0.0.1:8080/sitemap.xml Exception Type: ImproperlyConfigured Exception Value: You haven't set the DATABASE_ENGINE setting yet. Exception Location: D:\Program Files\Google\google_appengine\lib\django\django\db\backends\dummy\base.py in complain, line 13

    Read the article

  • Dynamically customize django admin columns ?

    - by tomjerry
    Is it possible to let the users choose / change dynamically the columns displayed in a object list in Django administration ? Things can surely be implemented "from scratch" by modifying the 'change_list.html' template but I was wondering if somebody has already had the same problem and/or if any django-pluggin can do that. Thanks in advance,

    Read the article

  • Alternative Django Authenication

    - by pq
    Need to integrate Django with an existing authentication system. That system has it's own database, API, login/logout,edit profile web pages and cookie. (I may have to add a few additional profile fields stored/updated locally) What's the proper approach to substitute the out-of-the-box authentication in Django?

    Read the article

  • Python/Django: log to console under runserver, log to file under Apache

    - by Justin Grant
    How can I send trace messages to the console (like print) when I'm running my Django app under manage.py runserver, but have those messages sent to a log file when I'm running the app under Apache? I reviewed Django logging and although I was impressed with its flexibility and configurability for advanced uses, I'm still stumped with how to handle my simple use-case. My apologies for not being able to find the answer elsewhere-- this is a newbie question I know.

    Read the article

  • GAE and Django: What are the benefits?

    - by RHicke
    Currently I have a website on the Google App Engine written in Google's webapp framework. What I want to know is what are the benefits of converting my app to run with django? And what are the downsides? Also how did you guys code your GAE apps? Did you use webapp or django? Or did you go an entirely different route and use the Java api? Thanks

    Read the article

  • django convert list of objects to list of primary keys

    - by John
    Hi, As the title says I have a list of Django objects and I want to get a list of primary keys. What is the best way of doing this? I know I could do my_list = [] for item in object_list: my_list.append(item.pk) but was wondering if there is Django or Python specific way of doing this better. Thanks

    Read the article

  • Django's USE_L10N does not work

    - by jack
    I already set USE_L10N = True in settings.py But in following view: from django.contrib.humanize.templatetags.humanize import intcomma dev view_name(request): output = intcomma(123456) Output is always "123,456" for all locales.

    Read the article

  • I'm an experienced PHP programmer, how would it be for me to learn and use Django and Ruby on Rails?

    - by João Paulo Apolinário Passos
    I'm an experienced PHP programmer, I still have lots to learn but I consider myself experienced. I sometimes use pure PHP and sometimes some framework like CodeIgniter. I always wanted to learn new technologies like Python and Ruby, and their best frameworks for web are Django and Ruby on Rails, but I want to ask to persons like me who migrated from PHP to some of this technologies if is it worth it; Thank you

    Read the article

  • python manage.py runserver fails

    - by Randy Simon
    I am trying to learn django by following along with this tutorial. I am using django version 1.1.1 I run django-admin.py startproject mysite and it creates the files it should. Then I try to start the server by running python manage.py runserver but here is where I get the following error. Traceback (most recent call last): File "manage.py", line 11, in <module> execute_manager(settings) File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 362, in execute_manager utility.execute() File "/Library/Python/2.6/site-packages/django/core/management/__init__.py", line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 213, in execute translation.activate('en-us') File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 73, in activate return real_activate(language) File "/Library/Python/2.6/site-packages/django/utils/translation/__init__.py", line 43, in delayed_loader return g['real_%s' % caller](*args, **kwargs) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 205, in activate _active[currentThread()] = translation(language) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 194, in translation default_translation = _fetch(settings.LANGUAGE_CODE) File "/Library/Python/2.6/site-packages/django/utils/translation/trans_real.py", line 172, in _fetch for localepath in settings.LOCALE_PATHS: File "/Library/Python/2.6/site-packages/django/utils/functional.py", line 273, in __getattr__ return getattr(self._wrapped, name) AttributeError: 'Settings' object has no attribute 'LOCALE_PATHS' Now, I can add a LOCALE_PATH atribute and set to an empty tuple to my settings.py file but then it just complains about another setting and so on. What am I missing here?

    Read the article

  • Django - How to do CSFR on public pages? Or, better yet, how should it be used period?

    - by orokusaki
    After reading this: http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#how-to-use-it I came to the conclusion that it is not valid to use this except for when you trust the person who is using the page which enlists it. Is this correct? I guess I don't really understand when it's safe to use this because of this statement: This should not be done for POST forms that target external URLs, since that would cause the CSRF token to be leaked, leading to a vulnerability. The reason it's confusing is that to me an "external URL" would be on that isn't part of my domain (ie, I own www.example.com and put a form that posts to www.spamfoo.com. This obviously can't be the case since people wouldn't use Django for generating forms that post to other people's websites, but how could it be true that you can't use CSRF protection on public forms (like a login form)?

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >