get_random_secret_key not documented!?

2022-05-16 Thread Sam
In the DigitalOcean documentation I just found that they use `from django.core.management.utils import get_random_secret_key` to generate a new, unique secret key. I didn't know that there was such a functio

Re: DATABASE_URL not documented?

2022-03-03 Thread Sam
//devcenter.heroku.com/articles/python-concurrency-and-database-connections > > . > > On Thu, Mar 3, 2022 at 8:07 AM Sam wrote: > >> Hi! >> While reading* Getting Started on Heroku with Python >> <https://devcenter.heroku.com/articles/getting-started-with-python#p

DATABASE_URL not documented?

2022-03-03 Thread Sam
pected to find it somewhere in the settings reference <https://docs.djangoproject.com/en/4.0/ref/settings/>. Kind regards, Sam -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group an

Re: include_block template tag

2020-08-19 Thread Sam Willis
(like this) I think it should be developed though consensus in the core framework. Reusable template components are still an unsolved problem that would be lovely to solve. Thanks! Sam On Wednesday, August 19, 2020 at 1:05:15 PM UTC+1 jure.er...@gmail.com wrote: > It definitely does. Tha

Re: include_block template tag

2020-08-18 Thread Sam Willis
weaks). However from my experience then it will be difficult to get this into core without the championing from a core developer. If there was enough interest I would certainly be happy to contribute to the feature! Sam On Monday, August 17, 2020 at 10:05:29 AM UTC+1, Jure Erznožnik wrote: >

Re: Deprecating logout via GET

2020-03-04 Thread Sam Willis
Why not have the logout link take the user to a page asking them to confirm the logout, and have it as a POSTed form button from there? That adds a helpful confirmation page, removes the difficulties of styling a button as a link constantly (or changing the header design to a button). One downs

Re: Django security releases issued: 3.0.1, 2.2.9, and 1.11.27

2019-12-18 Thread Sam Willis
Hi, It looks to me like this has introduced a slight behaviour difference with 1.11 on python 2.7 than on 3.x: https://github.com/django/django/commit/f4cff43bf921fcea6a29b726eb66767f67753fa2#diff-e840e362abe9e625eee52d91897400bdR36 The release notes don't indicate what the difference in behavi

Re: Proposal to format Django using black

2019-04-23 Thread Sam Cooke
On projects I've been working on I started using "prettier" fro JavaScript and it made a huge difference to code consistency across the team, which was great, but my favourite benefit (that I'm not sure I've seen mentioned much here) is I can write code faster if I don't have to format it. Being ab

Re: Align Django admin checkboxes

2017-08-30 Thread Sam Willis
I believe this is designed so that when there are multiple checkboxes in a line they look like this: On Monday, August 28, 2017

Subresource Integrity

2017-01-25 Thread Sam Willis
Hi, You may have come across the (relatively) new subresource integrity (SRI)[1] security feature that is available in Chrome and Firefox (its coming to Edge[2] and Safari[3]) - it enables a hash to be provided as an attribute on a linked JavaScript or CSS tag that the browser can test against

Re: Removing and renaming Django's Python 2 related helpers

2017-01-24 Thread Sam Willis
precated and will be removed in Django V2.xx.", DeprecationWarning, 2 ) That way it removes the need for it to be maintained in core but ensures that other Django apps that are supporting py2 and 3 don't break. Sam On Tuesday, January 24, 2017 at 11:53:01 AM UTC, Aymeric Au

Re: Add custom autoreload file tracking options setting

2017-01-05 Thread Sam Willis
Could one options be to replace the current devserver with the one from Werkzeug? It already uses watchdog (similar to watchman) for monitoring file system events and is well maintained. With Django now allowing dependancies, this seems like something that doesn't necessarily need to be develop

Re: Changing {% include %} to strip a trailing newline

2017-01-04 Thread Sam Willis
Could this be set within the template rather than the include tag? So for example have a new tag such as {% strip_final_new_line %} that when included at the end of a template immediately before the final new line would instruct it to be striped. This stops the user from having to remember to u

Re: Joining the "Python 3 Statement"

2016-07-10 Thread Sam Willis
As far as I can tell the only place where Django's Python 2.x deprecation is stated is here https://www.djangoproject.com/weblog/2015/jun/25/roadmap/ I think it should be more prominently stated in the docs, and as 1.11 is supposedly the last to support 2.7 (according to the blog post) it may be

Re: Sqlite 3.12 breaks the Django test suite

2016-04-07 Thread Sam Cooke
is useful, Sam On Thu, 7 Apr 2016 at 14:37 Florian Apolloner wrote: > This is the list of SQL statements we are executing: > https://dpaste.de/Mqu1/raw first column is thread id, second is cursor id > and third is the statement. I am a little bit confused about why the cursor > ids s

Annotate date intervals or ranges

2016-03-02 Thread Sam Peka
It would be great if there was a way within the standard Queryset api to annotate ranges of dates. The use case is that it would remove the need to resort to RawSQL when grouping things by date ranges, such as the day of the month. I know the postgres extras package has a DateRangeField, but it

Re: Channels integration plan, first draft

2015-12-17 Thread Sam Willis
message with a more_content attribute. Sam On Thursday, December 17, 2015 at 9:48:31 PM UTC, Andrew Godwin wrote: > > Yes, that is the idea. While it obviously adds overhead (a millisecond or > two in my first tests), it also adds natural load balancing between workers > and then lets

Re: Django Admin New Look

2015-08-19 Thread Sam Cooke
I meant jQuery 2 and 1.11 are API compatible - you're right though, the latest versions of jQuery might have deprecated things that are currently used in Django. On Wed, 19 Aug 2015 at 10:39 elky wrote: > > On Wednesday, 19 August 2015 14:27:53 UTC+5, sdcooke wrote: >> >> and get the performance

Re: Django Admin New Look

2015-08-19 Thread Sam Cooke
For jQuery support in older browsers it's pretty simple to include jQuery 1.11 in old IE using conditional comments - that way we retain support with just an extra line of code, don't leave IE8 behind, and get the performance boost of jQuery 2 in modern browsers. As far as I'm aware they are still

Re: Future of the development server's auto-reloading

2015-08-10 Thread Sam Cooke
and potentially tell the user about watchdog) Do you think it's worth carrying on down this path? Sam [1] https://pythonhosted.org/watchdog/ [2] https://github.com/django/django/compare/master...sdcooke:watchdog (ignore the code quality - it was thrown together quickly!) On Sun, 9 Aug 201

Re: Feature: Template Components

2015-06-09 Thread Sam Solomon
Speaking only for myself and the component framework we built here, I don't think I would expect it to ever be rolled into Django itself. However, the framework we made does work without any modifications to Django and works just fine alongside existing function and classed based views. This me

Re: Feature: Template Components

2015-06-02 Thread Sam Solomon
;, "new_html": " George - Aug. 12, 2014, 1:46 p.m. Smith - Aug. 12, 2014, 1:46 p.m. Joseph - Aug. 12, 2014, 1:23 p.m. Steve - Aug. 12, 2014, 1:22 p.m.

Re: Feature: Template Components

2015-06-01 Thread Sam Solomon
So a former co-worker with some help/guidance from me developed a component system on top of Django that sounds sorta like what you are all talking about. It's very complicated and I'm still not sure whether it was ultimately a good idea to use or not, but it does make some things very simple (

Re: Setting database default values in migrations (postgres)

2015-04-26 Thread Sam Baron
will keep testing it out. I am curious if this would be an acceptable solution. Thanks, Sam On Saturday, November 1, 2014 at 10:17:50 AM UTC-7, Shai Berger wrote: > > On Friday 31 October 2014 19:16:15 Jon Dufresne wrote: > > On Fri, Oct 31, 2014 at 9:46 AM, Andrew Godwin >

Re: GSoC 2015: Template engine optimisation

2015-03-13 Thread Sam Cooke
Even with the cached template loader? Before realising it was unnecessary one of the first things I did was hack something together that took the nodelist from the include and stuck it straight into the for loop's nodelist at compile time and it didn't make much difference. Sam On F

Re: GSoC 2015: Template engine optimisation

2015-03-13 Thread Sam Cooke
ts created by the two inner tags - my rough memory was that made a 3-4% difference in this particular case and we decided not to use it due to the added complexity of our code. Most of our page render times on www.mixcloud.com are proportional to the number of cards we have on the page. Sam On Thu, 12 Mar

Re: GSoC 2015: Template engine optimisation

2015-03-12 Thread Sam Cooke
particularly in the context of Preston's suggestion that we might find a bottleneck - I don't think there is one particular bottleneck. Our "solution" for now has been to speed up the processors in our servers and investigate switching to pypy - we'll probably be looking at Ji

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-05 Thread Sam Willis
ext variables assigned by the use tag to choose if its a normal, large or small modal and give it an id. This can obviously already be implemented with a hierarchy of extended templates but I think this tag creates a very clean way of structuring these components that doesn't require making cus

Re: The greatest proposal yet: rename this damn group

2014-09-05 Thread Sam Lai
FYI, this comes up again and again here, but the core devs have shot it down repeatedly. Here's one from last year - https://groups.google.com/d/msg/django-developers/yJYkZEGUzVk/u5xiIzg_TtMJ For the record though, I think renaming it to something less ambiguous is a good idea. On 5 September 201

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-04 Thread Sam Willis
y Page Title{% endblock %} If we switched the 'use' tag to use a namespace other than global: {% use 'head.html' ns html_head %}{% enduse %} The page template would then be: # actual_page.html {% extends 'base.html' %} {% block html_head.title %}My Page Title{% endblock %}

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-04 Thread Sam Willis
in core is a great idea. Just >> because it *can* be implemented in 3rd party code, doesn't mean it has to >> be. >> >> >> On Thursday, 4 September 2014 02:10:33 UTC+10, Sam Willis wrote: >>> >>> Hi All, >>> >>> I wou

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Sam Willis
r" pattern. Something that >> I've been proposing years ago. >> >> >> >> Le mercredi 3 septembre 2014 18:24:17 UTC+2, Ian a écrit : >>> >>> On Wed, Sep 3, 2014 at 10:10 AM, Sam Willis wrote: >>> > Although I have implemented th

Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Sam Willis
mplex components such a modal windows. I have made a first pass at an implementation here: https://gist.github.com/samwillis/af3992f69c2597a16252. Although I have implemented this with the 'use' word, there may be a better word. I considered 'embed' but thought 'use&#x

Re: requiring login to perform Trac actions?

2014-03-03 Thread Sam Lai
On 4 March 2014 10:44, Russell Keith-Magee wrote: >> If you believe the "create an account" barrier is a problem, do you think >> adding something like GitHub auth to Trac would lower the barrier to an >> acceptable level? > > > This sounds like a reasonable option to me. Any halfway serious poten

Re: 1.6 reverse() escapes unreserved chars in path components

2014-03-02 Thread Sam Lai
ers/Gofq5y40mYA/v_4yjrBItWkJ The final post addresses this issue, but doesn't seem to have been taken into account when the patch was accepted. On 2 March 2014 12:28, Erik van Zijst wrote: > On Sat, Mar 1, 2014 at 2:41 PM, Sam Lai wrote: >> The relevant commit and issue - >> >>

Re: 1.6 reverse() escapes unreserved chars in path components

2014-03-01 Thread Sam Lai
The relevant commit and issue - https://github.com/django/django/commit/31b5275235bac150a54059db0288a19b9e0516c7 https://code.djangoproject.com/ticket/13260 On 1 March 2014 17:26, Erik van Zijst wrote: > Django's django.core.urlresolvers.reverse() seems to have changed its > behavior in 1.6. It

Re: Unit tests error out with WinError 10013 in my Windows 7 machine with Python 3.3.2

2013-10-24 Thread Sam Lai
Do you have anything running on port 8081 (running netstat will tell you)? I just ran Django's test suite on my machine (Windows 7, Python 3.3.2), from the trunk cloned an hour ago, and it completed mostly without an issue (there's a UnicodeDecodeError but that's likely because it's printing a cha

Re: Perception of attitude in tickets

2013-05-14 Thread Sam Solomon
As an outsider with very little data (so you can ignore this if you strongly disagree), I sort of agree with the notion that "WONTFIX" could be sending a different signal that it is being used for. WONTFIX to me would mean, "We acknowledge that this is an annoyance for some people, but we're no

Re: #14633 - organization of settings docs

2013-01-08 Thread Sam Lai
Looks good. Adds a bit more structure for browsing but doesn't significantly change how the page is used, which is probably through CTRL-F. As mentioned by others in the issue, the distinction current and deprecated settings seems very arbitrary. I think it'll be better to sort the deprecated sett

Re: Proposal: Django URL Admin (django-urls)

2012-12-16 Thread Sam Solomon
Yeah, I agree, as it is, I can't see any reason why I would use it, but I could see it being useful with some modifications such as: 1) Being able to create redirects (which seems to already be on the todo-list) 2) Being able to specify extra kwargs to pass to a view so that it would be possibl

Re: startproject template context

2012-06-10 Thread Sam Simmons
, Jannis Leidel wrote: > > > On 07.06.2012, at 17:32, Luke Plant wrote: > > > On 01/05/12 22:58, Ramiro Morales wrote: > >> On Tue, May 1, 2012 at 11:04 AM, Sam Simmons > wrote: > >>> For app/project templates I found the docs a little misleading when &

Re: startproject template context

2012-05-06 Thread Sam Simmons
Here it is for future reference: https://code.djangoproject.com/ticket/18277 On Tuesday, May 1, 2012 4:58:16 PM UTC-5, Ramiro Morales wrote: > > On Tue, May 1, 2012 at 11:04 AM, Sam Simmons > wrote: > > For app/project templates I found the docs a little misleading when they

Re: startproject template context

2012-05-06 Thread Sam Simmons
Ok, thanks. Will open one now. On Tuesday, May 1, 2012 4:58:16 PM UTC-5, Ramiro Morales wrote: > > On Tue, May 1, 2012 at 11:04 AM, Sam Simmons > wrote: > > For app/project templates I found the docs a little misleading when they > say > > 'Any option passed to

startproject template context

2012-05-01 Thread Sam Simmons
For app/project templatesI found the docs a little misleading when they say 'Any option passed to the startapp command' will be added to the context. This got me thinking I could add arbitrary options to the

Re: Student Proposal for Google Summer of Code 2012

2012-02-06 Thread Sam Lai
On 5 February 2012 20:16, j4nu5 wrote: > Hi, > > Google Summer of Code 2012 has been announced. > http://google-opensource.blogspot.com/2012/02/google-summer-of-code-2012-is-on.html > > I want to work on extending Django's database migration capabilities, > as a student. > > Database migrations ha

Re: We're a group of students at UC Berkeley looking to contribute to Django

2011-09-28 Thread Sam Whitlock
I am in the same group as Jamin. Here is some more info about the class. Berkeley has these classes called DeCal classes. They are student-taught classes about all sorts of things (Starcraft to Wheelchair Basketball). More info at the official site . We are enrolled in th

Re: Decision for ticket #6362 - Remove blank spaces with strip when validating the data

2011-07-09 Thread Sam Lai
On 5 July 2011 02:20, Jacob Kaplan-Moss wrote: > Doesn't do anything to change my point, though: a framework can't go > about stripping user input. That's a user-code decision. If Django > strips out data I wanted, there's nothing I can do to get it back. I concur. The consensus seems to be shift

Re: Reversing translated urls in templates

2011-07-04 Thread Sam Bull
I like this quite a bit. It's clean, and it allows for a common i18n pattern where the footer contains a translation link for each supported language, and the language names are localized to themselves (i.e. "Español | Français | Deutsch"). Sam On 2011-07-04, at 5:23 AM, broca

Re: Timezone-aware storage of DateTime

2011-06-29 Thread Sam Bull
ser to specify a field in the DateTimeField declaration to be used for storing timezone data 6. When storing, extract the timezone and record it in this field 7. When retrieving, convert the datetime from UTC to the timezone specified in the field I could put together a patch for this solution if y

Re: Timezone-aware storage of DateTime

2011-06-28 Thread Sam Bull
ng or filtering. There's precedent for this sort of behaviour with the GenericForeignKey, and I think it would be fine, especially if the secondary field was optional. What do you think? Sam On 2011-06-28, at 9:26 AM, Stephen Burrows wrote: > I agree that it would be nice to be able to s

Re: Timezone-aware storage of DateTime

2011-06-27 Thread Sam Bull
z info, convert using the default timezone specified in the settings When retrieving the data from a non-timezone-aware db, convert them from UTC to the project's timezone. Sam -- You received this message because you are subscribed to the Google Groups "Django develop

Re: 5-for-1?

2011-06-18 Thread Sam Bull
nt support (like the new with tag), *args support, **kwargs support, and support for the "with " pattern. Is this something I should convert into a patch? Sam On 2011-06-18, at 5:29 AM, Jannis Leidel wrote: > On 18.06.2011, at 03:38, Stephen Burrows wrote: > >> I would

Re: settings.py should have way to hide key/values even when debug set True

2011-02-01 Thread Sam Lai
On 1 February 2011 17:26, Alex Gaynor wrote: > How, precisely, would one apply a decorator to an assignment statement? >  Unless there has been some change to Python's grammar I'm not aware of, > decorators can only be used on function and class definitions. You could wrap the value on the rig

Re: making URL resolving/reversing gradually more flexible

2010-11-12 Thread Sam Lai
On 12 November 2010 23:14, burc...@gmail.com wrote: > First I thought you're going to return some instance with reverse > which has get_possibilities. > And you just want RegexURLPattern to register 3 usual regexes for you > instead of one. Effectively. I should've been more concise when writing

Re: making URL resolving/reversing gradually more flexible

2010-11-12 Thread Sam Lai
try and view name only > complicates things. I am not suggesting a many-to-many relationship between urlpatterns and view names. Each urlpattern can still only match 1 view name. It is a many-to-one relationship. Not that this case already exists if you use ? in a regexp in a URL pattern.

making URL resolving/reversing gradually more flexible

2010-11-11 Thread Sam Lai
[First timer participating in the Django dev process, so apologies if I have missed some protocol etc.] First up, this is not about adding an alternate URL resolution/reversal method to the core; I've noticed a fair bit of resistance to that. PROBLEM: I want to make my website available via an AP

Re: ImageField performance

2009-07-17 Thread Sam Tregar
format the size info will be in the header! -sam --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsu

Tablespace not being set in query for oracle driver.

2008-04-12 Thread Sam Richards
everything, but it does seem to at least do the querys properly, but this doesnt seem quite right. Or am I missing something? Sam. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers"