Quantcast
Channel: User Johndt - Stack Overflow
Browsing all 33 articles
Browse latest View live

Comment by Johndt on PyQt QListView Issue with Drag and Drop for both...

Thanks for including the code here, as the link you provided is dead.

View Article



Comment by Johndt on Python - Accessing instance attribute without `self.`...

@wim The latter is correct; fixed.

View Article

Comment by Johndt on Reset sorl Thumbnail for a Django site

@Brian Yes, I solved the issue we were having; however, I don't think we did so by resetting sorl. As stated in the "LATE EDIT" to the question, the problem was quite unrelated. That's why I didn't...

View Article

Comment by Johndt on How to drop a custom QStandardItem into a QListView

I asked this question a bit earlier. I have attempted to follow your solution, however I am still not able to maintain custom data across a move event. I am not sure how to properly implement the...

View Article

Comment by Johndt on QT Layouts, how to make widgets in horizontal layout...

Your first link is dead

View Article


Comment by Johndt on Disable horizontal scrolling in QScrollArea completely,...

Wow, this worked beautifully! So much simpler than overriding events. Disabling the vertical scrollbar through this method even allows the mouse scroll-wheel to move the horizontal scroll.

View Article

Comment by Johndt on How do I install a Python package with a .whl file?

Thank you, was having trouble finding this info! However, I'm not sure how to read the output to determine which version I need.

View Article

Comment by Johndt on DJANGO background task always on

Check out using Celery + Redis for asynchronous tasks.

View Article


Comment by Johndt on Why does a checkbox input designed this way on a...

@Carcigenicate I'd imagine that the OP is asking, "Is this actually the design, or am I doing something wrong? If this is actually the default design, how can I change it to match the other fields?"

View Article


Comment by Johndt on How do I Scroll parent page to top when child page is...

Should parent / child origin just be the domain, or the full URL of the parent / child? i.e. should the parent_origin be https://test.testsite.com, or should it be...

View Article

Comment by Johndt on Trying to convert Excel Fuzzy logic to Python function

Hi Brook! Welcome to SO! It's not entirely clear to me what the issue you are trying to solve is. What does your function return and how is this different from the expected output? Is your function...

View Article

Comment by Johndt on Trying to convert Excel Fuzzy logic to Python function

@BrookHurd, this is because the process function is likely expecting strings rather than numbers. I'll update my answer to reflect this.

View Article

send() and recv() functions

I am attempting to set up a server/client model. The client will receive two matrices from the user, then send these two matrices to the server, which will then compute their product and send the...

View Article


Django Migrating to a new Database

I just joined a project using Django, and am attempting to initialize my own development server. When I attempt to do so, the migration fails for one of my apps. A model for this app has a...

View Article

Answer by Johndt for rewrite get_absolute_url method in a template- django 1.6.5

You are attempting to pass the name of the urls as an argument, when they should be a keyword argument, specifying name. So, an example would be as follows:url(r'^$', 'index', {'template_name':...

View Article


Answer by Johndt for Django - ModelForm display the item but insert the...

Rather than displaying the user as read only form field, it would probably be better to exclude the field from your form, and display the user's name in the template, wherever you wish, as follows: {{...

View Article

Answer by Johndt for Loading timestamp upon page load and comparing it to...

You could use a context processor to add a timestamp context variable to every template. Your context processor is a simple Python function which takes an HttpRequest argument and returns a dictionary...

View Article


Answer by Johndt for Django query limit and streamingHttpResponse

You can limit queries quite easily in Django, using Python's array-splicing notation. You can use this on any query. Here are some examples:# Will return only the first 1000 objects in the...

View Article

Answer by Johndt for Python: Inline if statement else do nothing

No, you can't do exactly what you are describing, as it wouldn't make sense. You are assigning to the variable g.data_version... so you must assign something. What you describe would be like...

View Article

Answer by Johndt for Django: nested template commands

The static tag is not loaded into the template. So, at the top of the template, add:{% load static %}Everything else with the posted template looks fine.

View Article
Browsing all 33 articles
Browse latest View live




Latest Images