Search Results

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

Page 23/143 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • installing snippets

    - by Sevenearths
    How do I install snippets in django? (specifically this) I have the file /{project}/snippets/EnforceLoginMiddleware.py and I have tried any number of permutations inside MIDDLEWARE_CLASSES to load it as well as googling django snippets install to no avail :( Any help would be grateful :) PS(Why can't I find any documentation or examples on the installation of snippets. Maybe I'm just a bad googler)

    Read the article

  • django custom command and cron

    - by Hellnar
    Hello I want my customly made django command to be executed every minute, however it seems like python /path/to/project/myapp/manage.py mycommand doesn't seem to work while at the directory python manage.py mycommand works perfectly. How can I achieve this ? I use /etc/crontab with: ****** root python /path/to/project/myapp/manage.py mycommand

    Read the article

  • Django admin, hide a model

    - by Hellnar
    Hello At the root page of the admin site where registered models appear, I want to hide several models that are registered to the Django admin. If I directly unregister those, I am not able to add new records as the add new symbol "+" dissapears. How can this be done ?

    Read the article

  • How to detect Browser type in Django ?

    - by AlgoMan
    How can i detect which browser type the client is using. I have a problem where i have to ask people to use different browser (Firefox) instead of IE. How can i get this information. I know http request has this information (Header). How will i get the navigator.appName from the view.py in the Django framework ?

    Read the article

  • How do I get django comments to join on auth_user

    - by AlexH
    I'm using the django comments framework, and when I list the comments I want to include some of the information stored in auth_user. However, I find I need an extra query for each comment to get the user info. I tried using select_related() when I pull the comments, but this doesn't help. Is there a reason that it's not joining the auth_user table, and is there any way to force it to?

    Read the article

  • access django session from a decorator

    - by ed1t
    I have a decorator that I use for my views @valid_session from django.http import Http404 def valid_session(the_func): """ function to check if the user has a valid session """ def _decorated(*args, **kwargs): if ## check if username is in the request.session: raise Http404('not logged in.') else: return the_func(*args, **kwargs) return _decorated I would like to access my session in my decoartor. When user is logged in, I put the username in my session.

    Read the article

  • Django: Password protect photo url's?

    - by MikeN
    From my Django application I want to serve up secure photos. The photos are not for public consumption, I only want logged in users to have the ability to view them. I don't want to rely on obfuscated file id's (giving a photo a UUID of a long number) and count on that being hidden in my media folder. How would I store a photo securely on disk in my database and only stream it out to an authenticated session?

    Read the article

  • How do you access/configure summaries/snippets in Django Haystack

    - by mlissner
    I'm working on getting django-haystack set up on my site, and am trying to have snippets in my search results roughly like so: Title of result one about Wikis ...this special thing about wiki values is that...I always use a wiki when I walk...snippet value three talks about wikis too...and here's another snippet value about wikis. I know there's a template tag for highlighting, but how do you generate the snippets themselves? I know Solr generates these, but I can't figure out how to get them from Haystack.

    Read the article

  • Loading SQL dump before running Django tests

    - by knutin
    I have a fairly complex Django project which makes it hard/impossible to use fixtures for loading data. What I would like to do is to load a database dump from the production database server after all tables has bene created by the testrunner and before the actual tests start running. I've tried various "magic" in MyTestCase.setUp(), but with no luck. Any suggestions would be most welcome. Thanks.

    Read the article

  • Django - Threading in views without hanging the server

    - by bobthabuilda
    One of my applications in my Django project require each request/visitor to that instance to have their own thread. This might sound confusing, so I'll describe what I'm looking to accomplish in a case based scenario, with steps: User visits application Thread starts Until the thread finishes, that user's server instance hangs Once the thread completes, a response is delivered to the user Other visitors to the site should not be affected by any other users using the application How can I accomplish something like this? If possible, I'd like to find a lightweight solution.

    Read the article

  • Django grappelli

    - by dzen
    Does anyone here use django-grappelli here ? I would like to read some experience of developers or users, if there are common mistake to avoid or why you use or do not use grappelli. Thanks for sharing

    Read the article

  • Maintaining content type pk integrity in a Django deployment

    - by hekevintran
    When you run syncdb in Django, the primary keys of the content types will be recomputed. If I create new models, the next time I run syncdb, the primary keys of the content types will be different. If I have an application running in production, how can I update the database with the new models and keep the integrity of content type pks?

    Read the article

  • Correct way to model recursive relationship in Django

    - by Yuval A
    My application has two node types: a parent node which can hold recursive child nodes. Think of it like the post-comment system in SO, but comments can be recursive: parent_1 child_11 child_12 child_121 child_3 parent_2 child_21 child_211 child_2111 Important to note that the parent nodes have different attributes and behavior than the child nodes. What is the correct (and presumably most efficient) way of modeling this relationship in Django?

    Read the article

  • Django Commenting framework and voting

    - by Hellnar
    Hello, I want to implement a commenting system for some pages by using the build-in commenting framework of Django. The only addition to the default commenting framework is that other registered users can up/down vote comments (one time allowed indeed), just like Digg or Reddit style. I have found RedditStyleVoting however it seems out of date and not really covering what I am looking for.

    Read the article

  • Django - Testing with parts of original database

    - by Murkin
    Hello everyone, My database has two types of entries: The very dynamic (users, comments, etc) and the more static (email templates, flat-pages). During testing I want a clean DB but with the real 'semi-static' data. Is there a way to make Django's testing system to load parts of the original DB ? Thanks

    Read the article

  • Django Forms Help needed

    - by user320993
    Hi All, Im new to django and trying to make a user registration form with few validations. Apart from this I also want a username suggestion code which will tell the user if the username he is trying to register is available or already in use. Then it should give few suggestions that might be available to choose from. Can anyone who might have worked on the same or somewhat same project help me with this. Thanks

    Read the article

  • Error in Django set up

    - by ahkeno
    How can I set up Django in Window Xp and Ubuntu OS I finished the step for connection with Database and some problem with connect to admin.. I do it from reading ebook and do it..So there is any easy steps for me.. Please share all idea.

    Read the article

  • Form resubmission issue-Django html

    - by Hulk
    There is a form ,which is submitted and then the page is redirected to another page.But if the user hits the refresh button again on the new page .the following message is displayed To display this page, Firefox must send information that will repeat any action (such as a search or order confirmation) that was performed earlier. And on press "OK" A duplicate entry is created how do i prevent this or how do i handle this I am using a django,application Thanks..

    Read the article

  • django sync db question

    - by Hulk
    In django models say this model exist in details/models.py class OccDetails(models.Model): title = models.CharField(max_length = 255) occ = models.ForeignKey(Occ) So when sync db is made the following fields get created and later to this of two more fields are added and sync db is made the new fields doesnt get created.How is this to be solved,Also what is auto_now=true in the below these are the new fields created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now_add=True, auto_now=True)

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >