|
NtotheTC posted:I'd quite like to do some open-source contributing centered around Django. Is there some sort of list or resource to find a project that is looking for contributors? Most projects are pretty happy with contributors. I know django-admin2 has been undergoing a lot of work lately. Django has a couple of blocking bugs before 1.6 can come out, if you want to jump into the deep-end.
|
# ? Aug 21, 2013 22:38 |
|
|
# ? Jun 3, 2024 23:16 |
|
django-registration is a really, really important app with really, really poor maintenance. Not that I'm saying that Ubernostrum is the kind of guy who welcomes feedback, but it's definitely something important that needs help.
|
# ? Aug 21, 2013 22:44 |
|
ufarn posted:django-registration is a really, really important app with really, really poor maintenance. I'd be surprised if he accepted patches, honestly. PyDanny has been recommending django-allauth for awhile now and I plan on using it if/when I need registration. Contribute to that django-braces is always open for patches </toot-toot>
|
# ? Aug 21, 2013 23:19 |
|
MonkeyMaker posted:I'd be surprised if he accepted patches, honestly. My pull request has been open for a year and a half now.
|
# ? Aug 21, 2013 23:34 |
|
I can understand part of his frustration, because a lot of people really don't bother to read the history of requests, but he's the most reclusive maintainer I can think of. Does django-registration 1.0 and the upgrade documentation even been officially released at this point? Last I saw, it looked like it was out, but there was no guide for upgrading from 0.8 to 1.0. I should really stop depending on django-registration ...
|
# ? Aug 21, 2013 23:39 |
|
ufarn posted:I can understand part of his frustration, because a lot of people really don't bother to read the history of requests, but he's the most reclusive maintainer I can think of. 1.0 is officially out, I do believe. It doesn't support Django 1.5's custom User model, though, even with being released after 1.5.
|
# ? Aug 22, 2013 00:20 |
|
I'm currently making a website to learn Django and wondering on what I should be documenting? I have no plans on making this an open source project, but feel that this would be a good time to learn about writing documentation. I know about docstrings and sphinx.
|
# ? Aug 23, 2013 20:29 |
|
Duke of Idaho posted:I'm currently making a website to learn Django and wondering on what I should be documenting? I have no plans on making this an open source project, but feel that this would be a good time to learn about writing documentation. I know about docstrings and sphinx. Like what should you be documenting for yourself? Everything that you look up in the docs and/or every time you use `pdb`. Write down what you looked up and either what the answer was or a link to the answer. Also write down what you did that made the bug happen. Write tests for your bugs.
|
# ? Aug 23, 2013 20:42 |
|
Apropos, Ubernostrum just announced that django-registration is basically dead and available for ownership.
|
# ? Aug 26, 2013 18:29 |
|
ufarn posted:Apropos, Ubernostrum just announced that django-registration is basically dead and available for ownership. I haven't looked at its code at all, but given that its so old, and it really doesn't seem like that complicated of a thing...I'd just rewrite it from scratch instead of taking over the old code.
|
# ? Aug 26, 2013 18:56 |
|
Thermopyle posted:I haven't looked at its code at all, but given that its so old, and it really doesn't seem like that complicated of a thing...I'd just rewrite it from scratch instead of taking over the old code. I just have to unlearn the django-registration method before applying the new (old, argh) model first.
|
# ? Aug 26, 2013 19:45 |
|
Well that's disconcerting, it's scary when you're just finishing up a project and one of your dependencies is already no longer supported.
|
# ? Aug 28, 2013 22:06 |
|
Cheekio posted:Well that's disconcerting, it's scary when you're just finishing up a project and one of your dependencies is already no longer supported. It's not like the django-registration workflow is difficult to NIH.
|
# ? Aug 28, 2013 22:22 |
|
Cheekio posted:Well that's disconcerting, it's scary when you're just finishing up a project and one of your dependencies is already no longer supported.
|
# ? Aug 28, 2013 22:42 |
|
Has anyone had experience using Google Interactive Map with Django? I want users to be able to set markers for things (in this case pictures) that other users of the map will be able to see. Django-easy-maps looks like it provides some of the functionality I need. Having not used the Google Map API I'm not sure how easy it is to do things from within Django itself or whether it will require a lot of AJAX to do things like set the HTML of markers etc. Can I have create one big map that contains all the user created markers and have all the marker information stored on googles side? There are click events, so I could have one of those bring up a form that they can upload a picture to along with the co-ordinates that were clicked on.. that can get submitted to django and then on confirmation of the save the marker could be added. Or is it the case that I have to populate those markers manually every time I load up a map from the lat/lng values I have stored in the database? That strikes me as a preferable/more maintainable solution, but I'm worried about the loading times. That would remove the need to intercept the delete API call from Google Maps too however. NtotheTC fucked around with this message at 11:57 on Aug 29, 2013 |
# ? Aug 29, 2013 11:17 |
|
NtotheTC posted:Has anyone had experience using Google Interactive Map with Django? I want users to be able to set markers for things (in this case pictures) that other users of the map will be able to see. Django-easy-maps looks like it provides some of the functionality I need. Having not used the Google Map API I'm not sure how easy it is to do things from within Django itself or whether it will require a lot of AJAX to do things like set the HTML of markers etc. Ya django actually has some neat stuff built in to do this. Do a search for geodjango. I actually just did something similar where I stored the lat lng points in a geodjango model and wrote a little api that accepted a google maps bounding box as an argument and returned all points in said box from my database. It was surprisingly simple using googles api with geodjango and it gives you the benefit of only loading markers in the currently seen map area
|
# ? Aug 29, 2013 15:13 |
|
GeoDjango does look interesting. To elaborate, I'm going to have a picture model, which includes a user uploaded photo, timestamp, and lat/lng coordinates. So I guess I could make that a GeoDjango model: Python code:
If your project is open source and you don't mind me having a look round it I'd love to see how you communicated with the google API etc.
|
# ? Aug 29, 2013 15:50 |
|
As an aside, with django-registration getting dumped by the creator, what is the best alternative now for a simple drop-in registration system? Is django-registration still a decent choice or should people be moving to a different app.
|
# ? Aug 29, 2013 19:31 |
|
NtotheTC posted:As an aside, with django-registration getting dumped by the creator, what is the best alternative now for a simple drop-in registration system? Is django-registration still a decent choice or should people be moving to a different app. django-socialauth is great if you don't want to deal with registration/login yourself. I hear good things about django-allauth, too, but haven't used it myself yet.
|
# ? Aug 29, 2013 19:40 |
|
Anyone going to DjangoCon? I'm currently spending too much money on in-flight wifi en route to Chicago. Nothing like putting some final hours of polish (read:making from scratch) a portfolio site while hopping planes.
|
# ? Sep 1, 2013 18:00 |
|
Yep, headed there tomorrow morning.
|
# ? Sep 1, 2013 18:41 |
|
Cheekio posted:Anyone going to DjangoCon? I'm currently spending too much money on in-flight wifi en route to Chicago. Nothing like putting some final hours of polish (read:making from scratch) a portfolio site while hopping planes. Edit: Is there a livestream of any of the talks at djangocon? Funnily enough I've read a few blogs recently that championed the "write code on a plane" technique to software development. http://www.campaul.net/blog/2013/08/16/flakes-on-a-plane/ http://doppnet.com/2011/04/coding-while-on-the-plane/ (The trick is not to pay for wifi) I'm not sure I could work like that. If I was required to write code without the internet my first step would be to google "How to write code without the internet". NtotheTC fucked around with this message at 11:23 on Sep 2, 2013 |
# ? Sep 2, 2013 11:12 |
|
I just can't code on a laptop anymore without being constantly frustrated. I'm too used to multiple monitors.
|
# ? Sep 2, 2013 15:33 |
|
Thermopyle posted:I just can't code on a laptop anymore without being constantly frustrated. I'm too used to multiple monitors.
|
# ? Sep 2, 2013 16:05 |
|
Cheekio posted:Anyone going to DjangoCon? I'm currently spending too much money on in-flight wifi en route to Chicago. Nothing like putting some final hours of polish (read:making from scratch) a portfolio site while hopping planes. Nope, not this year. Too expensive, didn't have a talk I really wanted to give, and it always conflicts with the first day of school, making me feel like a horrible dad. Say hi to any Lincoln Loop people you meet there!
|
# ? Sep 2, 2013 17:31 |
|
NtotheTC posted:Edit: Is there a livestream of any of the talks at djangocon? A) Right now it's just the paid tutorials, so they're not being broadcast. The real conference starts tomorrow and I'll give a heads up in the thread if I see any good AV setups. B) I've been looking for content to kick off a new blog with and I think those two articles are perfect. ufarn posted:Being able to stick a window to one half of the screen is the only way I can navigate now. Even then, there's never enough screen real estate. I'm hoping that coding on one screen can be 're-learned', like a practicable skill that eventually you're just stuck with a baseline level of proficiency of. Of course, my desktops are all qwerty while my laptops are all dvorak because of a similar line of thinking, but I can't imagine this turning out quite so badly. Pythagoras a trois fucked around with this message at 18:06 on Sep 2, 2013 |
# ? Sep 2, 2013 17:48 |
|
I do probably 85% of all of my development on one screen. I have a second monitor but don't hook it up all the time. When I do, it's for my editor only since it's turned 90º to portrait. My secrets are a good window manager/layout control and, at least on the Mac, heavy use of full-screen mode.
|
# ? Sep 2, 2013 23:57 |
|
Do you guys know if I can use Django with Canopy? I'm just comfortable with the development environment, and I use it with my scientific viz stuff. In the list of downloadable packages in Canopy there's a "Django 1.3.1," but I see the latest version on Django's website is 1.5.2. Just wonder if I can import the package somehow. Thanks.
|
# ? Sep 3, 2013 03:25 |
|
NtotheTC posted:Edit: Is there a livestream of any of the talks at djangocon? keep a local copy of whatever manuals you might need. I often code with my wifi turned off just to avoid distraction.
|
# ? Sep 3, 2013 14:30 |
|
There's a pretty hefty camera pointing at the invited speakers, but there's no live stream of the conference as far as I can tell. The 10am keynote (which I slept through) was apparently more about not getting in trouble with copyright and branding than it was the direction of Django (which makes me happy I slept through it). Seems like Day 1? is pretty tame. The Day 0? tutorials yesterday were awesome though. The TDD tutorial yesterday was friggin awesome, I had read a handful of the speakers' book and got about as far as self-learning could take me, and now I feel confident that TDD is something I absolutely want to use going forward.
|
# ? Sep 3, 2013 21:18 |
|
Cheekio posted:There's a pretty hefty camera pointing at the invited speakers, but there's no live stream of the conference as far as I can tell. The 10am keynote (which I slept through) was apparently more about not getting in trouble with copyright and branding than it was the direction of Django (which makes me happy I slept through it). Seems like Day 1? is pretty tame. The keynotes rarely have anything to do with day-to-day Django development. Often they're not even by developers (last year had a Congressman, for example). The videos will likely be available a month or two after the conference is over. That's when they usually go live.
|
# ? Sep 3, 2013 23:01 |
|
What's a good way to ensure model validation is run when you're creating instances, but not using a form? For example, I have celery tasks that create model instances, but methods like .save() or .get_or_create() don't run .clean(). Of course, I can call .clean() myself, but I'm just wondering if there is a way anyone likes more.
|
# ? Sep 6, 2013 22:56 |
|
Thermopyle posted:What's a good way to ensure model validation is run when you're creating instances, but not using a form? I just call self.clean() in the save() method. It's ugly but it works. EDIT: Or, more cleanly, just call the model_instance.clean() in your Celery task.
|
# ? Sep 6, 2013 23:10 |
I've got an ImageField that I want to use in Django REST Framework. How do I intercept the file upload so I can do things like rename the file or resize it and whatnot?
|
|
# ? Sep 6, 2013 23:54 |
|
fletcher posted:I've got an ImageField that I want to use in Django REST Framework. How do I intercept the file upload so I can do things like rename the file or resize it and whatnot? Renaming should be done with the `upload_to` attribute on the model field. I'd do resizing and stuff as a post_save signal.
|
# ? Sep 7, 2013 00:55 |
Worked out great, thanks MonkeyMaker! Got another question now... My model has the following field: code:
quote:Warning: Field 'last_touched' doesn't have a default value Shouldn't auto_now_add take care of that for me? So I also tried: code:
fletcher fucked around with this message at 20:20 on Sep 12, 2013 |
|
# ? Sep 12, 2013 20:14 |
|
fletcher posted:Worked out great, thanks MonkeyMaker! You shouldn't have to do any of that crazy stuff with the default field at all. If it is just a field for an 'updated_at' type of thing try using: code:
The March Hare fucked around with this message at 21:31 on Sep 12, 2013 |
# ? Sep 12, 2013 21:28 |
Yup I've been using South from the get-go, it is pretty sweet! Not sure what was up before with my auto_now, but it seems to be working now... Got another question now. Django REST Framework appears to respect the blank=True/False on my model definitions, which is great. Is it possible to make that dynamic though? Like, I want it to be blank=True if some_field='foo', but if some_field was set to 'bar' then I want blank=False. How should I go about doing that? I can sorta get there with custom permissions but then it just returns a 403 permission denied, rather than a 400 bad request with useful error messages.
|
|
# ? Sep 13, 2013 02:12 |
|
fletcher posted:Yup I've been using South from the get-go, it is pretty sweet! If you only want that done when saved via the API, I'm not sure how to achieve that (since DRF doesn't really have a validation level), but you can override the clean method on the model to make sure at least one of the fields is filled in. I'm pretty sure DRF calls the model's clean method. If it doesn't, it's hacky but override the model's save and do it there.
|
# ? Sep 13, 2013 15:54 |
|
|
# ? Jun 3, 2024 23:16 |
|
Is this a good way of making entries only visible to their owners? I feel as though there is a better way of handling it. code:
|
# ? Sep 16, 2013 05:40 |