Search Results

Search found 15813 results on 633 pages for 'django settings'.

Page 58/633 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Node.js as a custom (streaming) upload handler for Django

    - by Gijs
    I want to build an upload-centric app using Django. One way to do this is with nginx's upload module (nonblocking) but it has its problems. Node.js is supposed to be a good candidate for this type of application. But how can I make node.js act as an upload_handler() for Django (http://docs.djangoproject.com/en/1.1/topics/http/file-uploads/#modifying-upload-handlers-on-the-fly) I'm not sure where to look for examples?

    Read the article

  • Having a POST'able API and Django's CSRF Middleware

    - by T. Stone
    I have a Django webapp that has both a front-end, web-accessible component and an API that is accessed by a desktop client. However, now with the new CSRF middleware component, API requests from the desktop client that are POST'ed get a 403. I understand why this is happening, but what is the proper way to fix this without compromising security? Is there someway I can signal in the HTTP header that it's an API request and that Django shouldn't be checking for CSRF or is that a bad strategy?

    Read the article

  • Make CSRF middleware work in Django's 404 error pages

    - by jack
    I put a login box alone with a keyword search box in 404.html in a Django project so in case a 404 error is raised, visitors get more options to jump to other parts. But the CSRF middleware doesn't work in 404 error page with no csrf token rendered. I tried move 'django.middleware.csrf.CsrfViewMiddleware' to first of MIDDLEWARE_CLASSES in settings.py but did not work either. Anyone knows a solution?

    Read the article

  • jQuery as a replacement for Django or Web2Py

    - by ganjod
    Hi all, I was planning to write a new webapp, I figured out two options for my backend - web2py or django. I recently came across jQuery and found it to be very cool. Could I just use jQuery as a replacement for django and web2py and finish this webapp. Some features that I'm going to implement - user profiles, users can add content to the website, etc. Is it possible to do solely in jQuery ?

    Read the article

  • django flatpages in rails?

    - by rakeham
    Hi How can I build a minimal CMS like Django does it with django-flatpages? I prefer a build in solution not a plugin. I heard of controller caching, maybe someone knows a other solution. thanks!

    Read the article

  • Advice on Python/Django and message queues

    - by Andy Hume
    I have an application in Django, that needs to send a large number of emails to users in various use cases. I don't want to handle this synchronously within the application for obvious reasons. Has anyone any recommendations for a message queuing server which integrates well with Python, or they have used on a Django project? The rest of my stack is Apache, mod_python, MySQL.

    Read the article

  • Tornado or Django works with CGI ?

    - by xRobot
    Hi at all, Tornado is a webserver + framework like Django but for real-time features. On my server I don't have a python module or wsgi module so I thought CGI. Is there a way to get Tornado ( or Django ) works by using CGI folder ? If yes, Could you explain me how do I do that ?

    Read the article

  • Activating Eclipse Django Editor on OS X

    - by hekevintran
    I installed a plugin for Eclipse called Django Editor. I can't figure out how to use it. The editor is not in my list of editors so I cannot do "Open with Django Editor" on a file nor associate a file extension with it. It appears nowhere in my preferences. How can I activate this editor? I am running Mac OS X 10.5.8 and Eclipse 3.5.2 Galileo.

    Read the article

  • How to use Django with GWT ?

    - by Mononofu
    So I know that I can communicate between those two using JSON, but I also know that I would have to manually recreate all Django objects in JS. Do you know of any tool or library that could help me do that? Or maybe even a better way of achieving the same goal? I only found these two: http://palantar.blogspot.com/2006/06/agad-tutorial-ish-sort-of-post.html http://stackoverflow.com/questions/990319/django-gwt-or-jquery But then I still would have to manually mirror my objects, which would violate DRY.

    Read the article

  • Testing tools for Django Project

    - by Bharath
    Can anyone please suggest me some good testing tools for a django project? I need to test the different use case scenarios, unit testing, as well as load testing for my project. Is there any good standard testing suite available?? Any other suggestion(s) for the testing process is greatly appreciated. I use Django, postgresql on Ubuntu server if this information is necessary.

    Read the article

  • Create a Session in Django

    - by Reznor
    So far the Documentation for Django has been too technical. How do I create a session and store variables in it or get variables from it? I'm new to the Django framework, hence why the Documentation is too technical. Sessions are my 'last step'.

    Read the article

  • How to chroot Django

    - by Brian M. Hunt
    Can one run Django in a chroot? Notably, what's necessary in order to set up (for example) /var/www as a chroot'd directory and then have Django run in that chroot'd directory? Thank you - I'm grateful for any input.

    Read the article

  • Django anonymous user in model

    - by jack
    I have a model defined as below: class Example(models.Model): user = models.ForeignKey(User, null=True) other = models.CharField(max_length=100) The problem is Django refuses to assign django.contrib.auth.models.AnonymousUser directly to Example.user as null field so everytime I have to check if request.user.is_authenticated() ans assign Example.user = None manually. Is there a default value for AnonymousUser to use in a model field?

    Read the article

  • DRY URL's in Django Javascript

    - by Noio
    I'm using Django on Appengine. I'm using the django reverse() function everywhere, keeping everything as DRY as possible. However, I'm having trouble applying this to my client-side javascript. There is a JS class that loads some data depending on a passed-in ID. Is there a standard way to not-hardcode the URL that this data should come from? var rq = new Request.HTML({ 'update':this.element, }).get('/template/'+template_id+'/preview'); //The part that bothers me.

    Read the article

  • Error in django url.py??

    - by qulzam
    I am new in django. I try to practice and run the wiki application (i found tutorial at Learn django), In url.py file i write the following urls... urlpatterns = patterns('', (r'^wikicamp/(?p[^/]+)/edit/$','wikiapp.wiki.views.edit_page'), (r'^wikicamp/(?p[^/]+)/save/$','wikiapp.wiki.views.save_page'), (r'^wikicamp/(?p[^/]+)/$','wikiapp.wiki.views.view_page'), ) But there is errror which i cant understand. sre_Constants.error:Unexpected end of pattern. (r'^wikicamp/(?p[^/]+)/$','wikiapp.wiki.views.view_page'),

    Read the article

  • Django template call function

    - by cleg
    I'm passing to Django's template a function, which returns me some records. I want to call this function and iterate over it's result. {% for item in my_func(10) %} That doesn't work. I've tried to set fuction's return value to a variable and iterate over variable, but there seems to be no way to set variable in Django template. Is there any normal way to do it?

    Read the article

  • Django's makemessages creates a lot of fuzzy entries

    - by jack
    Each time I added some strings to a Django string, I run "django-admin.py makemessages -all" to generate .PO files for all locales. The problem is even I only added 5 news strings, the makemessages command will make 50 strings as fuzzy in .PO files which brings a lot of extra work for our locale maintainers. This also makes the entire i18n unusable before they manually revise those fuzzy strings.

    Read the article

  • Favorite Django Tips & Features?

    - by Haes
    Inspired by the question series 'Hidden features of ...', I am curious to hear about your favorite Django tips or lesser known but useful features you know of. Please, include only one tip per answer. Add Django version requirements if there are any.

    Read the article

  • Django-like templates system for Java?

    - by Savash
    I'm looking for the templates engine for Java with syntax like in Django templates or Twig (PHP). Is it exists? Update: The target is to have same templates files for different languages. File index.tpl {{head}} {{ var|escape }} {{body}} can be rendered from python (Django) code as well as from PHP, using Twig. I'm looking for Java solution. Thanks.

    Read the article

  • Returning content directly from memcache - Django / HTTP Server

    - by RadiantHex
    Hi folks, I've built a web application with Django, I'm using Memcached in order to cache data. A few views cache the whole HttpResponse objects, therefore there might be a better alternative for returning the Memcached data other than going through Django. What could be faster alternatives for returning Memcached data on HTTP Requests ? I'm trying to make the operation as fast and lightweight as possible. Help would be much appreciated! :)

    Read the article

  • Is there a Railscasts for Django?

    - by J McConnell
    I learned everything I know about Rails from Railscasts. Now I want to learn Django but I'm not finding any comprehensive tutorial resources like Railscasts. Does an equivalent not exist in the Django world? If so, is that because there is less to learn?

    Read the article

  • Django OR Rails

    - by Mahesh
    Its not the another language debate, its a decision making discussion. I am a ASP.NET developer, but want to learn other frameworks/language (open source). I don't know from where i should start and why? Django and Rails both seems promising, but i am confused which one i should choose to start, or i should choose some other framework. I know learning the language (python or ruby) is must before start Django or Rails. Please advise.

    Read the article

  • Missing trailing / for admin page edits in django-cms

    - by 47
    I've managed to set up Django CMS for my website successfully...however, when editing a page in the admin, the trailing / isn't added automatically so my URL's look something like: http://localhost:8000/admin/cms/page/22 When I tried running the example project that comes bundled with the Django-CMS setup, this slash is added automatically....how can I have the same for my project?

    Read the article

  • Django Multi-Table Inheritance VS Specifying Explicit OneToOne Relationship in Models

    - by chefsmart
    Hope all this makes sense :) I'll clarify via comments if necessary. Also, I am experimenting using bold text in this question, and will edit it out if I (or you) find it distracting. With that out of the way... Using django.contrib.auth gives us User and Group, among other useful things that I can't do without (like basic messaging). In my app I have several different types of users. A user can be of only one type. That would easily be handled by groups, with a little extra care. However, these different users are related to each other in hierarchies / relationships. Let's take a look at these users: - Principals - "top level" users Administrators - each administrator reports to a Principal Coordinators - each coordinator reports to an Administrator Apart from these there are other user types that are not directly related, but may get related later on. For example, "Company" is another type of user, and can have various "Products", and products may be supervised by a "Coordinator". "Buyer" is another kind of user that may buy products. Now all these users have various other attributes, some of which are common to all types of users and some of which are distinct only to one user type. For example, all types of users have to have an address. On the other hand, only the Principal user belongs to a "BranchOffice". Another point, which was stated above, is that a User can only ever be of one type. The app also needs to keep track of who created and/or modified Principals, Administrators, Coordinators, Companies, Products etc. (So that's two more links to the User model.) In this scenario, is it a good idea to use Django's multi-table inheritance as follows: - from django.contrib.auth.models import User class Principal(User): # # # branchoffice = models.ForeignKey(BranchOffice) landline = models.CharField(blank=True, max_length=20) mobile = models.CharField(blank=True, max_length=20) created_by = models.ForeignKey(User, editable=False, blank=True, related_name="principalcreator") modified_by = models.ForeignKey(User, editable=False, blank=True, related_name="principalmodifier") # # # Or should I go about doing it like this: - class Principal(models.Model): # # # user = models.OneToOneField(User, blank=True) branchoffice = models.ForeignKey(BranchOffice) landline = models.CharField(blank=True, max_length=20) mobile = models.CharField(blank=True, max_length=20) created_by = models.ForeignKey(User, editable=False, blank=True, related_name="principalcreator") modified_by = models.ForeignKey(User, editable=False, blank=True, related_name="principalmodifier") # # # Please keep in mind that there are other user types that are related via foreign keys, for example: - class Administrator(models.Model): # # # principal = models.ForeignKey(Principal, help_text="The supervising principal for this Administrator") user = models.OneToOneField(User, blank=True) province = models.ForeignKey( Province) landline = models.CharField(blank=True, max_length=20) mobile = models.CharField(blank=True, max_length=20) created_by = models.ForeignKey(User, editable=False, blank=True, related_name="administratorcreator") modified_by = models.ForeignKey(User, editable=False, blank=True, related_name="administratormodifier") I am aware that Django does use a one-to-one relationship for multi-table inheritance behind the scenes. I am just not qualified enough to decide which is a more sound approach.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >