Search Results

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

Page 110/633 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • How to setup Continuous Integration and Continuous Deployment for Django projects?

    - by ycseattle
    Hello, I am researching about how to set up CI and continuous deployment for a small team project for a Django based web application. Here are needs: Developer check in the code into a hosted SVN server (unfuddle.com) A CI server detects new checkin, check out the source, build, run functional tests. If tests all passed, deploy the code to the webserver on Amazon EC2. For now, the CI server is also responsible to run the functional tests. I figured out that I can use Husdon as the CI server, use Selenium to run functional tests, and use Fabric to deploy the build to remote web server in Amazon cloud. I am new to Django development and not very familiar with opensource tools. My questions are: I can find some information to integrate hudson with selenium, but I couldn't find much information on how to integrate Fabric to Hudson as well. Is this setup viable? Do you see problems? How do I integrate and deploy database changes? Most likely in the early stage we will change database schema very often with code changes. I used to use Visual Studio and the database project made it very simple to deploy. I wonder if there is "established, well-supported" way to do that. Thanks!!

    Read the article

  • How to generate lots of redundant ajax elements like checkboxes and pulldowns in Django?

    - by iJames
    Hello folks. I've been getting lots of answers from stackoverflow now that I'm in Django just be searching. Now I hope my question will also create some value for everybody. In choosing Django, I was hoping there was some similar mechanism to the way you can do partials in ROR. This was going to help me in two ways. One was in generating repeating indexed forms or form elements, and also in rendering only a piece of the page on the round trip. I've done a little bit of that by using taconite with a simple URL click but now I'm trying to get more advanced. This will focus on the form issue which boils down to how to iterate over a secondary object. If I have a list of photo instances, each of which has a couple of parameters, let's say a size and a quantity. I want to generate form elements for each photo instance separately. But then I have two lists I want to iterate on at the same time. Context: photos : Photo.objects.all() and forms = {} for photo in photos: forms[photo.id] = PhotoForm() In other words we've got a list of photo objects and a dict of forms based on the photo.id. Here's an abstraction of the template: {% for photo in photos %} {% include "photoview.html" %} {% comment %} So here I want to use the photo.id as an index to get the correct form. So that each photo has its own form. I would want to have a different action and each form field would be unique. Is that possible? How can I iterate on that? Thanks! {% endcomment %} Quantity: {{ oi.quantity }} {{ form.quantity }} Dimensions: {{ oi.size }} {{ form.size }} {% endfor %} What can I do about this simple case. And how can I make it where every control is automatically updating the server instead of using a form at all? Thanks! James

    Read the article

  • How to get the related_name of a many-to-many-field?

    - by amann
    I am trying to get the related_name of a many-to-many-field. The m2m-field is located betweeen the models "Group" and "Lection" and is declared in the group-model as following: lections = models.ManyToManyField(Lection, blank=True) The field looks like this: <django.db.models.fields.related.ManyToManyField object at 0x012AD690> The print of field.__dict__ is: {'_choices': [], '_m2m_column_cache': 'group_id', '_m2m_name_cache': 'group', '_m2m_reverse_column_cache': 'lection_id', '_m2m_reverse_name_cache': 'lection', '_unique': False, 'attname': 'lections', 'auto_created': False, 'blank': True, 'column': 'lections', 'creation_counter': 71, 'db_column': None, 'db_index': False, 'db_table': None, 'db_tablespace': '', 'default': <class django.db.models.fields.NOT_PROVIDED at 0x00FC8780>, 'editable': True, 'error_messages': {'blank': <django.utils.functional.__proxy__ object at 0x00FC 7B50>, 'invalid_choice': <django.utils.functional.__proxy__ object at 0x00FC7A50>, 'null': <django.utils.functional.__proxy__ object at 0x00FC7 A70>}, 'help_text': <django.utils.functional.__proxy__ object at 0x012AD6F0>, 'm2m_column_name': <function _curried at 0x012A88F0>, 'm2m_db_table': <function _curried at 0x012A8AF0>, 'm2m_field_name': <function _curried at 0x012A8970>, 'm2m_reverse_field_name': <function _curried at 0x012A89B0>, 'm2m_reverse_name': <function _curried at 0x012A8930>, 'max_length': None, 'name': 'lections', 'null': False, 'primary_key': False, 'rel': <django.db.models.fields.related.ManyToManyRel object at 0x012AD6B0>, 'related': <RelatedObject: mymodel:group related to lections>, 'related_query_name': <function _curried at 0x012A8670>, 'serialize': True, 'unique_for_date': None, 'unique_for_month': None, 'unique_for_year': None, 'validators': [], 'verbose_name': 'lections'} Now the field should be accessed via a lection-instance. So this is done by lection.group_set But i need to access it dynamically, so there is the need to get the related_name attribute from somewhere. Here in the documentation, there is a note that it is possible to access ManyToManyField.related_name, but this doesn't work for my somehow.. Help would be a lot appreciated. Thanks in advance.

    Read the article

  • How do I subtract two dates in Django/Python?

    - by Ryan
    Hi! I'm working on a little fitness tracker in order to teach myself Django. I want to graph my weight over time, so I've decided to use the Python Google Charts Wrapper. Google charts require that you convert your date into a x coordinate. To do this I want to take the number of days in my dataset by subtracting the first weigh-in from the last weigh-in and then using that to figure out the x coords (for example, I could 100 by the result and increment the x coord by the resulting number for each y coord.) Anyway, I need to figure out how to subtract Django datetime objects from one another and so far, I am striking out on both google and here at the stack. I know PHP, but have never gotten a handle on OO programming, so please excuse my ignorance. Here is what my models look like: class Goal(models.Model): goal_weight = models.DecimalField("Goal Weight",max_digits=4, decimal_places=1) target_date = models.DateTimeField("Target Date to Reach Goal") set_date = models.DateTimeField("When did you set your goal?") comments = models.TextField(blank=True) def __unicode__(self): return unicode(self.goal_weight) class Weight(models.Model): """Weight at a given date and time """ goal = models.ForeignKey(Goal) weight = models.DecimalField("Current Weight",max_digits=4, decimal_places=1) weigh_date = models.DateTimeField("Date of Weigh-In") comments = models.TextField(blank=True) def __unicode__(self): return unicode(self.weight) def recorded_today(self): return self.date.date() == datetime.date.today() Any ideas on how to proceed in the view? Thanks so much!

    Read the article

  • What's a good way to format AJAX responses? Or, using Django templating with AJAX

    - by synic
    In some of the code I'm working on, the author max AJAX calls to a Django view that returns JSON. Once the JSON is retrieved, it'll be injected into the page with a function that looks like this (note, this is a simplification, but I'm sure you know what I'm getting at here): function build_event_listing(events) { var html = ''; for(int i = 0; i < events.length; i++) { event = events[i]; html += "<h2>" + event.title + "</h2>\n"; html += "<p>" + event.description + "</p>"; html += "Click <a href='/event/view/" + event.id + "'>here<a> for more info."; } events_div.html(html); } I really don't like this approach. To change the look of each event listing, the designer would have to modify that ugly JS. I'd much rather make use of Django's templating system, but I'm wondering how I can do this? I had the idea of writing the view like this: def view_listings(req): events = models.Event.objects.all() html = [] for event in events: html.append( render_to_string('event/single_event.html', { 'event': event, }, context_instance=RequestContext(req)) return HttpResponse(''.join(html), mimetype='text/html') ... but it just seems like there should be a better way. Any ideas?

    Read the article

  • Bypassing Router's DNS Settings

    - by Ramon Marco Navarro
    Is there a way to bypass my ISP provided CPE/router's DNS settings? I'd like to use OpenDNS but I am unable to access the administrator acount of the CPE. I tried logging in using the default passwords (admin/admin, admin/1234, etc) to no avail. I found out later that the admin password is generated using a generator where you input the CPE's MAC address. I tried emailing the manufacturer of the CPE (Huawei, the CPE is Huawei BM625) and my ISP but they aren't replying. I also saw similar queries (lots of them!) at Huawei's forums, without a single reply. So as a last resort, I'd like to know a way to bypass the CPE's DNS settings. My subscription is for a WiMAX service. I'm using Windows 7 and have already set the DNS settings for the Local Area Connection. But I still am not seeing the "You are already using OpenDNS" text at OpenDNS's site. And when explicitly using the OpenDNS servers I still seem to get 208.69.38.150 rather than the expected 208.69.38.160: nslookup www.opendns.com. 208.67.222.222 Server: resolver1.opendns.com Address: 208.67.222.222 Non-authoritative answer: Name: www.opendns.com Address: 208.69.38.150

    Read the article

  • Automate Windows 7's file sharing and firewall settings

    - by nhinkle
    I am working with my school to customize Windows 7 on some new laptops we are receiving. The laptops come with Windows 7 Professional already installed, and we do not need or want to reimage them. We would however like to customize the installation once it is in place, through a series of scripts. We will also be deploying these scripts to computers which have already been set up. Most of the settings we wish to change can be done easily from the command line or with a registry file. However, there is one thing we keep getting hung up on: networking options. Is there any unattended way to set the Windows 7 networking configuration? We would like to set the following things automatically, which are found under Control Panel > Network and Sharing Center > Advanced sharing settings > Home or Work network: Turn on network discovery Turn on printer and file sharing Turn off public folder sharing Turn on password protected sharing Use user accounts and passwords to connect to other computers We also need to configure the firewall to allow the following exceptions: File and printer sharing Remote assistance Remote desktop Remote scheduled tasks management Remote service management Windows remote management I've looked around, and can't find any way to change these things - I looked into netsh, registry settings, and even used RegMon to watch while I changed the values manually, all to no avail. Google hasn't offered up anything helpful so far. If anyone could provide some insight, I would very much appreciate it. I did find out that much of this is configurable with group policy, but because these computers are in a workgroup, not a domain, I don't know of any way to take advantage of that in an unattended manner.

    Read the article

  • How to fix locale settings in Debian squeeze

    - by blogjunkie
    I occasionally get locale errors and I've tried to run dpkg-reconfigure locales to fix the problem. Here's the output: :~$ sudo dpkg-reconfigure locales perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory /usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory /usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory Generating locales (this might take a while)... en_US.UTF-8... done Generation complete. perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "C" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "C" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). I looked for /usr/bin/locale but it doesn't exist on my system. Do I need to create it? What do I put in there? Also I found a related question that says the cause of his problem was in the sshd_config file. The file had the following entry: AcceptEnv LANG LC_* I'm mainly concerned that it may cause problems for my VPS, otherwise if it's nothing major I'll be happy to ignore the problem. What should I do? thanks!

    Read the article

  • Which DNS settings are used when setting up your server

    - by Saif Bechan
    I have a server and want to run my own name server service. Now I have set it up already and it works not, but I do not know where the exact settings are stored. On my server I use Plesk. When I edit DNS settings there I think it is stored in named.conf. Named is installed on the server, and BIND. Now I also have a panel from my registrar. This is separate from my server. Both places I can add the normal MX,A,CNAME, etc records. Now where is the best way to place this settings. Currently I have the same records on both places, on the server and at the registrar panel. I am correct to just add all the records at the registrar panel, and remove everything from within PLESK, and just don't run DNS on my server, because it is already done in the registrar panel. Or should I add the records in both places.

    Read the article

  • Which DNS settings are used when setting up server

    - by Saif Bechan
    I have a server and want to run my own name server service. Now I have set it up already and it works not, but I do not know where the exact settings are stored. On my server I use Plesk. When I edit DNS settings there I think it is stored in named.conf. Named is installed on the server, and BIND. Now I also have a panel from my registrar. This is separate from my server. Both places I can add the normal MX,A,CNAME, etc records. Now where is the best way to place this settings. Currently I have the same records on both places, on the server and at the registrar panel. I am correct to just add all the records at the registrar panel, and remove everything from within PLESK, and just don't run DNS on my server, because it is already done in the registrar panel. Or should I add the records in both places.

    Read the article

  • Permission issue for apache

    - by Aamir Adnan
    Environment Details: Amazon Ec2 Ubuntu 12.04 Django + mod_wsgi + python 2.6 web server: apache2 I have mounted a 10GB ebs volume to an instance to /mnt/ebs1/. After mounting the volume and formatting, I have placed all my project files in /mnt/ebs1/project. the wsgi file is in /mnt/ebs1/project/apache/django.wsgi. The content of wsgi file is: import os, sys sys.path.insert(0, '/mnt/ebs1/project') sys.path.insert(1, '/mnt/ebs1') os.environ['DJANGO_SETTINGS_MODULE'] = 'project.configs.common.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() My httpd.conf file looks as: LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so WSGIPythonHome /usr/bin/python2.6 WSGIScriptAlias / /mnt/ebs1/project/apache/django.wsgi <Directory /mnt/ebs1/project> Order allow,deny Allow from all </Directory> <Directory /mnt/ebs1/project/apache> Order allow,deny Allow from all </Directory> Alias /static/ /mnt/ebs1/project/static/ <Directory /mnt/ebs1/project/static> Order deny,allow Allow from all </Directory> The above configurations gives me Forbidden: You don't have permission to access / on this server. I tried to find the user which is running apache using ps aux which is www-data and has group www-data. I have tried to change the ownership of /mnt/ebs1 and its subdirectories using chown -R www-data:www-data /mnt/ebs1 but that still does not solve the problem. Can any one tell me what I am doing wrong or have missed?

    Read the article

  • Protect all XML-RPC calls with HTTP basic auth but one

    - by bodom_lx
    I set up a Django project for smartphone serving XML-RPC methods over HTTPS and using basic auth. All XML-RPC methods require username and password. I would like to implement a XML-RPC method to provide registration to the system. Obviously, this method should not require username and password. The following is the Apache conf section responsible for basic auth: <Location /RPC2> AuthType Basic AuthName "Login Required" Require valid-user AuthBasicProvider wsgi WSGIAuthUserScript /path/to/auth.wsgi </Location> This is my auth.wsgi: import os import sys sys.stdout = sys.stderr sys.path.append('/path/to/project') os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' from django.contrib.auth.models import User from django import db def check_password(environ, user, password): """ Authenticates apache/mod_wsgi against Django's auth database. """ db.reset_queries() kwargs = {'username': user, 'is_active': True} try: # checks that the username is valid try: user = User.objects.get(**kwargs) except User.DoesNotExist: return None # verifies that the password is valid for the user if user.check_password(password): return True else: return False finally: db.connection.close() There are two dirty ways to achieve my aim with current situation: Have a dummy username/password to be used when trying to register to the system Have a separate Django/XML-RPC application on another URL (ie: /register) that is not protected by basic auth Both of them are very ugly, as I would also like to define a standard protocol to be used for services like mine (it's an open Dynamic Ridesharing Architecture) Is there a way to unprotect a single XML-RPC call (ie. a defined POST request) even if all XML-RPC calls over /RPC2 are protected?

    Read the article

  • Protect all XML-RPC calls with HTTP basic auth but one

    - by bodom_lx
    I set up a Django project for smartphone serving XML-RPC methods over HTTPS and using basic auth. All XML-RPC methods require username and password. I would like to implement a XML-RPC method to provide registration to the system. Obviously, this method should not require username and password. The following is the Apache conf section responsible for basic auth: <Location /RPC2> AuthType Basic AuthName "Login Required" Require valid-user AuthBasicProvider wsgi WSGIAuthUserScript /path/to/auth.wsgi </Location> This is my auth.wsgi: import os import sys sys.stdout = sys.stderr sys.path.append('/path/to/project') os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' from django.contrib.auth.models import User from django import db def check_password(environ, user, password): """ Authenticates apache/mod_wsgi against Django's auth database. """ db.reset_queries() kwargs = {'username': user, 'is_active': True} try: # checks that the username is valid try: user = User.objects.get(**kwargs) except User.DoesNotExist: return None # verifies that the password is valid for the user if user.check_password(password): return True else: return False finally: db.connection.close() There are two dirty ways to achieve my aim with current situation: Have a dummy username/password to be used when trying to register to the system Have a separate Django/XML-RPC application on another URL (ie: /register) that is not protected by basic auth Both of them are very ugly, as I would also like to define a standard protocol to be used for services like mine (it's an open Dynamic Ridesharing Architecture) Is there a way to unprotect a single XML-RPC call (ie. a defined POST request) even if all XML-RPC calls over /RPC2 are protected?

    Read the article

  • How can I set the Regional Options in a Visual Basic 6.0 Application?

    - by jalcom
    I have a VB6's Application that is in production environment right now, this application is reading the pc's Regional Settings; but now, I need to set another Regional Settings for the application without change the pc's settings. How can I set the new Regional Settings globally with the lowest impact? Is there any configuration method (or something like that) for do it?

    Read the article

  • How to create custom CSS "on the fly" based on account settings in a Django site?

    - by sdolan
    So I'm writing a Django based website that allows users select a color scheme through an administration interface. I already have middleware/context processors that links the current request (based on domain) to the account. My question is how to dynamically serve the CSS with the account's custom color scheme. I see two options: Add a CSS block to the base template that overrides the styles w/variables passed in through a context processors. Use a custom URL (e.g. "/static/dynamic/css//styles.css") that gets routed to a view that grabs all the necessary values and creates the css file. I'm content with either option, but was wondering if anyone else out there has dealt with similar problems and could give some insight as to "Best Practices".

    Read the article

  • How to setup custom CSS based on account settings in a Django site?

    - by sdolan
    So I'm writing a Django based website that allows users select a color scheme through an administration interface. I already have middleware/context processors that links the current request (based on domain) to the account. My question is how to dynamically serve the CSS with the account's custom color scheme. I see two options: Add a CSS block to the base template that overrides the styles w/variables passed in through a context processors. Use a custom URL (e.g. "/static/dynamic/css//styles.css") that gets routed to a view that grabs all the necessary values and creates the css file. I'm content with either option, but was wondering if anyone else out there has dealt with similar problems and could give some insight as to "Best Practices".

    Read the article

  • How do I automatically connect my client to an ODBC data source on another machine with dynamic IP?

    - by Kdansky
    At the customer's place, we've got a postgres DB on a server, and a few clients. We connect them through ODBC-drivers, and all machines run windows (usually XP). Now we had a few annoying issues: The client "forgets" some flags in the ODBC drivers, such as ByteA as LO. Every time anything changes, we have to reset that, and type in the password, and sometimes even the IP of the server. On x64 machines running Windows 7, configuring this is a pain as the system settings dialogue will only show 64-bit connections by default. And most importantly: If the server changes IP because the customer restarts or replaces a switch, all connections are lost. Annoyingly, this cannot be fixed with just correcting the IP, but rather, we have to check every single place (even hba_conf) because all the settings magically disappear. Our customers often are very small companies, where "server" means "that one PC in the other room", and not "Oracle mainframe in the dungeon", so we don't want to rely on them not restarting switches. Is there a better way than to rely on these really unstable settings? Are these settings somewhere in a file which I could edit manually, to make fixing it easier?

    Read the article

  • Unexplained Django error. Diagnosis anyone?

    - by colorfulgrayscale
    I have a django project I keep on github. It worked perfectly fine on my laptop. I downloaded it on my desktop and tried to "python manage.py runserver" or even "python manage.py shell" I get a Error: No module named messages No other messages, no stack trace, nothing..Anyone have any idea whats going on? Thanks.

    Read the article

  • Why is mod_wsgi not able to write data? IOError: failed to write data

    - by BryanWheelock
    What could be causing this error: $ sudo tail -n 100 /var/log/apache2/error.log' [Wed Dec 29 15:20:03 2010] [error] [client 220.181.108.181] mod_wsgi (pid=20343): Exception occurred processing WSGI script '/home/username/public_html/idm.wsgi'. [Wed Dec 29 15:20:03 2010] [error] [client 220.181.108.181] IOError: failed to write data Here is the WSGI script: $ cat public_html/idm.wsgi import os import sys sys.path.append('/home/username/public_html/IDM_app/') os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler() Why would Django not be able to write data? I'm running Django 1.2.4

    Read the article

  • running python script with cron

    - by paulo
    hey guys, im trying to run a python script after every 5 minutes using cron, inside the script is a django import import django when running the crontab i get mailed the following error ImportError: No module named django this is what the crontab file looks like: [email protected] */5 * * * * /usr/bin/python /Users/paulo/Desktop/ashtanga/ping/sender.py do anyone of you know whats causing this ? btw i do have django insalled version 1.2, python 2.6, and MacOX 10.6

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >