GithubHelp home page GithubHelp logo

dojango's People

Contributors

andrewgrossman avatar benwilber avatar clohfink avatar mpasternak avatar philpep avatar rhunwicks avatar william-gr avatar zalmoxis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dojango's Issues

37 - dojango formset_factory doesn't support initial

What steps will reproduce the problem?
1.
from dojango import forms
from dojango.forms.formsets import formset_factory
class TitleForm(forms.Form):
   title = forms.CharField()
2.
set= formset_factory(TitleForm, can_order = True)
3.
set(initial = ({'title':'roar'},))

What is the expected output? What do you see instead?
The expected output is a formset, but instead you get
AttributeError: 'FormFormSet' object has no attribute '_initial_form_count'

What version of the product are you using? On what operating system?
dojango .4
ubuntu jaunty

Please provide any additional information below.
It works without can_order


Original link: http://code.google.com/p/dojango/issues/detail?id=37

20 - dojobuild is not using quotes for releaseDir

What steps will reproduce the problem?
1. put dojango-enabled site on a path with a space in the name
2. ... on win32

What is the expected output? What do you see instead?
Should build. Is not building:

C:\Users\FHU 
Kagami\workspace\ledcast_django\ledcast_django\dojango\media\dojo\1.3.1\uti
l\buildscripts>java -classpath 
../shrinksafe/js.jar;../shrinksafe/shrinksafe.jar 
org.mozilla.javascript.tools.shell.Main build.js version=1.3.1dojango-with-
dojo releaseName="1.3.1dojango-with-dojo" releaseDir=C:\Users\FHU 
Kagami\workspace\ledcast_django\ledcast_django\dojango\media\release\ 
profile=dojango action=release optimize=shrinksafe.keepLines 
cssOptimize=comments.keepLines mini=true
js: "jslib/buildUtil.js", line 1168: exception from uncaught JavaScript 
throw: Malformed name/value pair: 
[Kagami\workspace\ledcast_django\ledcast_django\dojango\media\release]. 
Format should be name=value

What version of the product are you using? On what operating system?
py2.6 + win32 vista


Original link: http://code.google.com/p/dojango/issues/detail?id=20

18 - empty DateTimeField doesn't validate even when blank,null = True

What steps will reproduce the problem?
1. create a model with DateTimeField(blank=True, null=True)
2. create a dojango ModelForm
3. submit form with empty values for your field

What is the expected output? What do you see instead?
expect to validate with empty DateTimeField
get a Validation Error

What version of the product are you using? On what operating system?
django 1.04, svn trunk dojango

Please provide any additional information below.


Original link: http://code.google.com/p/dojango/issues/detail?id=18

24 - extract_nodelist_options only allows key = val to span a single line

Since the current extract function only allowed arguments to go on a single
line I wrote this to allow multiline arguments.

def extract_multiline_nodelist_options(nodelist, context=None):
    """
    Returns a dict containing the key=value options listed within the nodelist.
    The value can be a python dict, list, tuple, or number/string literal.
    """
    ret={}
    if context:
        rendered = nodelist.render(context)
    else:
        rendered = nodelist.render({})
    if rendered.find("=") > 0:
        opts = rendered.split("\n")
        for i in range(len(opts)):
           while i+1 < len(opts) and opts[i+1].find("=") == -1:
              opts[i] += opts.pop(i+1)
        for key, val in [opt.strip().split("=") for opt in opts if opt != ""]:
           ret[key.strip()]=eval(val.strip())
    return ret 


Original link: http://code.google.com/p/dojango/issues/detail?id=24

30 - Implemented dojo_type tag

Hi!

I had a need for the tag mentioned in the TODO comment in
templatetags/dojango_base.py, so I implemented it. I have never written a
template tag before, so I just followed the example in the django docs. I
was not sure whether to put the add_module call in the tag function or in
the render method. However I think the tag should be named the same as the
python function (add_module). Than it would be more clear what it does.

Anyway, here is the code:

from dojango.util.dojo_collector import add_module

...

class AddModuleNode(template.Node):
    def **init**(self, module):
        self.module = module
    def render(self, context):
        add_module(self.module)
        return ''

@register.tag
def dojo_type(parser, token):
    '''This template tag informs the collector about new modules
    {% dojo_type "dijit.layout.TabContainer" %}'''
    try:
        (tag_name, module) = token.split_contents()
    except ValueError:
        raise template.TemplateSyntaxError, "%r tag requires a single
string as" % token.contents.split()[0]
    if not (module[0] == module[-1] and module[0] in ('"', "'")):
        raise template.TemplateSyntaxError, "%r tag's argument should be in
quotes" % tag_name
    return AddModuleNode(module[1:-1])


Original link: http://code.google.com/p/dojango/issues/detail?id=30

