Search Results

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

Page 64/143 | < Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >

  • Django Date Input Parsing?

    - by Dane Larsen
    I'm trying to get a date for an event from a user. The input is just a simple html text input. My main problem is that I don't know how to parse the date. If I try to pass the raw string, I get a TypeError, as expected. Does Django have any date-parsing modules?

    Read the article

  • Django approximate matching of unicode strings with ascii equivalents

    - by c
    I have the following model and instance: class Bashable(models.Model): name = models.CharField(max_length=100) >>> foo = Bashable.objects.create(name=u"piñata") Now I want to be able to search for objects, but using ascii characters rather than unicode, something like this: >>> Bashable.objects.filter(name__lookslike="pinata") Is there a way in Django to do this sort of approximate string matching, using ascii stand-ins for the unicode characters in the database? Here is a related question, but for Apple's Core Data.

    Read the article

  • Difference in Django object creation call

    - by PhilGo20
    I'd like to know if there's a difference between the following two calls to create an object in Django Animal.objects.create(name="cat", sound="meow") and Animal(name="cat", sound="meow") I see both in test cases and I want to make sure I am not missing something. thanks

    Read the article

  • List all form related errors in django

    - by Mridang Agarwalla
    Hi, Is there a direct way of listing out 'all' form errors in Django templates. I'd like to list out both field and non-field errors and any other form errors. I've found out how to do this on a per-field basis but as said earlier, I'd like to list out everything. The method I'm using doesn't seem to list out everything. {% for error in form.errors %} {{ error|escape }} {% endfor %} Thanks.

    Read the article

  • Run django tests from a browser

    - by phoebebright
    I'd like to provide a browser page to help non-techies run the various tests I've created using the standard django test framework. The ideal would be for a way to display all the tests found for an application with tick boxes against each one, so the user could choose to run all tests or just a selection. Output would be displayed in a window/frame for review. Anyone know of such a thing?

    Read the article

  • Use Apache authentication in Django without popup

    - by chernevik
    I am using Apache to authenticate users for Django, but I would like to do so without the popup form that Apache uses in its basic configuration. How do I embed the login form within a page while still using Apache for authentication? That is, I'd like a page that says "Please login" and provides a form asking for username and password, and passes this information on to Apache for authentication. (I'd do this over an SSL connection, of course.)

    Read the article

  • Django 5 star Reviews

    - by firststepofthejourney
    Hello All, I am new to programming and I just jumped in to Django and I need a bit of help. I downloaded the generic reviews model off of Google code and I have no clue how to implement it. Can anyone pass along some guidance on how to make this work with a 5 star ratings system? I would appreciate it. Thanks.

    Read the article

  • Django Fancy String Diff During Test Execution in Console

    - by Koobz
    Anyone know of any pre-existing tools out there what will highlight differences in output when running Django tests? I'm comparing some JSON output and it's tough to find things like extra spaces. I was about to just copy and paste this into an existing diff tool but I figured this might be on someone's radar.

    Read the article

  • django deployment apache

    - by Uszy Wieloryba
    I would like to create a python script, which will: Create a django project in the current directory. Fix settings.py, urls.py. Do syncdb Install new apache instance listening on specific port (command line argument), with WSGI configured to serve my project. I can't figure out how to do point 3. EDIT: Peter Rowell: I need the solution for both Linux and Windows I have root access This is a dedicated host Apache only

    Read the article

  • django link format words joined with hypens

    - by soField
    href="http://www.torontolife.com/daily/daily-dish/restauranto/2010/03/10/best-new-restaurants-2010-james-chatto-names-five-honourable-mentions/"Best new restaurants 2010: honourable mentions is django has built in mechanism to format links above i mean words joined with hypens how can achieve this ?

    Read the article

  • python django automated data addition

    - by zubin71
    I have a script which reads data from a csv file. I need to store the data into a database which has already been created as $ python manage.py syncdb so, that automated data entry is possible in an easier manner, as available in the django shell.

    Read the article

  • django url matching

    - by ben
    can anyone see why this wouldn't be working. Fairly new to django so any help would be much appreciated actual url: http://127.0.0.1:8000/2010/may/12/my-second-blog-post/ urls.py: (r'(?P<year>d{4})/(?P<month>[a-z]{3})/(?P<day>w{1,2})/(?P<slug>[-w]+)/$', 'object_detail', dict(info_dict, slug_field='slug',template_name='blog/detail.html')),

    Read the article

  • use of ajax in django

    - by tazim
    Hi, I am new to ajax and django. I have written own XMLHttpRequest call on browser side I will have to manually set the header request.META['HTTP_X_REQUESTED_WITH'] to string XMLHttpRequest . How can I access these headers on browser side

    Read the article

  • Python module being reloaded for each request with django and mod_wsgi

    - by Vishal
    I have a variable in init of a module which get loaded from the database and takes about 15 seconds. For django development server everything is working fine but looks like with apache2 and mod_wsgi the module is loaded with every request (taking 15 seconds). Any idea about this behavior? Update: I have enabled daemon mode in mod wsgi, looks like its not reloading the modules now! needs more testing and I will update.

    Read the article

  • Django: How to handle imports in a reusable app

    - by facha
    everyone I'm just starting with django. It is not quite clear to me, how should I write an app I could reuse later. In every tutorial I read I see the same piece of code: view.py from project.app.models import MyModel So, if I move my apps to another project, I'll have to modify the "project.app.models" so that it looks like "project2.app.models" for every app I move. Is there a way to avoid that? Thanks in advance.

    Read the article

  • Django - use template tag and 'with'?

    - by AP257
    I have a custom template tag: def uploads_for_user(user): uploads = Uploads.objects.filter(uploaded_by=user, problem_upload=False) num_uploads = uploads.count() return num_uploads and I'd like to do something like this, so I can pluralize properly: {% with uploads_for_user leader as upload_count %} {{ upload_count }} upload{{ upload_count|pluralize }} {% endwith %} However, uploads_for_user leader doesn't work in this context, because the 'with' tag expects a single value - Django returns: TemplateSyntaxError at /upload/ u'with' expected format is 'value as name' Any idea how I can get round this?

    Read the article

  • Django message framework and login_required

    - by Brandon
    I'm using the Django Message Framework to show messages to users as well as the @login_required decorator on one of my views. So if a user tries to access a certain view without being logged in, they get kicked to the login page. How would I go about adding an error message to the login page saying "In order to do ... you must be logged in". I can't add it in the view like you normally would because the non-logged in user would never get to there.

    Read the article

  • GAE : Open Source Django Apps

    - by sprezzatura
    Am looking for open source Django apps in Google App engine. I want to play around with the code and learn in the process. Not mandatory, but Would be great feature in the app: - account registration/login - image/file upload

    Read the article

< Previous Page | 60 61 62 63 64 65 66 67 68 69 70 71  | Next Page >