Django-4.2.8, django-crispy-forms-2.1, checkboxes not return a list

2023-12-08 Thread b...@tanners.org
I have a Django ModelForm (below) that I include a customized html snipped. And I am using django-crispy forms. Added the clean() method to help explain my problem. ```python class ProfileForm(forms.ModelForm): self.helper.layout = Layout( Fieldset( "Triage {{ settings.triage

variable inside a template

2022-06-16 Thread luca72.b...@gmail.com
Hello i have a list like: mylist = ['1,png','2.png',3.jpj'] in the template i do as follow: {% for o in mylist %} {% if "png" in o %} {{ o }} {% else %} {{o}} {% endif %} {% endfor %} in the template i see the file

Re: static file serve nothing is load in deployment

2022-06-15 Thread luca72.b...@gmail.com
t/_images/how-static-files-work-apache.png. > > Otherwise, please explain in more detail what your deployment environment > looks like. > > > On 15/06/2022 13.08, luca72.b...@gmail.com wrote: > > Hello i have this configuration in settings.py > > STATIC_URL

static file serve nothing is load in deployment

2022-06-15 Thread luca72.b...@gmail.com
Hello i have this configuration in settings.py STATIC_URL = '/static_files/' STATIC_ROOT = 'D:/prova_nuovo_sito/static_files' INSTALLED_APPS = [ 'polls.apps.PollsConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions',

Problem when i turn debug False

2021-09-02 Thread luca72.b...@gmail.com
Hello my web site is hosted on a2hosting when i turn to False the image are not loaded. My settings.py have this line: STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static_files') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, "static_media") the file are located in:

Re: HELP me: "a beginner's questions"

2021-08-18 Thread Alex B
to help more if you'd like, hit me up here or directly. Alex B On Wed, Aug 18, 2021, 7:02 AM wrote: > Hi > > I am now starting to work in Django. > > I built a development environment on my laptop. I experimented there, > things work. > > I have a web server on the n

IS it possible to debug Django with Apache and mod_wsgi

2021-02-12 Thread Ognjen B.
Hi everyone, I was wondering can anyone point me to a document describing how to setup debugging using any IDE (VS Code, PyCharm, etc) or at least from console when using Django with Apache and mod_wsgi? Or if it's not possible please let me know so I don't waste any more time. Thanks -- You

Re: problem to show image

2021-02-11 Thread luca72.b...@gmail.com
Solved i have add Il giorno giovedì 11 febbraio 2021 alle 15:27:51 UTC+1 luca72.b...@gmail.com ha scritto: > Hello > In the setup file i have: > > STATIC_URL = '/static/' > MEDIA_URL = '/media/' > > #STATICFILES_DIRS = [ > #os.path.join(BASE_DIR, "static&q

problem to show image

2021-02-11 Thread luca72.b...@gmail.com
Hello In the setup file i have: STATIC_URL = '/static/' MEDIA_URL = '/media/' #STATICFILES_DIRS = [ #os.path.join(BASE_DIR, "static"), #'/polls/static/polls', #] STATIC_ROOT = "F:/aflbmanager/mysite/polls/static" MEDIA_ROOT = "F:/aflbmanager/mysite/polls/media" In the template for load

Re: forloop.counter

2020-10-15 Thread luca72.b...@gmail.com
thanks i forgot it Il giorno giovedì 15 ottobre 2020 alle 16:39:45 UTC+2 larry.mart...@gmail.com ha scritto: > On Thu, Oct 15, 2020 at 7:32 AM luca72.b...@gmail.com > wrote: > > > > i have this : > > {% if forloop.counter < {{ variable }} %} > > i have th

forloop.counter

2020-10-15 Thread luca72.b...@gmail.com
i have this : {% if forloop.counter < {{ variable }} %} i have this error: Could not parse the remainder: '{{' from '{{' how i can solve it? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

django template forloop

2020-10-14 Thread luca72.b...@gmail.com
Hello I have this: {% for x in lista_form %} {% if forloop.counter < 100 %} {% for fieldi in formone %} {{ fieldi.label }} {{ fieldi }} {% endfor %} Immagine {% endif %} {% if

Double for cycle in template

2020-10-14 Thread luca72.b...@gmail.com
Hello i have this: {% for fieldi in formone %} {{ fieldi.label }} {{ fieldi }} {% if forloop.counter|divisibleby:"2" %} {% endif %} {% endfor %} i need to add: {% for fieldi in formone and for or x in lista_form

request.FILES.getlist()

2020-10-07 Thread luca72.b...@gmail.com
i have a form that is like: class tesoffcliForm(forms.Form) image = forms.FileField(label='Image', required = False) art_gen = forms.CharField(label='test ', required = False ,widget = forms.Textarea()) the view is: def testrendering(request): form = tesoffcliForm()

MultiValueDictKeyError at

2020-09-23 Thread luca72.b...@gmail.com
Hello i have this problem : MultiValueDictKeyError at The view is: matricola = request.POST['matricola'] The form is: matricola = forms.CharField(label='Matricola', required = False, max_length=100, widget = forms.TextInput(attrs={'readonly':'readonly'})) the template is {{ form }} Why i

question for register_model()

2020-09-05 Thread y b S
Hi all, I am currently studying Django source code, then i have one question: in registry.py, for app_config in self.app_configs.values(): app_config.import_models() import_models() uses self.apps.all_models but when this variable is filled? and when and how register_model() is

Authenticate user stalls on 302 after POST is successful

2020-08-27 Thread tiggums B
Hello, *SUMMARY*: During user authentication, POST is successful but will stall on the 302 redirect. *INFO*: On Chrome(85.0.4183.83) Django 2.1 & Django 3.1 DEBUG = True, Happens rarely on HTTPS live-servers *STEPS TO REPRODUCE*: 1. On chrome browser, run manage.py runserver 2. Using a

RE: Role based access

2020-01-19 Thread HULUGESH B
My use case is like this name age department user(manytomanyfiled) xyz 23 cs user1 abc 24 ec user1 pqr 25 me user2 Now my question is if user1 loged in means he has to see only name age department user(manytomanyfiled) xyz 23 cs user1 abc 24 ec user1 And if user2 login means name age

Re: Django 2.2.6 fails to serve some static files in Windows 10

2019-10-04 Thread A B
This problem also happens in Linux, with exactly the same symptoms. A workaround has been found! It works when the file is in the proper staticfiles folder and not inside a subdirectory. If I add "styles.css" to the directories: *STATICFILES_DIRS = [os.path.join(BASE_DIR, 'css').replace("\\",

Database Views

2019-08-27 Thread HULUGESH B
Hi All, I am facing issues in Django Models: If connect databse views in models. It shows less records than actual number of records. Kindly assist me. How to solve. This is not all the time.. sometimes it is correct sometimes not correct. -- You received this message because you are

Key Error in form.cleaned_data

2019-08-08 Thread Mei B
I'm using a formset, and i'm trying to iterate through all the cleaned data except I keep getting a Keyerror no matter what field I try.. for form in formset: data = form.cleaned_data name = data["name"] ---> KeyError: "name" class VariableForm(forms.Form): name =

Re: How to customize AdminWidget FilteredSelectMultiple?

2019-07-23 Thread Mei B
to be working. On Monday, July 22, 2019 at 5:21:08 PM UTC-7, Mei B wrote: > > I'm trying to use the admin widget FilteredSelectMultiple, I can get it to > render on my page, but I want to customize it a bit more. > > I want to change the labels from available/chosen, change the size,

How to customize AdminWidget FilteredSelectMultiple?

2019-07-22 Thread Mei B
I'm trying to use the admin widget FilteredSelectMultiple, I can get it to render on my page, but I want to customize it a bit more. I want to change the labels from available/chosen, change the size, and reorder the boxes (have chosen be on the left) How do I go about doing that? -- You

Re: formset has_changed always return true.

2019-06-11 Thread Mei B
; > > https://docs.djangoproject.com/en/2.2/topics/forms/ > https://docs.djangoproject.com/en/2.2/topics/forms/formsets/ > > Missatge de Mei B > del dia dt., 11 de > juny 2019 a les 4:33: > >>if request.method == "POST": >> fo

DRF structure query

2019-06-11 Thread Dave B
Hi, Being fairly new to DRF, I'm just wondering on the best ways of going about stucturing an api which has man endpoints. Basically is there a good reason not to put different categories of endpoints together in different apps, like the ones for user data, ones for app data etc. And then

formset has_changed always return true.

2019-06-10 Thread Mei B
if request.method == "POST": formset = forms.Formset(data=request.POST, initial=initial) if not formset.has_changed(): #has_changed always returns true! msg = "No changes detected." if formset.has_changed() and formset.is_valid()

Order_by ManyToMany relation?

2019-06-05 Thread Mei B
I have a form for a model that contains a ManyToMany relationship to model B. By default, manytomany relationship on forms are SelectMuliple and orders them by alphabetical. How can I order by if they already have a relation? In my forms.py class FormA(forms.ModelForm): class Meta

Legacy DB: ID is null when .save or .create

2019-05-17 Thread Mei B
I'm using a legacy DB with postgres. In one of my models: class case(models.Model): id = models.AutoField(primary_key=True) case_id = models.ForeignKey(.) user_id = models.ForeignKey(...) When I'm saving or creating a new case object, I always get "null value in column 'id'

Re: Generic CBV DeleteView GET csrf_token

2019-03-14 Thread B
gVxdtNPHEt+RpSzM-VAx9rTgJf7CBqZ91UFtrg@mail.gmail.com_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > > On Fri, Mar 15, 2019 at 12:34 AM B > wrote: > >> I'm implementing a DeleteView, and for completion I would like to provide >> the functionality indicated here: >&g

Generic CBV DeleteView GET csrf_token

2019-03-14 Thread B
I'm implementing a DeleteView, and for completion I would like to provide the functionality indicated here: https://docs.djangoproject.com/en/2.1/ref/class-based-views/generic-editing/#deleteview *If this view is fetched via GET, it will display a confirmation page that should contain a form

AttributeError: type object 'NHTTrainerInline' has no attribute '_meta'

2019-03-11 Thread raghav b
I keep getting this error not sure what i am doing wrong!! Traceback (most recent call last): File "C:\Users\IBM_ADMIN\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper fn(*args, **kwargs) File

Emails using django

2019-03-06 Thread raghav b
I am trying to send emails with Django and calling a text file as the body but it keeps throwing an error that the template can't be found. I have defined and imported templates correctly but is not working. Any ideas how I can make this work? Thanks. -- You received this message because you

Re: What's the difference between using mariadb as database and using mysql?

2019-03-04 Thread Petr B.
just use postgresql четверг, 28 февраля 2019 г., 19:35:03 UTC+7 пользователь x w написал: > > I'm using a Linux distribution called manjaro and mysql has been replaced > with mariabd in the official repository. When I use maridb as database, > what is the difference with mysql? Is there

Models in admin view

2019-03-01 Thread raghav b
I have created two apps with the name candidate and another training. In the Django admin I want to create trainings and add candidates to that. I have created candidate and training and registered in the admin view. But for the last part I want to add multiple candidates into a training from

Re: help for django interview task

2019-01-31 Thread C B
Yeah, don't do this for free. Forget about the job, they just want someone to do their work for free. Think of it as a problem to solve to help you learn Django. It is the kind of thing you will need to do in the real world as a Django developer. But forget about this company, they are taking you

Re: Where can I place code to read a db table at startup to create an in memory cache?

2018-08-07 Thread B K
Hello Jason, This is a project dealing with Internet of Things/5G. The plan was to cache millions of devices session information in memory for the frequently communicating things and to age out the infrequent things to the database. The in memory search would be done first, If cache hit did

Where can I place code to read a db table at startup to create an in memory cache?

2018-08-07 Thread B K
I would like to read a table from the database at startup time to build an in memory cache for fast data retrieval. Where is the best place to insert this code to run in django? thx bk -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: authenticate issues with custom backends in 2.1rc1

2018-07-25 Thread Dirk B.
Thanks! That was it! But no, I dont remeber ever seeing a deprecation warning about this. Am Do., 19. Juli 2018 um 23:06 Uhr schrieb Tim Graham : > Do you have deprecation warnings with Django 2.0.x? > https://docs.djangoproject.com/en/dev/howto/upgrade-version/#resolving-deprecation-warnings >

Re: model permission assignment via groups requires further config at model level?

2018-04-30 Thread Rob B
Thanks George - I understand now. I never thought it would only apply to the admin interface but should have. Kind regards, Rob On Sun, Apr 29, 2018, 10:05 PM George Lubaretsi, wrote: > Django permissions are only enforced in Admin interface by default. You > have to

Re: autocomplete

2018-02-27 Thread Maurizio B.
Django-autocomplete-light is probably your best option. We have used it in a couple of projects and it's customisable to a certain extent, and well maintained. On Monday, February 26, 2018 at 6:55:15 PM UTC+1, Mafabi Emmanuel wrote: > > how do i design an autocomplete in django 2.0 > > > --

Re: Channels + steam(gevent based package)

2017-03-07 Thread Lada B
UTC+1 Andrew Godwin napsal(a): > > So you are starting a steam client from a consumer inside a worker process > then? Inside a consumer, send() calls will not finish until you return > control from the consumer, so maybe that's it? > > On Tue, Mar 7, 2017 at 10:39 AM, Lada B

Re: Channels + steam(gevent based package)

2017-03-07 Thread Lada B
umably not a webserver > process, as that doesn't have a main thread. Could you explain a bit more > about the architecture and what channel layers you have configured? > > Andrew > > On Tue, Mar 7, 2017 at 4:06 AM, Lada B <lada...@gmail.com > > wrote: > >> I'm using

Re: Channels + steam(gevent based package)

2017-03-07 Thread Lada B
win napsal(a): > > Where are you running this steam client from? Presumably not a webserver > process, as that doesn't have a main thread. Could you explain a bit more > about the architecture and what channel layers you have configured? > > Andrew > > On Tue, Mar 7, 2017 at

Channels + steam(gevent based package)

2017-03-07 Thread Lada B
I'm using https://github.com/ValvePython/steam https://github.com/django/channels and I'm trying to make them work together. Problem is that when SteamClient starts I cannot send any message with channels. Group(group_name).send({ 'text': json.dumps({ 'match_status': "balancing

Re: Channels - slow with limited number of connections

2017-03-05 Thread Lada B
I just tried to run workers in separate processes and it works great! it's awesome and it fails only because of redis channel memory being full. Dont know how to increase it tho. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Channels - slow with limited number of connections

2017-03-05 Thread Lada B
Also i havent tried running workers in separate processes Is the client and server running on the same computer? No And i just realized that expiry=5 is wrong because it disconnects users. Thats why it feels "better" now :D -- You received this message because you are subscribed to the Google

Re: Channels - slow with limited number of connections

2017-03-05 Thread Lada B
a bunch of clients, the >> ASGI server, meaning the process actually holding the websocket, in your >> case daphne, will actually upload the data. >> >> Is the client and server running on the same computer? >> >> Don't stress test your server manually, you should w

Re: Channels - slow with limited number of connections

2017-03-05 Thread Lada B
HW performance with 1 user sending message every 100ms: https://i.imgur.com/5F4mKAI.png Yesterday i tried to use it in production and when there were 15 clients connected (each one pinging server every 2 seconds) nobody else could connect. I have default settings and I followed Getting

Channels - slow with limited number of connections

2017-03-05 Thread Lada B
Hi, im using django-1.10 + channels + asgi_redis + daphne + uwsgi + nginx but i have problem with workers+daphne being slow. Im developing chat and I tried how fast its by holding ENTER button (spamming messages one after one and it doesn't even respond until i stop sending messages. When i

Re: Django session issue with mod_wsgi + apache

2016-07-15 Thread Dipankar B
directions to try and make sure > caches between your infrastructure and the user's screen are not making the > mistake. > > D > > On 15 July 2016 at 11:27, Dipankar B <dipi...@gmail.com > > wrote: > >> Hello, >> >> I am working on Django Aplication .

Django session issue with mod_wsgi + apache

2016-07-15 Thread Dipankar B
Hello, I am working on Django Aplication . It has almost 350 users right now. Problem. Suppose we have a username bob and james. So, bob logged in and using our Django web application. But Sometimes bob's session is showing james account information. So bob is able to see James private data

How to let users to block private messages in Django-postman?

2016-02-11 Thread Lukas B.
Hi all, I have instlled django-postman but it works great. However I'd like to allow users to opt for not receiving any private messages. I'm wondering how the easiest way to do so? I've looked at the docs but could not

Re: MIGRATION_MODULES possible bug.

2015-08-20 Thread b . wade
Thanks Tim, that looks to be the exact situation I am facing. On Thursday, August 20, 2015 at 9:53:03 AM UTC-7, Tim Graham wrote: > > I guess > https://github.com/django/django/commit/b9c619abc101688fbbfa981525175f831d359483 > > might help. > > On Thursday, August 20, 2015 at 10:02:04 AM

Re: MIGRATION_MODULES possible bug.

2015-08-20 Thread b . wade
I believe the cause of this is line 248 in django/db/migrations/writer.py create_path = os.path.join(upath(sys.path[0]), *package_dirs) Which is automatically using the first path location in the system path list. Unfortunately with the way our buildout handles paths this is causing a

MIGRATION_MODULES correct setup.

2015-08-19 Thread b . wade
Hi we have a farily large Django 1.8 project and there are a few 3rd party apps we are using that don't have Django migrations so I am trying to create ones for the apps in question. In my settings file I have: MIGRATION_MODULES = { 'oauth_access':

Re: Postgres function json_array_elements does not found while django's tests

2014-12-15 Thread Volodymyr B
*Solved* Mistake in query json_array_elements(animated_groups) Needs change to this: json_array_elements(animated_groups::json) On Friday, 14 November 2014 17:14:18 UTC, Volodymyr B wrote: > > Hi all > > > I have class method in django model which is use json_array_eleme

Postgres function json_array_elements does not found while django's tests

2014-11-14 Thread Volodymyr B
Hi all I have class method in django model which is use json_array_elements function. In case when it performs by browser it works fine. But in tests it fails with: python manage.py test Traceback (most recent call last): File "path_to_project/dj_server/model_animations/*tests.py*", line

Re: Django 1.5 - release date

2013-02-13 Thread Martin B.
Hmm, the list of blockers seems to be empty. Seeing as its been a while since the last update here, any news on a rc/stable release? On Sunday, December 30, 2012 1:19:04 AM UTC, Russell Keith-Magee wrote: > > > On Sat, Dec 29, 2012 at 2:44 PM, Aidan Zhakypov > > wrote: > >>

Save formtools.WizardView for later completion in another session?

2012-10-02 Thread Alex S-B.
I have a long multi-page form wizard (a django.contrib.formtools.wizard.views.SessionWizardView) that I would like the user to be able to continue working through even after logging out and back in from a different computer. That is, I would like the wizard data to persist across sessions

Fwd: Scammer / Job fraud rehash - Do NOT perform any business with Eike Post

2012-06-09 Thread Dr. Eike B. Post
Please delete the heading for this post: https://groups.google.com/forum/?fromgroups#!searchin/django-users/Eike$20/django-users/HYPxcrTRn5E/s-4nsLKLg2AJ The message has been deleted but the headings still shows up! The creator of the post does not repond to my emails. Google tells me that they

Re: Thread safety with view arguments in class based views

2012-05-17 Thread Chris B
Alright. That makes sense. Thanks everyone On Wednesday, May 16, 2012 4:18:49 PM UTC-7, Chris B wrote: > > According to the docs on the generic class based > views<https://docs.djangoproject.com/en/1.4/ref/class-based-views/#view> > : > >> Each request

Thread safety with view arguments in class based views

2012-05-16 Thread Chris B
According to the docs on the generic class based views : > Each request served by a > View > has > an independent state; therefore,

Min requirements for running django?

2012-05-06 Thread Etienne B. Roesch
Hi all, I am investigating hosting solutions for django apps, and would like to query the community on the requirements they have experienced to do so properly. On a machine that would only run django-related processes, how much RAM? Also, any tips on how to best set it up would be much

Re: template logic vs AJAX newbie seeks advice

2012-05-04 Thread Etienne B. Roesch
Thanks for the link to your post Reinout! So, have you made a decision about the way to go for your application? I like the idea of using two different systems from the backend and the frontend. I am new to django (a month+), but I don't think there was ever a doubt in mind that my frontend

Django + boto support

2012-04-26 Thread Eduardo B
Hi, I am planning to develop a systems management tool for Ubuntu platform. Mitch Garnaat released a Python API that supports connecting to various Amazon Web Services. I would like to know if boto integrates very well with Django.

PRG with View classes

2012-04-17 Thread dmitry b
hi, Is there out of the box support for the PRG pattern with Django's new class-based views? If not, what's a good/preferred way of implementing one? Thanks D. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the

Connecting User Accounts to Third Party Social Sites

2012-04-05 Thread Chris B
I'm trying to enable my users to connect their accounts with third party social networks like LinkedIn and Github. I don't want my users to be able to create accounts on my site with those links, just connect their existing accounts. Django-SocialRegistration looks best, but I can't figure

Re: anti-join query in Django

2011-11-21 Thread dmitry b
t, Nov 19, 2011 at 8:41 AM, dmitry b <dmitry.ma...@gmail.com> wrote: > > Is there a recommended approach to anti-join queries?  Here's the > > query I'm having an issue with: > > > Branch.objects.filter(branchgroup__isnull=True)[:1] > > > where branchgroup is a

anti-join query in Django

2011-11-18 Thread dmitry b
Is there a recommended approach to anti-join queries? Here's the query I'm having an issue with: Branch.objects.filter(branchgroup__isnull=True)[:1] where branchgroup is a ManytoMany relationship to another model. I want to get a set of Branch objects that aren't mapped to any BranchGroups.

custom management command with multiple required parameters

2011-11-16 Thread dmitry b
Hi, I just want to make sure I'm not missing something obvious. I'm writing a command that takes multiple required parameters and a set of optional parameters and I there doesn't seem to be readily available support for this use case. LabelCommand can take multiple labels, but the semantics of

Linking ManyToMany relationship to dynamically update from values of an html SelectBox

2011-11-08 Thread Newton B
I have the following models class Group(models.Model): name = models.CharField(max_length=32, unique=True) class Subgroup(models.Model): name = models.CharField(max_length=32, unique=True) group = models.ForeignKey(Group) class KeywordsList(models.Model): name =

CAS and Django cache

2011-10-26 Thread dmitry b
Can I do check-and-set operations using Django's cache api? Thanks D. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: direct query to Oracle db view doesn't work

2011-10-19 Thread dmitry b
t doesn't. If I try an aggregate query such as > using COUNT(account_number) without the Where clause, I get a row with > 0 in it (there are thousands of account_numbers). > > Thanks for the suggestion. > > On Oct 19, 1:30 pm, dmitry b <dmitry.ma...@gmail.com> wrote: >

Re: direct query to Oracle db view doesn't work

2011-10-19 Thread dmitry b
see if a pamaterized query works: cursor.execute('SELECT account_number FROM vw_billed_summary_fact WHERE ippa=%s', ['col11-emnj00-1147']) d. On Oct 19, 8:25 am, msbuck wrote: > I'm having another strange problem. I'm executing SQL statements > directly rather than using

collectstatic in RPM install

2011-10-18 Thread dmitry b
Hi, For deployment to production, I package my Django app into an RPM package. The install script is responsible for installing dependencies, copying files, etc. Now that I've switched to Django 1.3 I also want to run the collectstatic command as part of the deployment script. To do this, I've

name conflicts in static files

2011-10-17 Thread dmitry b
Hi, With the new way of handling static files in Django 1.3 what would happen if two applications have identically named static files? E.g.: |___ app1 | | static | |_ styles.css |___ app2 | static |_ styles.css

Re: Need help intercepting SQL

2011-07-11 Thread Eric B
> I am taking a very wild guess, as i have not pored over the docs, > but does a middleware which proxies the sqls help you? I think > i saw one such in djangosnippets. I searched djangosnippets.org for "proxy sql" and only found http://djangosnippets.org/snippets/1913/. That's not exactly what

Re: Need help intercepting SQL

2011-07-11 Thread Eric B
> @OP: I think your better bet would be to implement your own db > backend, deriving from django's mysql backend. I agree and looked into this, but the backend in Django 1.2 actually defers to the MySQLdb library. I couldn't find any references online that talked about or showed examples for

Need help intercepting SQL

2011-07-10 Thread Eric B
Our web site uses Django 1.2. We're adding a layer to our MySQL database called dbShards for fragmentation (sharding). I need to prepend instructive SQL comments (/* ... */) to UPDATE statements in certain situations. What's the best way to intercept the raw SQL sent to the database? I've come

Re: How to insert a csrf_token when entering datas through a bot ?

2011-04-13 Thread dave b
On 12 April 2011 22:09, JustinMarsan wrote: > Hello, > > What would be the best way to allow some bots to POST some content to > a website. Without crsf_token, the bot will get a 403, and I would > prefer not to remove this behavior but rather find a way to make the >

Re: Advice: project hosting apps

2011-04-12 Thread dave b
There is also http://gitorious.org/ - it is ROR, but it is agpl. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: check for existence in bulk

2011-03-31 Thread dmitry b
thanks, that's what I ended up using. On Mar 30, 11:58 am, Jason Culverhouse wrote: > You could use values_list  and flat as in: > >    User.objects.filter(username__in =['jason', 'was', > 'here']).values_list('username', flat=True) > > returns a list: > >    [u'jason',

check for existence in bulk

2011-03-30 Thread dmitry b
Hi, is there a way to check in bulk for record existence and get back a map of results similar to what's returned by in_bulk(). In my case, I need to look up records by a unique field which is not the primary key and I don't want object instances back, just true or false. Thanks Dmitry --

Re: Cool and useful development commands :-)

2011-02-23 Thread dave b
On 24 February 2011 00:29, Simone Federici wrote: > Maybe you could write a filter "urlsafe" to use into templates so that > variable does not contains javascript. > And you could create a command that scan templates and raise an alert every > variable inside an href

Re: Just going to point this out ...

2011-02-19 Thread dave b
It would be interesting to perhaps extend something like django-lint to pick up on what could be mistakes in templates. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To

Re: Just going to point this out ...

2011-02-18 Thread dave b
> > is this what you're looking for? > > http://www.owasp.org/index.php/OWASP_Application_Security_FAQ > > Mike Hi Mike. Well in this case the page would be http://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet but yes that link is a good starting point. I should

Re: Just going to point this out ...

2011-02-18 Thread dave b
> Which of course it can't - it is properly escaped. > > Cheers > > Tom > Yes. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Just going to point this out ...

2011-02-18 Thread dave b
On 19 February 2011 01:36, Masklinn <maskl...@masklinn.net> wrote: > On 2011-02-18, at 15:31 , dave b wrote: >> On 19 February 2011 01:29, Shawn Milochik <sh...@milochik.com> wrote: >>> By the way -- I realized what happened. You CC'd me on the e-mail to the >&

Re: Just going to point this out ...

2011-02-18 Thread dave b
On 19 February 2011 01:29, Shawn Milochik wrote: > By the way -- I realized what happened. You CC'd me on the e-mail to the > list. So when I replied it went directly to you. Ah sorry about the mix up then! Yeah :P My view on this is that documentation can always be

Re: Just going to point this out ...

2011-02-18 Thread dave b
On 19 February 2011 01:19, Shawn Milochik wrote: > Don't take my comment as a personal attack. I was just pointing out that > injection attacks are one of those things we're all responsible for being > aware of and not opening ourselves up to. > > To the extent that Django

Re: Just going to point this out ...

2011-02-18 Thread dave b
On 19 February 2011 00:57, Shawn Milochik wrote: > I also didn't see the part where they state that you shouldn't put your > database login information in a template. That's probably because Django is > designed to allow Web developers to do their jobs more easily, not allow

Just going to point this out ...

2011-02-18 Thread dave b
Hi I cannot see where in the django documentation it states that you shouldn't do something like this: ** (as an example of a potential attribute injection vector[0] - where you are not using a URLField or failure to call full_clean (on a URLField) ). That is I cannot see where django states

Re: South - when to start?

2011-02-18 Thread dave b
On 18 February 2011 21:24, Piotr Zalewa wrote: > Where is the best moment to start with south? > > 1. The very beginning, as the first app added to the project? > 2. At the moment when more devs will be involved? > 3. When real data will start to show? > now! (just start using

5 GET request after one AJAX request

2011-02-06 Thread Loïc B .
Hi, title may be confusing, I explain myself. Using Django, I recently put in place AJAX request handling in my views. Before, no problem : - one adress typing on client side <-> one GET request on server side - one click on Submit button on a form (client-side) <-> one POST request on server

Error: cannot import name SpooledTemporaryFile

2011-02-03 Thread b...@live.se
Hi all , I install dionaea on my Debian 5.0 (VM) when i run carniwwwhore : debian:/opt/carniwwwhore# python manage.py runserver Error: cannot import name SpooledTemporaryFile debian:/opt/carniwwwhore# python --version Python 2.5.2 any idea ? thanks -- You received this message because you are

Error filtering using bboverlaps

2011-01-25 Thread B. Heath Robinson
I am getting the following error when I try a complicated filter with a join involving bboverlaps. Join on field 'shape' not permitted. Did you misspell 'bboverlaps' for the lookup type? Here is the line that causes the problem. saved_properties =

Fwd: PostGISAdapter error

2011-01-17 Thread Robinson B. Heath
It has been a couple of weeks without a reply. Is there somewhere else I should post this or am I on my own? Begin forwarded message: > From: "Robinson B. Heath" <t...@edenicconfluence.com> > Date: January 4, 2011 11:41:48 PM CST > To: django-users@googlegroups.com

PostGISAdapter error

2011-01-04 Thread Robinson B. Heath
I am getting the following error when the queryset tries to generate the SQL: "'str' object has no attribute 'ewkb'" Here is what I am doing that causes the problem: shapes = Shape.objects.filter(geom__bboverlaps=bbx) shape_info = shape_info.filter(shape__in=shapes) Models are:

Re: Working with static media files, {{ MEDIA_URL }} shows up blank even with settings.py set

2010-12-28 Thread dmitry b
you need to be also using RequestContext in your view instead of the regular Context. What does your view method's return statement look like? On Dec 28, 7:02 am, Lee Connell wrote: > I didn't have TEMPLATE_CONTEXT_PROCESSORS at all, I copied the code > and it did not

Re: How to scale out uploaded file storage & serving?

2010-12-26 Thread Russ B.
If it's just disk performance and ability to add on space, a simple performance RAID (JBOD or RAID-0) attached internally, externally via Firewire/eSATA, or as NAS from another machine. If you're worried about a lot of files moving down the network concurrently, then you'll certainly have to look

  1   2   3   4   >