10 - Need setup.py

Dojango needs setup.py so it can be packaged and included with buildout,
etc. (the only way I could get it do work with buildout).

Attached a basic one to get you started (place it above dojango dir), e.g
in trunk root

Original link: http://code.google.com/p/dojango/issues/detail?id=10

49 - NumberSpinnerInput form

I could not see a form field which would use NumberSpinner, I had to use Select, the following field would be able to use NumberSpinner, instead of Select, when it is integerfield, would this be useful to include?

class NumberChoiceField(forms.IntegerField):  
   widget = forms.NumberSpinnerInput                               

   def **init**(self, _Args, *_keywords):  
      self._delta = 0  
      self._max = 0  
      self._min = 0                                                

```
  if "smallDelta" in keywords:                                 
     try:                                                      
        self._delta = int(keywords['smallDelta'])              
     except ValueError, message:                               
        raise util.ValidationError, message                    
     finally:                                                  
        del keywords['smallDelta']                             

     if self._delta <= 0:                                      
        raise util.ValidationError, "delta value cannot be <= zero"

  if "max_value" in keywords:                                  
     try:                                                      
        self._max = int(keywords["max_value"])                 
     except ValueError, message:                               
        raise util.ValidationError, message                    

  if "min_value" in keywords:                                  
     try:                                                      
        self._min = int(keywords["min_value"])                 
     except ValueError, message:                               
        raise util.ValidationError, message                    

  super(NumberChoiceField, self).__init__(*Args, **keywords)   
```

   def widget_attrs(self, widget):  
      retval = {}  
      retval['smallDelta'] = self._delta  
      retval['constraints'] = { 'min': self._min, 'max': self._max,        'places': 0 }  
      return retval 


Original link: http://code.google.com/p/dojango/issues/detail?id=49

2 - no choice for XHTML / HTML

The creation of XHTML seems to be hardwired into dojango. But some
developers prefer to use HTML.


Original link: http://code.google.com/p/dojango/issues/detail?id=2

31 - datagrid labels are using short_description instead if verbose_name

As model fields don't have short_description attribute, the AttributeError
will always fire.

The label should be from the field's verbose_name, which also takes into
account the field verbose name translation. In turn, the fields are list of
the attribute Model._meta.fields.

See the attached patch for using verbose_name as default column label.

Original link: http://code.google.com/p/dojango/issues/detail?id=31

41 - dojango datagrid fails in Django 1.2 because new field "_state" of type <django.db.models.base.ModelState> is not JSON serializable

What steps will reproduce the problem?
Normal usage of datagrid fails when trying to use Django 1.2 Beta

What is the expected output? What do you see instead?
The grid appears on the form without any data, instead this message:
"Sorry, an error occurred"

Using the django testserver, this output is shown:
"===============Exception=============
<django.db.models.base.ModelState object at 0xa717dec> is not JSON serializable

