Tag Info

Hot answers tagged

3

There's a slightly more generic version of @Matt Jenkins hashbang (!#) tip you can use to make the script a little more portable. Make sure the first line in the file is: #!/usr/bin/env python ...everything else... That says "look for a program named python by searching my PATH and run the rest of this script with that program". You'll also need to set ...


3

The installation layout is similar to that of a tar file binary distribution; all MySQL binaries are located in the directory /usr/local/mysql/bin. The MySQL socket file is created as /tmp/mysql.sock by default. See Section 2.7, “Installation Layouts”. From: http://dev.mysql.com/doc/refman/5.0/en/macosx-installation.html It's probably not added ...


3

Can you try running ipython directly on the server machine (type ipython). Can you type the letter 'b'? Can you type 'b' on the machine straight in the terminal? This seems more an ipython/linux issue than django. I'm guessing that someone has bound a ipython shortcut to the letter lowercase 'b'. This would be typically be done in '~/.ipython/ipythonrc'. ...


3

fixed for github Libevent First I like to grab libevent via macports. Ignore this if you’ve already done it on your system. sudo ports install libevent Alternatively you could build it yourself or use Homebrew. By the way, both MacPorts and Homebrew do use the newer Libevent2.X.X branch. Install cython pip install cython Install greenlet (optional ...


3

Your Python installation must be configured with --enable-shared when installed. Do be aware that the mod_python project is officially no longer developed or supported. You should really look for alternatives. You certainly shouldn't be using it for new projects. Also be aware that Django has deprecated support for using mod_python and may have even removed ...


2

I think that installing original tools is much better in terms of unification then rewriting everything. I personally use GOW, it still misses a tiny number of commands but contains all most needed stuff. If you still want to hit batch programming there's a good list of all commands: http://ss64.com/nt/, I think you need forfiles.


2

To tell VIM to use this style evertytime it loads and HTML file put this into your VIMRC: au BufNewFile,BufRead *.html set filetype=htmldjango You can quickly edit your VIMRC file by executing :edit $MYVIMRC.


2

same problem here, just run brew link gettext --force and manage.py compilemessages and everything working fine. you can always brew unlink gettext if you have problems and revert back to previous state


2

On of our setups runs a Django/NginX/gunicorn setup, which to be honnest runs very well. We have more than 30k users per day. I used the following tutorial: http://senko.net/en/django-nginx-gunicorn/


2

Install pip from source. Then try pip install django-request


2

Here's the solution. Use NAT as network for the guest machine. Run Django for 0.0.0.0:8000 type http://10.0.2.2:8000 in IE. Write the protocol (http://) in the address explicitly, otherwise IE interprets 10.0.2.2:8000 as something else but host:port. (Maybe as protocol:host or user:password with no host.) The latter was the last item that I missed in ...


2

Check out https://help.ubuntu.com/community/InstallingSoftware for information on how we install software on Ubuntu. Its a completely different mindset to Windows, you should never really download and install software from random websites. Thousands upon thousands of different packages are already available, prebuilt and tested! You really want to avoid ...


2

Have a look at OSQA, which uses Django and is a nice SO clone. Look at this thread on meta for other alternatives.


1

Ensure that your FTP client is willing to show files of unknown (or hidden as the . specifies) extensions. After that you will need to create or edit the .htaccess file on your site to ensure that privileges exist for users to read the files in question. As always, I prefer to provide tutorials rather than a 10 second "how-to" that misses the point, so ...


1

Yes. And MySQLdb. python2.7 setup.py install (well, not Django, but why take a chance when it's so easy to do?)


1

The first line in the file should contain the program that runs the script prefixed by #! (known as hashbang) For example: #!/path/to/python ...python code follows... Then you can set the executable bit on the file and the shell will interpret it as a script using the program found in the first line as the interpreter. This is often used with shell ...


1

When you change the file django-admin.py permissions, you have to write this: sudo chmod +x django-admin.py Works for me


1

Firstly, /tmp should be considered temporary - anything in there might be deleted on reboot or before. So its an okay place to download installation tarballs. Normally when you do something called 'install' on a Linux box it means it gets put into the system permanently, into the recognised system directories such as /bin, /usr/local/, and so on. For ...


1

Here is an article about installation of python-imaging port (FreeBSD software package). libjpeg will probably be installed automatically as a dependency, but if it is not, you will just need to do similar actions to install graphics/jpeg port.


1

You could compile from source. See: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide Use the '--with-python' option to 'configure' script for mod_wsgi to make it use non default Python installation. Also see other documentation on mod_wsgi site as further steps may be required if that alternate Python installed in non standard location.


1

If you are pretty confident that this is the correct process (which seems likely) - and as the netstat is not telling you anything useful, then you can use kill -9 5719 The -9 switch sends a SIGKILL rather than the default SIGTERM signal, which will stop the process if it is stoppable. The SIGTERM signal is sent to the process, and effectively asks it ...


1

Nginx is smaller, simpler and more pleasant to configure, and I recommend pursuing it as your sole web server. According to the Nginx WebDAV page, full WebDAV support is now available by combining the 'http_dav_module' with complementary module available that the page links to on GitHub. Documentation is available elsewhere for running Django on Nginx and ...


1

I recommend keeping your web server error log and your application error log separate. This neatly separates two layers of your stack, as the web server logs will contain the http-level errors, while the app log will contain exceptions thrown by your code and other custom logging you generate. This post has more on Django error logging, including ...


1

I'm using freeSSHd (http://www.freesshd.com/) to run the SSH server on Windows. After that, it is a SSH connection like any other.


1

It seems like you are using Windows stack. You can solve this by running your editor program as Administrator. Please have a look at following related questions 1. Unable to edit and save a file on remote machine using notepad++ 2. Notepad++ “Check if file is open in another program” No other program open If using Linux, then you can open httpd.conf as ...


1

So in order to consistently have MySQL and mysql-python working I do the following: download and install xcode (https://developer.apple.com/xcode/) go into XCode prefs and enable Command Line Tools download and install Mysql Server Community Edition (http://dev.mysql.com/downloads/mysql/5.5.html#downloads) edit my bash profile nano ~/.bash_profile and ...


1

I've just installed MySQL (same version as you've listed) using Homebrew and encountered problems similar to yours. I will note that my copy of Homebrew is probably not healthy; brew doctor continues to give me warnings, especially about some alleged installation of MacPorts or fink, and I plan to re-image this old box from scratch at some point. That said ...


1

Running any web application as root is not advisable! As you have already figured out, it is a permissions problem. The reason you had to chmod a+x on /root is because no other user, including the user running apache, has rights to the /root directory (it should be private!). Either serve the application using the web server's user (www-data on debian ...


1

I fixed it by placing the following in httpd.conf Alias /phpmyadmin /full/path/to/phpmyadmin/ <Directory /full/path/to/phpmyadmin> Options -Indexes ...etc... </Directory>



Only top voted, non community-wiki answers of a minimum length are eligible