Search Results

Search found 4 results on 1 pages for 'dango'.

Page 1/1 | 1 

  • PyDev and Django: how to restart dev server?

    - by Rosarch
    I'm new to Django. I think I'm making a simple mistake. I launched the dev server with Pydev: RClick on project Django Custom command runserver The server came up, and everything was great. But now I'm trying to stop it, and can't figure out how. I stopped the process in the PyDev console, and closed Eclipse, but web pages are still being served from http://127.0.0.1:8000. I launched and quit the server from the command line normally: python manage.py runserver But the server is still up. What am I doing wrong here?

    Read the article

  • How do I pass a lot of parameters to views in Dango?

    - by Mark
    I'm very new to Django and I'm trying to build an application to present my data in tables and charts. Till now my learning process went very smooth, but now I'm a bit stuck. My pageview retrieves large amounts of data from a database and puts it in the context. The template then generates different html-tables. So far so good. Now I want to add different charts to the template. I manage to do this by defining <img src=".../> tags. The Matplotlib chart is generate in my chartview an returned via: response=HttpResponse(content_type='image/png') canvas.print_png(response) return response Now I have different questions: the data is retrieved twice from the database. Once in the pageview to render the tables, and again in the chartview for making the charts. What is the best way to pass the data, already in the context of the page to the chartview? I need a lot of charts, each with different datasets. I could make a chartview for each chart, but probably there is a better way. How do I pass the different dataset names to the chartview? Some charts have 20 datasets, so I don't think that passing these dataset parameters via the url (like: <imgm src="chart/dataset1/dataset2/.../dataset20/chart.png />) is the right way. Any advice?

    Read the article

  • Remapping keyboard to get extra cursor keys - but why stick to VIM standard hjkl

    - by Carlo V. Dango
    Inspired from VIM I recently remapped my keyboard layout to get extra keys for cursor movement. Being fluent in both QWERTY and DVORAK, it came quite natural to me to remap the DF and JK keys rather than the VIM standard hjkl keys. Here is my reasoning It enables me to quickly identify cursor keys since F and J are physically marked on my keyboard I'm using two hands for movement rather than one. I guess from DVORAK I learned to appreciate shifting between hands rather than using primarily one hand. It maps well with the Kinesis keyboard mapping http://www.kinesis-ergo.com/advantage.htm that I use occasionally. I feel I'm using my strongest fingers. I don't have to stretch my right index finger to read H as I would using the VIM layout. However, since I am still doing green field explorations on the cursor key remapping, I'd like others to share their experiences and/or criticize my suggested mapping. PS. If you want to toy around with my remapping using Autohotkey here is my script ; extra cursor keys. !d:: Send {Left} <^>!d:: Send {Left} !f:: Send {Right} <^>!f:: Send {Right} !j:: Send {Up} <^>!j:: Send {Up} !k:: Send {Down} <^>!k:: Send {Down} The question Is this mapping sane or is the VIM mapping superior?

    Read the article

  • Django error - no module named

    - by Shreyas
    Here is my relevant directory structure (Windows 7, Python 2.7, virtualenv) -userProf - - manage.py - -UserProfile - sampleapp_db - urls.py - views.py - wsgi.py - __init__.py - -libs - - __init__.py - -allauth - - app_settings.py - - models.py - - tests.py - - urls.py - - utils.py - - - -account - - - admin.py - - - context_processors.py - - - models.py - - - urls.py - - - __init__.py - -socialaccount - - - admin.py - - - context_processors.py - - - models.py - - - urls.py - - - views.py - - - __init__.py - - - - -templates - -account - - - base.html - - - email.html -settings - base_settings.py - dev.py - __init__.py - -static -css I get the following error when I try to run this dango app Error: No module named account I have read other posts on SO that refer to the syspath being the issue or that the appname matches the project name Django Shell No module named settings ...as a result of this, I added the following statements in the base_settings.py file import sys base = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) base_parent = os.path.dirname(base) sys.path.append(base) sys.path.append(base_parent) sys.path.append(os.path.join(base,'libs')) sys.path.append(os.path.join(base,'libs','allauth','account')) I verified that the sys.path is correct by putting a break in PyCharm and evaluating sys.path Should I be putting this in manage.py? Some other SO postings referred to not being able to import the module but I can launch the python console and import UserProfile.libs.allauth.account without any exceptions being thrown! My base_setings.py has the following relevant section INSTALLED_APPS = ( 'UserProfile.libs.allauth.account', )

    Read the article

1