Search Results

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

Page 49/633 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • How to set up django-admin.py on windos vista?

    - by shin
    I manage to install Django after some struggles by using setup.py install on Windows Vista Now I tried to use django-admin.py but it is not working. According to this document, http://docs.djangoproject.com/en/dev/ref/django-admin/ The django-admin.py script should be on your system path if you installed Django via its setup.py utility. If it’s not on your path, ... For Windows users, who do not have symlinking functionality available, you can copy django-admin.py to a location on your existing path or edit the PATH settings (under Settings - Control Panel - System - Advanced - Environment...) to point to its installed location. I checked ComputerpropertiesEnvironment Variables, but path to django-admin.py is not in anywhere. So I added C:\Python25\Lib\site-packages\django\bin which is the folder of django-admin.py in User variables for shin Variable PATH, Value C:\Program Files\Google\google_appengine\;C:\Python25\Lib\site-packages\django\bin\ Am I supposed to add to System variables?? But it still does not work. Could anyone tell me how to add the Path in Environment Variables please? Thanks in advance.

    Read the article

  • Django Comments and Users integration

    - by Patrick
    Hi folks, I am new to django. I am trying to use django.contrib.comments, I saw the table in the database like this, but how can I integrate it with user_id, user_photos, user_name, user_email....and those things with the django commenting system? I also tried to use thread-comments, but I can't configure it properly, is the django threadedcomments table similar to following ? Please let me know if any of you have done this before....all I need is a user login, and post comments, and then show list of comments with users' profile photos and username, as well as there comments. I think shouldn't be that hard. Thank you very much again. +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | content_type_id | int(11) | NO | MUL | NULL | | | object_pk | longtext | NO | | NULL | | | site_id | int(11) | NO | MUL | NULL | | | user_id | int(11) | YES | MUL | NULL | | | user_name | varchar(50) | NO | | NULL | | | user_email | varchar(75) | NO | | NULL | | | user_url | varchar(200) | NO | | NULL | | | comment | longtext | NO | | NULL | | | submit_date | datetime | NO | | NULL | | | ip_address | char(15) | YES | | NULL | | | is_public | tinyint(1) | NO | | NULL | | | is_removed | tinyint(1) | NO | | NULL | | +-----------------+--------------+------+-----+---------+----------------+

    Read the article

  • c# application and configuration settings

    - by Maks
    Hi, I never used Settings class before but I found some articles on CodeProject which I'm currently reading (for example http://www.codeproject.com/KB/cs/PropertiesSettings.aspx) but so far I didn't see how to save string array for getting it after application is started next time. For example my application has several FileSystemWatcher instances, with each instance several other directories are connected (for example one FSW instance is monitoring one directory for a change and when it happens it copies some file to several other directories), so I would have one string array with watched paths representing FSW instances, and string array for each of those paths, representing directories that are affected. My question is, what should I use (Settings class or something else), and how should I use that for storing application configuration that is variable number of string arrays? Emphasize is on something I could use very soon as I don't have too much time to make custom class (but would have to if I cannot find solution) or dig into some obscure hacks. Any tutorial link, code snippet would be very helpful. Thanks.

    Read the article

  • Ditching Django's models for Ajax/Web Services

    - by Igor Ganapolsky
    Recently I came across a problem at work that made me rethink Django's models. The app I am developing resides on a Linux server. Its a simple model/view/controller app that involves user interaction and updating data in the database. The problem is that this data resides in a MS SQL database on a Windows machine. So in order to use Django's models, I would have to leverage an ODBC driver on linux, and the use a python add-on like pyodbc. Well, let me tell you, setting up a reliable and functional ODBC connection on linux is no easy feat! So much so, that I spent several hours maneuvering this on my CentOS with no luck, and was left with frustration and lots of dumb system errors. In the meantime I have a deadline to meet, and suddenly the very agile and rapid Django application is a roadblock rather than a pleasure to work with. Someone on my team suggested writing this app in .NET. But there are a few problems with that: it won't be deployable on a linux machine, and I won't be able to work on it since I don't know ASP.net. Then a much better suggestion was made: keep the app in django, but instead of using models, do straight up ajax/web services calls in the template. And then it dawned on me - what a great idea. Django's models seem like a nuissance and hindrance in this case, and I can just have someone else write .Net services on their side, that I can call from my template. As a result my app will be leaner and more compact. So, I was wondering if you guys ever came across a similar dillema and what you decided to do about it.

    Read the article

  • django development IDE

    - by Adam Carr
    I have done a little django development but it has all been in a text editor. I was curious what more advanced development tools others are using in their django development. I am used to using Visual Studio for development and really like the intellisense, code completion, and file organization it provides and would like to find something (or a combination of tools) that would provide some of this in the django/python environment.

    Read the article

  • Django: Paginator + raw SQL query

    - by Silver Light
    Hello! I'm using Django Paginator everywhere on my website and even wrote a special template tag, to make it more convenient. But now I got to a state, where I need to make a complex custom raw SQL query, that without a LIMIT will return about 100K records. How can I use Django Pagintor with custom query? Simplified example of my problem: My model: class PersonManager(models.Manager): def complicated_list(self): from django.db import connection #Real query is much more complex cursor.execute("""SELECT * FROM `myapp_person`"""); result_list = [] for row in cursor.fetchall(): result_list.append(row[0]); return result_list class Person(models.Model): name = models.CharField(max_length=255); surname = models.CharField(max_length=255); age = models.IntegerField(); objects = PersonManager(); The way I use pagintation with Django ORM: all_objects = Person.objects.all(); paginator = Paginator(all_objects, 10); try: page = int(request.GET.get('page', '1')) except ValueError: page = 1 try: persons = paginator.page(page) except (EmptyPage, InvalidPage): persons = paginator.page(paginator.num_pages) This way, Django get very smart, and adds LIMIT to a query when executing it. But when I use custom manager: all_objects = Person.objects.complicated_list(); all data is selected, and only then python list is sliced, which is VERY slow. How can I make my custom manager behave similar like built in one?

    Read the article

  • How to set up django-admin.py on windows vista?

    - by shin
    I manage to install Django after some struggles by using setup.py install on Windows Vista Now I tried to use django-admin.py but it is not working. According to this document, http://docs.djangoproject.com/en/dev/ref/django-admin/ The django-admin.py script should be on your system path if you installed Django via its setup.py utility. If it’s not on your path, ... For Windows users, who do not have symlinking functionality available, you can copy django-admin.py to a location on your existing path or edit the PATH settings (under Settings - Control Panel - System - Advanced - Environment...) to point to its installed location. I checked ComputerpropertiesEnvironment Variables, but path to django-admin.py is not in anywhere. So I added C:\Python25\Lib\site-packages\django\bin which is the folder of django-admin.py in User variables for shin Variable PATH, Value C:\Program Files\Google\google_appengine\;C:\Python25\Lib\site-packages\django\bin\ Am I supposed to add to System variables?? But it still does not work. Could anyone tell me how to add the Path in Environment Variables please? Thanks in advance.

    Read the article

  • wsgi django not working

    - by MaKo
    im installing django, the test for wsgi is ok, but when i point my default file to the django test, it doesnt work, this is the test that works fine: default: /etc/apache2/sites-available/default <VirtualHost *:80> ServerName www.example.com ServerAlias example.com ServerAdmin [email protected] DocumentRoot /var/www <Directory /var/www/documents> Order allow,deny Allow from all </Directory> WSGIScriptAlias / /home/ubuntu/djangoProj/micopiloto/application.wsgi <Directory /home/ubuntu/djangoProj/mysitio/wsgi_handler.py> Order allow,deny Allow from all </Directory> </VirtualHost> application.wsgi:: ~/djangoProj/micopiloto import os import sys sys.path.append('/srv/www/cucus/application') os.environ['PYTHON_EGG_CACHE'] = '/srv/www/cucus/.python-egg' def application(environ, start_response): status = '200 OK' output = 'Hello World!MK SS9 tkt kkk' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output] but if I change the default to point to application_sa.wsgi the django test, it doesnt work :( application_sa.wsgi import os, sys sys.path.append('/home/ubuntu/djangoProj/micopiloto') os.environ['DJANGO_SETTINGS_MODULE'] = 'micopiloto.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() I restart the apache server every time i change the wsgi to test, so what im i missing? thanks a lot!

    Read the article

  • Azure SDK + Django + Visual Studio 2012 - Publish to Azure succeeds, but I get 500 error

    - by hume
    I followed the instructions here: https://www.windowsazure.com/en-us/develop/python/tutorials/django-with-visual-studio/ However, whenever I try to open the url to my web app in the cloud I get a 500 error. The tutorial doesn't mention setting up the TEMPLATE_DIRS setting in the django application or doing any work on the cloud service machine to install python/django. Could these be the problem?

    Read the article

  • Django 1.2 crash course needed

    - by delusionalweekendwarrior
    I know Python but I've never used Django. What do I need to know about Django 1.2 to port my typical PHP CRUD web application in one weekend? (Yes I've read Joel Spolsky's Netscape article :-)) I'm reading this tutorial right now and it's excellent. I'm already playing around with inspectdb to generate my models from the existing schema. I'm planning to use the following features of Django this weekend: Fragment caching Static asset versioning (for far future expires) Schema migrations (or whatever they're called in Django) Auto-admin (and customize it later) The test framework ...other stuff I probably don't know about yet I'm familiar with all these concepts in other languages/frameworks, except for the ORM which I've never used. I know SQL pretty well though. Any links, sage bits of advice, gotchas, stuff not mentioned in the (excellent) tutorial/docs, or stuff that is mentioned but warrants repeating == very welcome. Thanks!

    Read the article

  • Get the path to Django itself

    - by andybak
    I've got some code that runs on every (nearly) every admin request but doesn't have access to the 'request' object. I need to find the path to Django installation. I could do: import django django_path = django.__file__ but that seems rather wasteful in the middle of a request. Does putting the import at the start of the module waste memory? I'm fairly sure I'm missing an obvious trick here.

    Read the article

  • FastCGI has to be restarted for new content to be displayed on my Django site

    - by vorpyg
    I'm currently testing serving my Django site with Nginx, FastCGI and Flup. The server is configured roughly as described in the Django Advent article. I had to do some minor modifications in order to make it work in Ubuntu 9.10. The problem is that when I add new content it doesn't show up on the page before I restart the FastCGI process. I haven't enabled any caching functionality in Django, and when I query the DB from the Django shell it works as expected. Anybody got ideas to what's causing this?

    Read the article

  • Django-admin.py not being recognized suddenly

    - by Jen Camara
    I tried starting a new Django project yesterday but when I did "django-admin.py startproject projectname" I got an error stating: "django-admin.py is not recognized as an internal or external command." The strange thing is, when I first installed Django, I made a few projects and everything worked fine. But now after going back a few months later it has suddenly stopped working. I've tried looking around for an answer and all I could find is that this typically has to do with the system path settings, however, I know that I have the proper paths set up so I don't understand what's happening. Does anybody have any idea what's going on?

    Read the article

  • Problems with i18n using django translation on App-Engine with Korean and Hindi

    - by Greg
    I've got a setup based on the post here, and it works perfectly. Adding more languages to the mix, it recognises them fine, except for Korean (ko) and Hindi (hi). Chinese/Japanese/Hebrew are all fine, so nothing to do with encodings/charsets I don't think. Taking a look into the django code inside the app-engine SDK, I notice that all the languages that I'm using except for ko and hi are ones that ship with django - in the default settings.py and inside the locale folder they are missing. If I copy one of the locale folders inside the /usr/local/google_appengine/lib/django[...]/conf/locale and rename it to be 'ko', then it starts working in my app, but I won't be able to replicate this modification when I deploy to app-engine, so need a bit of help understanding what I might be doing wrong. my settings.py is definitely being taken into account, as if I remove languages from there then they stop working (as they should). If I copied the django modules into my app, under 'lib' there say, could I use those instead of the ones app-engine tries to use, maybe? I'm brand new to python/django/app-engine, and developing on a Mac with Leopard, if that makes any difference. I have the latest app-engine SDK as of tuesday.

    Read the article

  • Django tutorial says I haven't set DATABASE_ENGINE setting yet... but I have

    - by Joe
    I'm working through the Django tutorial and receiving the following error when I run the initial python manage.py syncdb: 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 222, in execute output = self.handle(*args, **options) File "/Library/Python/2.6/site-packages/django/core/management/base.py", line 351, in handle return self.handle_noargs(**options) File "/Library/Python/2.6/site-packages/django/core/management/commands/syncdb.py", line 49, in handle_noargs cursor = connection.cursor() File "/Library/Python/2.6/site-packages/django/db/backends/dummy/base.py", line 15, in complain raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE setting yet." django.core.exceptions.ImproperlyConfigured: You haven't set the DATABASE_ENGINE setting yet. My settings.py looks like: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'dj_tut', # Or path to database file if using sqlite3. 'USER': '', # Not used with sqlite3. 'PASSWORD': '', # Not used with sqlite3. 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } I'm guessing this is something simple, but why isn't it seeing the ENGINE setting?

    Read the article

  • How do I use multiple settings file in Django with multiple sites on one server?

    - by William Bing Hua
    I have an ec2 instance running Ubuntu 14.04 and I want to host two sites from it. On my first site I have two settings file, production_settings.py and settings.py (for local development). I import the local settings into the production settings and override any settings with the production settings file. Since my production settings file is not the default settings.py name, I have to create an environment variable DJANGO_SETTINGS_MODULE='site1.production_settings' However because of this whenever I try to start my second site it says No module named site1.production_settings I am assuming that this is due to me setting the environment variable. Another problem is that I won't be able to use different settings file for different sites. How do I start use two different settings file for two different websites?

    Read the article

  • Session handling in python / django

    - by Gaurav
    I am creating an application that lets users login using Google, Facebook and the website's native login. The site is being built in Python / Django. What would be the best way to handle login, session management and user authentication? I do not want to use the in-built Django user management. I am using Django very sparingly(URLs, templates)

    Read the article

  • Getting a random element in Django

    - by Sarah
    I just finished the Django tutorial and started work on my own project, however, I seem to have missed something completely. I wanted to get a random slogan from this model: from django.db import models class Slogan(models.Model): slogan = models.CharField(max_length=200) And return it in this view: from django.http import HttpResponse from swarm.sloganrotator.models import Slogan def index(request): return HttpResponse(Slogan.objects.order_by('?')[:1]) However, the view just returns 'Slogan object'. Then I thought, maybe I can access the slogan string itself by simply appending .slogan to the slice, but that gives me an error indicating that the object I have is actually a QuerySet and has no attribute slogan. I've obviously misunderstood something about Django here, but it just doesn't fall into place for me. Any help?

    Read the article

  • android settings (provider)?

    - by lorenzoff
    Hello to all, i'd like to substitute the default preferences setting activity (vertical, icon-title pair list) with a grid view that better fit a large landscape display. About, let's say, the audio preferences, i add an icon to a GridView and, on item click event, i use this code startActivityForResult(new Intent(android.provider.Settings.ACTION_SOUND_SETTINGS), 0); Is it possible to get the default settings icon? If i could use an ipotetic getDrawable(android.R.drawable.default_icon_for_audio_preferences_settings), I would to maintain the default icon also in my preferences grid. A preferences provider exists? Looking at my development device preferences i can see Wireless, call, audio, display and so on. I have to add the same preferences to my grid because i know a priori about their existence or there is a provider that can supply me this array? Thanks in advance L.

    Read the article

  • Adding text labels to sliders in iPhone Settings application

    - by Kevin L.
    When configuring a Settings.bundle as part of an iPhone application bundle, it's trivial to add minimum and maximum value images to sliders (PSSliderSpecifier), but not simple maximum and minimum text labels. http://developer.apple.com/iPhone/library/documentation/PreferenceSettings/Conceptual/SettingsApplicationSchemaReference/Articles/PSSliderSpecifier.html iPhone gurus: Is anyone aware of a simple means to apply text labels to these sliders for use within the Settings application (therefore, no slider subclassing shenanigans; it all has to be done via a plist)? I suppose I could just use an image of the label but...ew. Bonus points if there's a way to show the current value of a slider in some sort of number format.

    Read the article

  • Django : looking for a good LDAP manipulation library

    - by sebpiq
    Hi ! I am looking for a good ldap library on Django, that would allow me to manage my ldap server : adding, modifying, deleting entries for groups, users, and all kind of objects The library django-ldapdb looked promising, it offers a Model base class that can be used to declare ldap objects in a Django fashion (which is what we ideally want), however we've had some bugs with it, and furthermore it seems like it is not maintained any more. Does somebody know a good library that could do the trick ? Otherwise I guess I'll just try to improve and debug django-ldapdb ... Thanks !

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >