Re: New to Django - Question: All registered users to post content...

2014-01-06 Thread Erik Romijn
Hello Stephen,

On 06 Jan 2014, at 02:48, Retnuh  wrote:
> I am new to Django (converted from Drupal) and trying to learn Django first 
> before I dive into converting my site over from HTML,CSS and JS to use Django 
> and Python…

Your best bet for an answer is the django-users email list, 
 - the web interface is 
. 

This django-developers email list is only for the discussion of Django itself.

You might also find helpful the #django IRC channel on irc.freenode.net.

Good luck!

cheers,
Erik

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/D1EACBE6-BEC3-47D4-A5DF-4633BF01C01C%40solidlinks.nl.
For more options, visit https://groups.google.com/groups/opt_out.


django_bash_completion in the pypi package

2014-01-06 Thread Brett Nekolny
I can't seem to get to django_bash_completion from a Pypi package install 
of Django. I believe this is due to not including "extras" in the setup.py 
packaging script. I had created a django 
ticket for 
this, but was asked to post here for additional feedback. 

In the ticket I had also mentioned including extras/django_bash_completion 
as part of the package "scripts" for easier access within the $VIRTUAL_ENV/bin/ 
folder, but I realize the downside of over-populating the tab completion 
possibilities.

Anyways, here is my proposed 
diff: https://gist.github.com/bnekolny/c7f7bf3c016695d6cbbd

I wonder if anyone has feedback for me regarding this issue. We use 
django_bash_completion, but are unable to install Django using the Pypi 
package without getting our own copy of the django_bash_completion script 
since it is not bundled with the package.

Thanks in advance for any feedback!

Brett Nekolny

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/84ee6c9e-e117-484c-a707-c904e401a35d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


django_bash_completion in Pypi Package

2014-01-06 Thread Brett Nekolny
Hello!

I previously created a django 
ticket for 
an issue that I was having, but the developer asked me to post my question 
here for feedback and pending the result of the feedback further 
consideration on the proposed ticket and fix.

I can't seem to get to django_bash_completion from a pypi package install 
> of Django. I believe this is due to not including the package for "extras". 
> Additionally, if django_bash_completion was added as an explicit script, it 
> would be placed in the $VIRTUAL_ENV/bin/ folder for easier use.


As per the initial feedback from the developer, aaugustin, it might be 
disadvantageous to have multiple tab complete options in the 
$VIRTUAL_ENV/bin/ folder, so I've since removed django_bash_completion from 
the scripts portion of the package and the resulting diff is: 
https://gist.github.com/bnekolny/c7f7bf3c016695d6cbbd

diff --git a/setup.py b/setup.py
> index 11de0c1..a1d4042 100644
> --- a/setup.py
> +++ b/setup.py
> @@ -59,6 +59,9 @@ for dirpath, dirnames, filenames in os.walk(django_dir):
>  elif filenames:
>  data_files.append([dirpath, [os.path.join(dirpath, f) for f in 
> filenames]])
>  
> +# Adding the extras package so that we can get the django_bash_completion 
> script
> +packages.append('extras')
> +
>  # Small hack for working with bdist_wininst.
>  # See http://mail.python.org/pipermail/distutils-sig/2004-August/004134.html
>  if len(sys.argv) > 1 and sys.argv[1] == 'bdist_wininst':
>
>  

Please let me know if anyone has thoughts regarding this proposed diff. I 
would love to be able to get django_bash_completion from my pypi install of 
Django, but that just doesn't seem to be possible without this fix.

Thank you for any feedback!

Brett Nekolny

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9025a61b-626d-40c9-915f-eda5e1981425%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Renaming apps.has_app

2014-01-06 Thread German Larrain
+1 for is_installed

Aymeric, thanks for your work

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/04aa7e6b-75d0-45dd-89cf-78e8ff83b3c3%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django_bash_completion in Pypi Package

2014-01-06 Thread Florian Apolloner
On Monday, January 6, 2014 7:57:50 AM UTC+1, Brett Nekolny wrote:
>
> Please let me know if anyone has thoughts regarding this proposed diff. I 
> would love to be able to get django_bash_completion from my pypi install of 
> Django, but that just doesn't seem to be possible without this fix.
>

>From what I understand your patch would install the extras as 
python-package, which would clutter site-packages. That's not something we 
should do.

Cheers,
Florian 

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/e0d13a36-226c-4872-bde1-0be4b9a841c7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django_bash_completion in Pypi Package

2014-01-06 Thread Shai Berger
Hi Brett,

On Monday 06 January 2014 08:57:50 Brett Nekolny wrote:
> 
> I can't seem to get to django_bash_completion from a pypi package install
> 

You don't really need one. django-bash-completion has had one significant 
change in almost four years. To find the completions, it invokes your "working" 
Django copy (that is, Django from your current virtualenv or equivalent) -- 
so, essentially, you can install it once, manually, and forget about it.

Shai.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/201401061534.45750.shai%40platonix.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Renaming apps.has_app

2014-01-06 Thread Andre Terra
On Sun, Jan 5, 2014 at 7:38 PM, Raffaele Salmaso wrote:

> On Sun, Jan 5, 2014 at 10:11 PM, Aymeric Augustin
>  wrote:
> > `apps.has_app(...)` is technically correct but I think we can find a
> better name. My current favorite is `apps.installed(…)`. It’s quite short
> and it’s reminiscent of INSTALLED_APPS. That makes (some) sense since the
> method tests if its argument is in INSTALLED_APPS, accounting for
> AppConfigs.
> >
> > Since I’m awful at picking names, I’d like to hear your suggestions and
> arguments before making a decision.
> apps.is_installed('django.contrib.sites') ?
>
> Should it takes a list of apps, just to replace
> apps.is_installed('djagno.contrib.sites') and
> apps.is_installed('django.contrib.admin') and ...
> with
> apps.is_installed('django.contrib.sites', 'django.contrib.admin',...)
> ?


The only issue I see with this solution is that it's not clear at first
whether this is an AND or OR match, plural agreement notwithstanding.



Cheers,
AT

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAKBiv3z8K_t-shTV4OPvyLM3GSD%2BV%2BFpwG%3DnQAmgWUOGysiMuA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Forbidding double imports

2014-01-06 Thread Shai Berger
On Sunday 05 January 2014 00:24:16 Florian Apolloner wrote:
> Kill double imports with fire :þ (and now)

+1

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/201401061937.24703.shai%40platonix.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Improving aggregate support (#14030)

2014-01-06 Thread Josh Smeaton
An update. I've had some success with refactoring Aggregates as 
ExpressionNodes. The aggregates test suite is now passing, but I still have 
some failures with aggregates_regress test suite. The refactoring should 
allow behaviour like below possible:

Model.objects.annotate(total_time=Sum( F('timer1') + F('timer2') / 2 ))

An issue that the first patch ran into was deducing the python return types 
since there was no field type to "attach" to. I've introduced some basic 
behaviour that checks that all nested expressions are the same type, and 
then grabs the first column type. If the types are different, an error is 
thrown. To get around this, I introduced a field_type parameter to 
aggregates:

Model.objects.annotate(total_time=Sum( F('timer1') + F('timer2') / 2, 
field_type=FloatField() ))

Feedback appreciated and welcome.

 My plan is:

- Make sure all existing tests pass
- Create a bunch of new tests that stress "complex annotations/aggregations"
- Figure out how to allow F() in annotations. Annotation currently accepts 
arbitrary expressions, but does nothing with them.
- Clean up anything that looks too messy

I think I will be done with the above list inside the next 7 days. I would 
welcome help (or pointers) on testing against GIS once I'm done, as that 
should be all that's left to tackle.

- Josh

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/9c16ccdc-9d0d-4804-91ba-550de6148c1a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.