{'numRows': 80, 'items': [{'init_type': None, 'clone_id': 2962L, '_state':
<django.db.models.base.ModelState object at 0xa717dec>, 
..."

What version of the product are you using? 
dojango 0.4.6, django 1.4.1
On what operating system?
ubuntu 9.10

Please provide any additional information below.
After some investigation, and hacking I could bypass this problem by
changing the dojango/views.py
and force it to omit the "_state" field from the data.
If a foreign key is in the model, then the foreign key object can not be in
the field list, because it also contains a "_state" field.

But my hack just proofs the  point that is stated in the summary of this issue:
dojango datagrid fails in Django 1.2 because new field "_state" of type
<django.db.models.base.ModelState> is not JSON serializable
It needs a proper fix.

I attach the hacked views.py


Original link: http://code.google.com/p/dojango/issues/detail?id=41

35 - Python does have package "google"

At least in latest Ubuntu (9.10) desktop version there exists already
package called "google". It doesn't contain anything appengine spesific but
only package/module "google" is used to determine appengine which now
creates totally false behavior rendering whole dojango unusable.


Original link: http://code.google.com/p/dojango/issues/detail?id=35

13 - ValidationError on empty DateInput field

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/panel/handbook/tournament/2/
Django Version: 1.1 beta 1 SVN-10980
Python Version: 2.5.4
Installed Applications:
['localeurl',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.flatpages',
 'multilingual',
 'multilingual.flatpages',
 'dojango']
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.locale.LocaleMiddleware',
 'localeurl.middleware.LocaleURLMiddleware',
 'multilingual.middleware.DefaultLanguageMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')

Traceback:
File "C:\Python25\lib\site-packages\django\core\handlers\base.py" in
get_response
1.                 response = callback(request, _callback_args,
   *_callback_kwargs)
   File "C:\Python25\lib\site-packages\django\contrib\auth\decorators.py" in
   **call**
2.             return self.view_func(request, _args, *_kwargs)
   File "C:\Python25\lib\site-packages\annoying\decorators.py" in wrapper
3.             output = function(request, _args, *_kwargs)
   File "C:\prog\www\gobase\panel\views.py" in tournament
4.          tournament.save()
   File "C:\Python25\lib\site-packages\django\db\models\base.py" in save
5.         self.save_base(force_insert=force_insert,
   force_update=force_update)
   File "C:\Python25\lib\site-packages\django\db\models\base.py" in save_base
6.                         rows = manager.filter(pk=pk_val)._update(values)
   File "C:\Python25\lib\site-packages\django\db\models\query.py" in _update
7.         query.add_update_fields(values)
   File "C:\Python25\lib\site-packages\django\db\models\sql\subqueries.py" in
   add_update_fields
8.                 val = field.get_db_prep_save(val)
   File "C:\Python25\lib\site-packages\django\db\models\fields__init__.py" in
   get_db_prep_save
9.         return self.get_db_prep_value(value)
   File "C:\Python25\lib\site-packages\django\db\models\fields__init__.py" in
   get_db_prep_value
10.         return connection.ops.value_to_db_date(self.to_python(value))
    File "C:\Python25\lib\site-packages\django\db\models\fields__init__.py" in
    to_python
11.                 _('Enter a valid date in YYYY-MM-DD format.'))

Exception Type: ValidationError at /panel/handbook/tournament/2/
Exception Value: Enter a valid date in YYYY-MM-DD format.

---

class Tournament(models.Model):
        ...
    end_date = models.DateField(_("End date"), blank=True, null=True)
        ...

POST
Variable    Value
status  u'1'
city    u'1'
play_time_ru    u'1 \u0447\u0430\u0441'
referee     u'1'
end_date    u''
rules   u'1'
country     u'1'
region  u'1'
title_en    u'2 proba'
system  u'1'
boyomi  u'10/20'
tour_count  u'4'
komi    u'6.5'
title_ru    u'2 \u043f\u0440\u043e\u0431\u0430'
play_time_en    u'1 ttt'
player_display  u'1'
start_date  u'2009-06-12'


Original link: http://code.google.com/p/dojango/issues/detail?id=13

32 - Unicode encodings raise UnicodeEncodeError in datagrid_list view

When using UTF-8 encodings in search, datagrid_list raises an error like:

UnicodeEncodeError at /datagrid-list/entities/Entity/ ... ordinal not in
range(128). This is due to the use of (str(request.GET['search']). It
should use unicode instead (like the rest of django's components).

See the attached patch.

Original link: http://code.google.com/p/dojango/issues/detail?id=32

19 - 1.3.2 is out

Release 1.3.2 of Dojango is out.

Original link: http://code.google.com/p/dojango/issues/detail?id=19

46 - Django raises TypeError when creating model form with widgets defined in metaclass

What steps will reproduce the problem?

Just try this code:

from django.db import models
class Pop(models.Model):
    name = models.CharField()

from dojango.forms import ModelForm
from dojango.forms import TextInput
class PopForm(ModelForm):  
    class Meta:  
        model = Pop  
        widgets = {  
            'name' : TextInput,
        }

What is the expected output? What do you see instead?

Error when calling the metaclass bases
    formfield_function() got an unexpected keyword argument 'widget'
Exception Location: 
/srv/foo/trunk/external-packages/django/forms/models.py in
fields_for_model, line 182

What version of the product are you using? On what operating system?

Python Version:     2.6.4
Django Version:     1.2 beta 1
Dojango Version:    (0, 5, 0, 'alpha', 0)
Ubuntu karmic.

Please provide any additional information below.
Replacing "from dojango.forms import ModelForm" with "from django.forms
import ModelForm" fixes the problem - there is no TypeError exception.


Original link: http://code.google.com/p/dojango/issues/detail?id=46

36 - Dojango throws exceptions on Ubuntu 9.10 64bit

What steps will reproduce the problem?
1.  Running Dojango 0.4 on Ubuntu 9.10 64bit

What is the expected output? What do you see instead?
Visiting any django page which is using dojango elements results in an
exception "'module' object has no attribute 'appengine'".  This exception
are found on the dojango test page as well.

What version of the product are you using? On what operating system?
0.4 of Dojango on Ubuntu 9.10 64bit

Please provide any additional information below.
The version from SVN works and does not result in the exception.


Original link: http://code.google.com/p/dojango/issues/detail?id=36

25 - Grid startup is always called at creation

Grid.startup() is called at creation, this is fine in many cases. However
if you have a tab setup and the grid is not displayed in the visible tab at
startup you will not see the grid unless you call _refresh() or delay
startup() until that pane is selected.

This patch allows pane_id and parent_id to be passed to the grid and every
time that the parent_id changes tabs it will check if the pane the grid is
in is selected and call startup() if it is.

Further you can pass root_id for a higher row of tabs or some other
condition along with pane_id and parent_id. Either way as the startup
method is called the event will be unsubscribed.

Default behavior is the same as before, calling startup() during addOnLoad.

Original link: http://code.google.com/p/dojango/issues/detail?id=25

4 - django templates for expanding custom CSS files as additional buildstep

Today I embed django-template-based CSS stuff via markup into the HTML
templates.

That is very useful for tricky CSS stuff like pixel calculations, sliding
doors, rounded corners, etc 

To separate HTML and CSS and of course for pre-building as much CSS as
possible I am thinking of adding a buildstep to dojobuild which walks
through all custom CSS files and expands them (renders them as django
templates)

no patch yet, just kicking off the discussion ...

Original link: http://code.google.com/p/dojango/issues/detail?id=4

34 - Make datagrid search input field optional

If we have search fields for the data grid, the template generates an input
field.

Problem ? The generated field isn't following the select theme.

Plus current behavior breaks layouts e.g: BorderContainer with search field
on top, and grid in center.

Solution: Add an optional show_search to the datagrid's options. It'll
default to True, to keep current behavior, and won't break existing codebase.

If show_search will be False, the developer can create his own custom
search field as he wishes and call do_{{id}}_search() on his own.

See the attached patch.

Original link: http://code.google.com/p/dojango/issues/detail?id=34

39 - dojobuild on Windows: if Python is installed on other drive than the drive where the build is being run from...

What steps will reproduce the problem?
1. install python on C:
2. unpack dojango on D: 
3. try manage.py dojobuild

What is the expected output? What do you see instead?
the command that manage.py dojobuild is running is "cd c:\python... && 
build.bat" . The problem is, that if I am on drive D:, doing cd 
c:\python... changes the current directory of drive C:, but it does not 
change the current drive. 

So, for the command to work we need doing "C: && cd c:\python..."

I propose adding:

if sys.platform == 'win32':
    exe_command = os.path.splitdrive(buildscript_dir)[0] + ' && ' + 
exe_command

soon after exe_command is initialized in management/commands/dojobuild.py

Original link: http://code.google.com/p/dojango/issues/detail?id=39

47 - ObjectArg not usable in Stores

The _build_args method in dojango/data/modelstore/methods.py seems to
overwrite self.args in the StoreMethod used in the StoreField:

```
    args = []
    for arg in self.args:
        try:
            arg = self.field.proxied_args.get(arg.__name__, arg)
        except AttributeError: # No __name__ attr on the arg
            pass
        args.append(arg)
    self.args = args
```

This is a problem if the ObjectArg is used, because ObjectArg will only
match in the first iteration over the objects to be serialized, in the
other iterations, the ObjectArg has already been overwritten by the object
from in the first iteration and thus no replacement takes place..

My store is set up like:

class TestStore(Store):
    test1 = StoreField(get_value=StoreMethod('get_test1', ObjectArg))

```
def get_test1(self, obj):
    print obj
```

I had to apply the following in order to restore the old args:
# Index: data/modelstore/methods.py

--- data/modelstore/methods.py  (revision 255)
+++ data/modelstore/methods.py  (working copy)
@@ -85,8 +85,11 @@
         """ Builds the arguments and returns the value of the method call
         """
-        old_args = self.args
       self._build_args()
-        return self.get_value()
-        value = self.get_value()
-        self.args = old_args
- ```
     return value
  ```
  
   def _build_args(self):
       """ Builds the arguments to be passed to the given method


Original link: http://code.google.com/p/dojango/issues/detail?id=47

40 - dojango datagrid does not handle function-call field correctly.

What steps will reproduce the problem?
1. create a model with a function inside,
2. create a datagrid-list and add the function call in the list_display
3. once rendered, try to sort by the function-call fiedl.

What is the expected output? What do you see instead?
the output is "une erreur est survenue" instead of a sorted list.

What version of the product are you using? On what operating system?
svn, rev 244, ubuntu 9.10

Please provide any additional information below.

it seems that the target.order_by() can't order by a function-call field.

i solved the problem with a ugly hack of the view datagrid_list in views.py

(sorry for my english, i'm french..)

Original link: http://code.google.com/p/dojango/issues/detail?id=40

50 - Java missing message from "manage.py dojobuild dojango"

What steps will reproduce the problem?

$ python manage.py dojobuild dojango
/srv/trunk/dojango/management/commands/dojobuild.py:69: DeprecationWarning: os.popen3 is deprecated.  Use the subprocess module.
  stdin, stdout, stderr = os.popen3(settings.DOJO_BUILD_JAVA_EXEC)
Error: Please install java. You need it for building dojo.

What is the expected output? What do you see instead?

Java is installed on my Ubuntu box, build shouldn't issue.

$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu2)
OpenJDK Client VM (build 14.0-b16, mixed mode, sharing)
ed@lestaro:~$ java
Usage: java [-options] class [args...](to execute a class)
   or  java [-options] -jar jarfile [args...](to execute a jar file)
   ...

What version of the product are you using? On what operating system?
Dojango trunk rev257, Ubuntu Lucid.

Please provide any additional information below.

ed@lestaro:~$ ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 2010-05-07 18:08 /usr/bin/java -> /etc/alternatives/java
ed@lestaro:~$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 40 2010-05-07 18:08 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java
ed@lestaro:~$ dpkg -S /usr/lib/jvm/java-6-openjdk/jre/bin/java
openjdk-6-jre-headless: /usr/lib/jvm/java-6-openjdk/jre/bin/java
ed@lestaro:~$ python --version
Python 2.6.5
# It's happening because in:

stdin, stdout, stderr = os.popen3(settings.DOJO_BUILD_JAVA_EXEC)
        if stderr.read():
#             raise CommandError('Please install java. You need it for building dojo.')

stderr.read() returns:
Usage: java [-options] class [args...] ...


Original link: http://code.google.com/p/dojango/issues/detail?id=50

44 - datagrid fails on models with a imagefield.

What steps will reproduce the problem?
1. Create a model with a ImageField
2. Create a datagrid of that model
3. The view the datagrid loads to get the data will fail with messages like :
<ImageFieldFile: None> is not JSON serializable

What is the expected output? What do you see instead?
Expected json output for the dojo.data api to populate the grid.

What version of the product are you using? On what operating system?
Dojango 0.4.6, Dojo 1.4.2, Django 1.1.1-1ubuntu1 (ubuntu karmic package).
Running with local development server.

Please provide any additional information below.
Logs from the development server:
===============Exception=============

<ImageFieldFile: None> is not JSON serializable

{'numRows': 1, 'items': [{'status': u'O', 'model_id': 1L,
'vehicle_category_id': 2L, 'number_of_doors': 4L, 'key_name':
u'testkeyname', 'transmission_type': u'A', 'image': <ImageFieldFile: None>,
'year': 345L, 'id': 1L, 'registration_number': u'TestRegNumber'}],
'identifier': 'id', 'success': True}

This is an issue even if the list_display is set and does not include the
image field, since the image field still gets added into the 'complete'
array which is then serialized into json.

I have attached a patch which fixes this by not including image fields in
the items, but this will only help for models where there is a image field
but we don't need it included on the grid. 

I'm quite new to django and dojango and fairly new to dojo, so hopefully
this is right.

Original link: http://code.google.com/p/dojango/issues/detail?id=44

8 - Google AppEngine model not json-serializable

What steps will reproduce the problem?
1. Create new model in Google AppEngine (e.g. Foo)
2. return it via json by 'dojango.util.json_response(Foo.all())'

What is the expected output? What do you see instead?
TypeError:
<google.appengine.ext.db.Query object at 0x38b1290> is not JSON serializable

Please provide any additional information below.

Patch included for file util/**init**.py but needs to import google namespace.

Original link: http://code.google.com/p/dojango/issues/detail?id=8

14 - Support HTTPS

I'm seeing browser warnings with my site because the Dojo links use HTTP
while the site is being accessed over HTTPS. I'm very new to this. Am I
doing something wrong? For now, I hacked around this with the following
code in my settings.py:

DOJANGO_DOJO_PROFILE = "google"
from dojango.conf.settings import DOJO_PROFILES
DOJO_PROFILES["google"]["base_url"] =
DOJO_PROFILES["google"]["base_url"].replace("http:// "https://"

Would it be possible for this to be detected on-the-fly (i.e. if the page
is loaded over HTTP, use http:// and if it's loaded over HTTPS, use https://)?

Original link: http://code.google.com/p/dojango/issues/detail?id=14

22 - Error with attrs in widget Select

What steps will reproduce the problem?
make this form for the admin interface
class EmpresaForm(forms.ModelForm): 
    ciudad1 =
fields.ChoiceField(widget=widgets.Select(attrs={'store':'ciudadStore','class':'asdf'}),
required=False, help_text='Test')

What is the expected output? What do you see instead?
expected output:
<input dojoType="dijit.form.FilteringSelect" 
    promptMessage="Test" 
    required="false" 
    type="text" 
    class="asdf"/>

the real output:

<div class="form-row ciudad1">
<div>
<label id="id_ciudad1_label" for="id_ciudad1">Ciudad1:</label>
<div id="widget_id_ciudad1" class="dijit dijitReset dijitInlineTable
dijitLeft asdf dijitComboBox dijitComboBoxError dijitError" tabindex="-1"
wairole="combobox" dojoattachpoint="comboNode"
dojoattachevent="onmouseenter:_onMouse,onmouseleave:_onMouse,onmousedown:_onMouse"
role="combobox" widgetid="id_ciudad1" aria-labelledby="id_ciudad1_label">
<div style="overflow: hidden;">
<div class="dijitReset dijitRight dijitButtonNode dijitArrowButton
dijitDownArrowButton"
dojoattachevent="onmousedown:_onArrowMouseDown,onmouseup:_onMouse,onmouseenter:_onMouse,onmouseleave:_onMouse"
wairole="presentation" dojoattachpoint="downArrowNode" role="presentation">
<div class="dijitArrowButtonInner"> </div>
<div class="dijitArrowButtonChar">▼</div>
</div>
<div class="dijitReset dijitValidationIcon">
<br/>
</div>
<div class="dijitReset dijitValidationIconText">Χ</div>
<div class="dijitReset dijitInputField">
<input id="id_ciudad1" class="dijitReset" type="text"
waistate="haspopup-true,autocomplete-list" wairole="textbox"
dojoattachpoint="textbox,focusNode"
dojoattachevent="onkeypress:_onKeyPress,compositionend" autocomplete="off"
role="textbox" aria-haspopup="true" aria-autocomplete="list" tabindex="0"
aria-required="false" aria-invalid="true" value=""
aria-owns="id_ciudad1_popup"/>
<input type="text" style="display: none;" name="ciudad1"/>
</div>
</div>
</div>
<p class="help">Test</p>
</div>
</div>

What version of the product are you using? On what operating system?
windows xp, dojango 0.4

Please provide any additional information below.


Original link: http://code.google.com/p/dojango/issues/detail?id=22

38 - 1.4.0 !

What steps will reproduce the problem?
1. Dojo 1.4.0 is out
2. Dojango works with it rather well, just modify settings.py
3. ... but, OTOH, I didn't try to build anything.

... just dropping this one to let you know there are faithful Dojango users 
out there! And, those users are interested in Dojango development ;-) Thank 
you for a nice and polished django app!

Original link: http://code.google.com/p/dojango/issues/detail?id=38

3 - dojobuild patch for appengine

When using dojango with a custom build and on appengine, extreme measure
need to be taken to minimize the total number of files of the app + django
- dojango.

The following patch assumes that the custom build contains all the JS of
the app and add  a minify2 to dojobuild.py
This patch is in early development and does not yet cover resource files
from dojox.


Original link: http://code.google.com/p/dojango/issues/detail?id=3

12 - TypeError when Using URLField with dojango forms

What steps will reproduce the problem?
1. A Model with a URLField
2. from dojango import forms and use it (class EntityForm(forms.ModelForm))

Got:

Exception Type: TypeError at /entities/
Exception Value: Error when calling the metaclass bases
    **init**() got an unexpected keyword argument 'verify_exists'

Been trying to locate and patch for the last hour, no avail. Here's the
full traceback:

Traceback:
File
"/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/core/handlers/base.py"
in get_response
1.                     request.path_info)
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/core/urlresolvers.py"
   in resolve
2.                     sub_match = pattern.resolve(new_path)
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/core/urlresolvers.py"
   in resolve
3.                     sub_match = pattern.resolve(new_path)
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/core/urlresolvers.py"
   in resolve
4.             return self.callback, args, kwargs
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/core/urlresolvers.py"
   in _get_callback
5.             self._callback = get_callable(self._callback_str)
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/utils/functional.py"
   in wrapper
6.         result = func(*args)
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/core/urlresolvers.py"
   in get_callable
7.                 lookup_view = getattr(**import**(mod_name, {}, {},
   ['']), func_name)
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/entities/views.py"
   in <module>
8. from forms import EntityForm
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/entities/forms.py"
   in <module>
9. class EntityForm(forms.ModelForm):
   File
   "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/dojango/forms/models.py"
   in **new**
10.         return super(ModelFormMetaclass, cls).**new**(cls, name,
    bases, attrs)
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/forms/models.py"
    in **new**
11.                                       opts.exclude, formfield_callback)
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/forms/models.py"
    in fields_for_model
12.         formfield = formfield_callback(f)
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/dojango/forms/models.py"
    in formfield_function
13.             return field.formfield(form_class=field_map[1])
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/db/models/fields/**init**.py"
    in formfield
14.         return super(URLField, self).formfield(**defaults)
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/db/models/fields/**init**.py"
    in formfield
15.         return super(CharField, self).formfield(**defaults)
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/db/models/fields/**init**.py"
    in formfield
16.         return form_class(**defaults)
    File
    "/home/meir/devel/pyenv/django-1.0/lib/python2.6/site-packages/django/forms/fields.py"
    in **init**
17.         super(CharField, self).**init**(_args, *_kwargs)

Exception Type: TypeError at /entities/
Exception Value: Error when calling the metaclass bases
    **init**() got an unexpected keyword argument 'verify_exists'


Original link: http://code.google.com/p/dojango/issues/detail?id=12

42 - Normal help_text still visible

What steps will reproduce the problem?
1. Create a forms.ModelForm (that's what I used, not sure about other)
2. Add help_text to a field
3. Render using form.as_p, form.as_table, etc.

What is the expected output? What do you see instead?
A tooltip and the normal text output are displayed, instead of just a 
tooltip.

What version of the product are you using? On what operating system?
0.4.6

Please provide any additional information below.
Not sure if this is intended or not.


Original link: http://code.google.com/p/dojango/issues/detail?id=42

28 - Standard input fields visible during page load

What steps will reproduce the problem?
1. Add the dojo.require function calls at the end of the body tag by
looping through the DOJANGO.COLLECTOR variable.
2. Open the page in a browser. (I only tested with Firefox)

What is the expected output? What do you see instead?
The dojo widget replacement is done after the page has been rendered. This
will cause the standard input fields to be visible while the widgets are
replaced.

What version of the product are you using? On what operating system?
SVN revision 210

I created a fix for this. By letting the middleware replace a placeholder
in the response the dojo.require can be placed anywhere in the output. If
placed within the head section, the widgets are loaded before the page is
rendered.

A patch file is attached.
Enjoy!

Original link: http://code.google.com/p/dojango/issues/detail?id=28

6 - Exception 'Could not import dojango.views. Error was: No module named encoding' raised when following GettingStarted instructions.

Hi Guys,

I am really interested in getting Dojo running on Django and dojango seems
the best way to go.

I followed the instructions on the GettingStarted wiki page and I cannot
get the test page to load.

I get the following exception:

Traceback (most recent call last):
File
"C:\adi_vsfz\Python2.5.2\lib\site-packages\django\core\handlers\base.py" in
get_response
1. callback, callback_args, callback_kwargs = resolver.resolve(request.path)
   File
   "C:\adi_vsfz\Python2.5.2\lib\site-packages\django\core\urlresolvers.py" in
   resolve
2. sub_match = pattern.resolve(new_path)
   File
   "C:\adi_vsfz\Python2.5.2\lib\site-packages\django\core\urlresolvers.py" in
   resolve
3. sub_match = pattern.resolve(new_path)
   File
   "C:\adi_vsfz\Python2.5.2\lib\site-packages\django\core\urlresolvers.py" in
   resolve
4. return self.callback, args, kwargs
   File
   "C:\adi_vsfz\Python2.5.2\lib\site-packages\django\core\urlresolvers.py" in
   _get_callback
5. raise ViewDoesNotExist, "Could not import %s. Error was: %s" %
   (mod_name, str(e))
   
   ViewDoesNotExist at /dojango/test/
   Could not import dojango.views. Error was: No module named encoding 

I am using django 0.96. I also put the Dojo 1.1.1 source into the
mysite\dojango\media\dojo\1.1.1 folder.

Do I need a seperate folder under the 1.1.1 folder, or is it okay to drop
the contents of the Dojo 1.1.1 installation into the media\dojo\1.1.1\ folder?

I was on the IRC channel for a while, and other people haven't appeared to
have this problem, so I don't really know what I am doing wrong.

Thanks for your time!

aidan

Original link: http://code.google.com/p/dojango/issues/detail?id=6

5 - HTML 4 templates

I have attached HTML base templates, as alternative to the XHTML templates


Original link: http://code.google.com/p/dojango/issues/detail?id=5

43 - Getting typeerror when using fields with regexp's

What steps will reproduce the problem?
1. Add a field with a regexp, such as forms.EmailField, etc.
2. Attempt to display it

What is the expected output? What do you see instead?
Uncaught TypeError: Property 'regExpGen' of object [Widget 
dijit.form.ValidationTextBox, ID] is not a function

What version of the product are you using? On what operating system?
Latest SVN (r253)

Please provide any additional information below.


Original link: http://code.google.com/p/dojango/issues/detail?id=43

15 - plain {% datagrid %} tag gives error

What steps will reproduce the problem?
1. Make a {% datagrid %} with json_store_url

What is the expected output? What do you see instead?
a datagrid, get "list index out of range" exception

What version of the product are you using? On what operating system?
dojango: svn, django: 1.02

Please provide any additional information below.
exception gives line 38 of dojango_grid.py
local vars ouptuts bits = [u'datagrid']
whereas the code is trying to access bits[1] and bits[2]


Original link: http://code.google.com/p/dojango/issues/detail?id=15

26 - dojango-charting

I've been working on getting charting support integrated into dojango. This
is an initial upload to get some feedback. It supports all the basic 2D
charts. The pie chart is a bit awkward still and needs a better
abstraction.  I also want to find a way to add support for the new django
aggregate functions(any good ideas on this are welcome). The views.py
currently uses the new multiline parser in ticket #24.

Plots, and series are required. Series can simply be "<name>": {}. All the
parameters simple take what the corresponding charting command would.
The stores parameter ties into the database in the same way the datagrid
does. Store names are expected to correspond to the name of a series.

Example:
{% load dojango_chart %}
{% chart %}
   id = "<chart_name>"
   pane_id = "<chart's content pane>"
   parent_id = "<pane_id's tab container>"
   root_id = "<parent_id's tab container>"
   contentClass = "<css class>"
   chartClass = "<css class>"
   legendClass = "<css class>"
   legend = {<legend options>}
   axes = {
      "x": {"minorTicks": 0},
      "y": {"minorTicks": 0, "vertical": 1, "min": 0}
   }
   plots = {
      "default": {"type": "StackedAreas"}
   }
   series = {
      "<name>": {"opts": {<options>}},
   }
   seriesOrder = []
   stores = {
      "<name>": {
         "app": "",
         "model": "",
         "fields": [],
         "axis": "x",
         "sort": "",
         "query": {}
      }
   }
{% endchart %}

Original link: http://code.google.com/p/dojango/issues/detail?id=26

48 - where's the release?

What steps will reproduce the problem?
1. look at dojo homepage
2. look at dojango homepage
3. ???
4. PROFIT!

Just wanted to let you know, that there are some people out there, who - like me - use Dojango. Dojango ROCKS, please release a new version. Thanks!

Original link: http://code.google.com/p/dojango/issues/detail?id=48

16 - Renaming json_response in util/__init__.py

The name of the that function should differ from the decorator in
decorators.py. This sometimes throws strange errors, when the wrong
function was imported.


Original link: http://code.google.com/p/dojango/issues/detail?id=16

7 - dojo trunk has renamed custom_rhino.jar to js.jar

dojo trunk has renamed the Rhino command from custom_rhino.jar to js.jar,
therefore dojobuild.py should check which one is available and choose that one.


Original link: http://code.google.com/p/dojango/issues/detail?id=7

11 - datagrid does not work in google appengine

The view will not correctly return the json response.  The model
introspection in the template tag will also most likely fail.

Original link: http://code.google.com/p/dojango/issues/detail?id=11

1 - Custom profiles in main settings.py

I managed defined a custom profile as follow:

DOJANGO_DOJO_VERSION = '1.1.1'

DOJANGO_BASE_MEDIA_ROOT =
os.path.abspath(os.path.dirname(**file**)+'/dojango/media/')

DOJANGO_DOJO_BUILD_PROFILES = {
    'myapp': {'base_root': DOJANGO_BASE_MEDIA_ROOT +'/release',
        'used_src_version': DOJANGO_DOJO_VERSION,
        'build_version': DOJANGO_DOJO_VERSION,
        'profile_file': DOJANGO_BASE_MEDIA_ROOT+'/myapp.profile.js',
        'options': 'profile=myapp action=release optimize=""
cssOptimize=comments.keepLines'},
}

What I did not like about this is the explicit setting of
DOJANGO_BASE_MEDIA_ROOT. Does there exist a way we can use the dojango
default value when defining additional profiles in main settings.py


Original link: http://code.google.com/p/dojango/issues/detail?id=1

45 - RadioSelect widget is not compatible with django

What steps will reproduce the problem?
1. Create a new django.forms.widgets.RadioSelect(choices=('A', 'B')). That
works 
2. Create a new dojango.forms.widgets.RadioSelect(choices=('A', 'B')). That
does not work
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
0.4.6 on Windows

Please provide any additional information below.
Fix:
In dojango/forms/widgets.py change

class RadioSelect(DojoWidgetMixin, widgets.RadioSelect):
    dojo_type = 'dijit.form.RadioButton'

```
def __init__(self, attrs=None):
    if dojo_config.version < '1.3':
        self.alt_require = 'dijit.form.CheckBox'
    super(RadioSelect, self).__init__(attrs)
```

to

class RadioSelect(DojoWidgetMixin, widgets.RadioSelect):
    dojo_type = 'dijit.form.RadioButton'

```
def __init__(self, attrs=None, choices=()):
    if dojo_config.version < '1.3':
        self.alt_require = 'dijit.form.CheckBox'
    super(RadioSelect, self).__init__(attrs, choices)
```


Original link: http://code.google.com/p/dojango/issues/detail?id=45

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.