Hosting Recommendations?

2024-12-04 Thread Steve Smith
Hello all! I'm getting ready to put my project out into the world. I'm researching hosting options.and have recently somewhat settled on Digital Ocean...I haven't dug in to start deployment yetbut any recommendations on if this is a solid option or if there are others out there worth c

How To Avail Services From A CRM Software Development Company?

2024-10-26 Thread Travis Smith
Hello folks! I need assistance regarding availing services from a prestigious CRM Software Development Company for my business. I am running a tour and travel agency, and keeping track of customer details and a sales report is getting complicated. Additionally, I need some customized features

Bad Request 400 in Django

2022-09-01 Thread Eric smith
I have some issues in running django server. System check identified no issues (0 silenced). September 01, 2022 - 10:58:47 Django version 4.0.1, using settings 'project.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. [01/Sep/2022 10:58:57] "GET / HT

Re: migrations problem in django

2022-06-02 Thread Steve Smith
Looks like a spelling error at first glancemax_length...not max_lenght That's my first guess... From: django-users@googlegroups.com on behalf of Paras Kashyap Sent: Wednesday, June 1, 2022 12:00 PM To: Django users Subject: migrations problem in django Typ

Re: How to create dynamic models in django??

2022-02-27 Thread Steve Smith
My two cents. I've been trying to do a very similar thing...I've accomplished it in Djangousing FormsetsIt was painfulthe documentation on Formsets is scarce in my opinion and to get them to work is a lot of trial and error, not to mention complexity with corresponding Javascript.

Re: Slow page load performance with a large number of formsets (over 25)

2022-02-25 Thread Steve Smith
options depending on your use case: https://stackoverflow.com/questions/8176200/caching-queryset-choices-for-modelchoicefield-or-modelmultiplechoicefield-in-a-d Hard to be more specific without knowing anything about your code. On Fri, Feb 25, 2022, 8:53 PM Steve Smith mailto:stevesmith0...@hotmail

RE: Slow page load performance with a large number of formsets (over 25)

2022-02-25 Thread Steve Smith
u can use django-debug-toolbar[1] to profile your page and get these metrics. Once you figure out what part is slowest, then you can optimize. Hope this helps! Ryan N [1] https://django-debug-toolbar.readthedocs.io/en/latest/ On Mon, Feb 07, 2022 at 09:12:48AM -0800, Steven Smith wrote: > Did

Formsets?!?!?!?!?!?!?!?!?!?

2022-02-11 Thread Steve Smith
Hello all I have formsets workingbut I seem to be encountering some performance issues if I have more than 25 rows. I've looked at my database callsselect_related...prefetch_related...and I've polled several audiences...SOFacebook Groupsand the consensus seems to be that F

Re: Slow page load performance with a large number of formsets (over 25)

2022-02-08 Thread Steven Smith
What is hard reload? On Monday, February 7, 2022 at 12:43:08 PM UTC-6 abdouli...@gmail.com wrote: > Try hard reload it's little bit faster > > On Mon, Feb 7, 2022, 18:12 Steven Smith wrote: > >> Did this issue ever get resolved? I'm experiencing the same thing. O

Re: Slow page load performance with a large number of formsets (over 25)

2022-02-07 Thread Steven Smith
Did this issue ever get resolved? I'm experiencing the same thing. Once it hits 100 forms or so it gets pretty slow. On Monday, September 22, 2014 at 10:48:52 AM UTC-5 Collin Anderson wrote: > Yes, if you want speed, using javascript and ajax is probably your best > bet. It will probably also

Re: Formsets

2022-02-06 Thread Steve Smith
HI Steve! Thanks for the reply. I have tried select related and prefetch relatedbut didn't know about deferwill look into...my current formset scenario is 440ish queries and it takes about 19 seconds to load. Some have suggested Celery and RabbitMQ and other alternatives which I'm not

Formsets

2022-02-05 Thread Steven Smith
Hello all! I find formsets wildly useful...but very difficult to architect. I have them working...But I am running into a commonly documented problem...They are slow as you build up the number of fields and queries. Are there any general tips that can be used or share on how to improve thi

Re: Lack of tutorials and explanations about channels

2022-01-24 Thread Steve Smith
I am a huge fan of Django. But I will agree that the documentation is most areas beyond the absolute basics is abysmal. I have a lot written in Django in Class Based Views because I read early on they were the way to go. I'm not going to tell you how much research and time it took me but it w

Re: Django backend for Psycopg 3

2021-08-03 Thread Samuel Smith
I can't speak for the Django project or Foundation, but would like to thank you for all of your work on this project! -- Sam On 8/3/21 7:01 AM, Daniele Varrazzo wrote: Hello, I have maintained psycopg2 in the last >10 years and in the last year I have been developing a new adapter, Psycopg

Re: Desperately need help.

2021-06-16 Thread Ken Smith
have return render this should be missing check >> inside if statements or inside your custom logic which you have written >> without seeing the actual code its hard to tell. >> >> On Wednesday, 16 June 2021 at 03:14:26 UTC+5:30 Ken Smith wrote: >> >>> jul,

Re: Desperately need help.

2021-06-15 Thread Ken Smith
ve > none instead. :) > > > If you don't know about the code, maybe you should hire a developer or > learn by yourself. > > El mar., 15 de junio de 2021 3:14 p. m., Ken Smith > escribió: > >> There is the issue to solve that is the result of pressing th

Re: Desperately need help.

2021-06-15 Thread Ken Smith
ften very important when things don't work. As you probably well know. Have a wonderful day On Monday, June 14, 2021 at 1:13:18 PM UTC-4 Kasper Laudrup wrote: > On 14/06/2021 05.15, Ken Smith wrote: > > I sure hope that somebody can take the time to do this. I'm just > > w

Re: Help

2021-06-07 Thread Moose Smith
Hello I am a newbie to Django and Python. However, after a couple of intense weeks watching of some video's on Youtube, Google Searches, and Django Documentation I have been creating a cool website for quality control for my company. To answer your question I assume you have a Django applicati

Newbie question

2021-06-07 Thread Moose Smith
I have a table which holds simple data like addresses. Created a form which displays the records in the form and allows the user to select a record "address" to edit. I want this edit function to be generic so it will work on any table without me having to define fields etc... and using Model

Re: Facing problem to display dynamic (name,description of places AND price)on the web page using Django

2021-06-03 Thread Michael Smith
You can't have three of the same name view either can you? On Thu, Jun 3, 2021 at 9:36 AM Nandaniya Nilesh < nileshnandaniya...@gmail.com> wrote: > hello, > I am nilesh, > i think every funtion should return something. > > return dests from index named function. > last line is not with any functi

Re: Newbee help on deploying Django App to Apache2

2021-05-30 Thread Moose Smith
sier and better way to deploy, regardless the web > server. More information: > >- How to setup Apache with Gunicorn > > <https://djangodeployment.com/2016/11/30/how-to-setup-apache-with-gunicorn/> >- Detailed instructions on setting up Gunicorn ><https

Newbee help on deploying Django App to Apache2

2021-05-30 Thread Moose Smith
App written in ubuntu virtual environment python 3.8.5. Works well on Visual Studio Code development server. Am trying to make it run on Apache2 development server. I have been able to install WSGI module on Apache Server and ran a test Hello World in Python and it worked. However, the django

Re: Django asychronous for millions of users

2021-04-01 Thread Samuel Smith
On 3/30/21 6:32 AM, Josh moten wrote: I am creating an auction that will be hosting millions to possibly billions of users so I am trying to figure out which would be the best library to use for scalability at a rapid pace. I am positive to reach a million users in four months. What is the best

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
ednesday, February 10, 2021 at 9:32:31 PM UTC-5 Roy Smith wrote: > I've gotten back to playing with this. What I've ended up doing is > monkey-patching render to send the signal django.test.Client is expecting > from the template backend. Paraphrasing my (python 3.7)

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
bruary 4, 2021 at 7:29:23 PM UTC-5 Roy Smith wrote: > I started my current project using native django templates and now I'm > converting to jinja2. For the most part, it has gone smoothly. > > The surprising roadblock was that this broke all my unit tests. The issue > i

Re: test client vs jinja?

2021-02-10 Thread Roy Smith
It's a known problem. See https://code.djangoproject.com/ticket/24622. In short, the django template code has hooks to populate these values in the test client's response. The jinja folks (understandably) don't want to add the same hooks. On Friday, February 5, 2021 at 1:37:10 AM UTC-5 Benny

Complex DB query fun

2021-02-06 Thread Samuel Smith
o join to? Regards, Samuel Smith -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view t

test client vs jinja?

2021-02-04 Thread Roy Smith
I started my current project using native django templates and now I'm converting to jinja2. For the most part, it has gone smoothly. The surprising roadblock was that this broke all my unit tests. The issue is that django.template.backends.jinja2.Jinja2 doesn't populate response.context.

Getting staticfiles to find subdirectories?

2021-01-14 Thread Roy Smith
I'm running django 2.2. My static directory has a subdirectory which I want to deploy, but as far as I can tell, staticfiles only finds files in the top-level static directory. is there any way to make it recurse and find everything below the static directory, and keep the same directory struc

Re: forms.ChoiceField calls choices callback twice?

2020-08-27 Thread Roy Smith
Hmmm, maybe related to https://code.djangoproject.com/ticket/26665 ? On Thursday, August 27, 2020 at 5:29:39 PM UTC-4 Roy Smith wrote: > I'm running: > > Python 3.7 > Django 2.2 > Debian 4.9 > > If I configure a forms ChoiceField with a callback function for choices, &

forms.ChoiceField calls choices callback twice?

2020-08-27 Thread Roy Smith
I'm running: Python 3.7 Django 2.2 Debian 4.9 If I configure a forms ChoiceField with a callback function for choices, it gets called twice each time I render the form: > from unittest import TestCase > from django import forms > > def callback(): > print("callback") > return [('foo',

Re: social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-05 Thread Roy Smith
2020, at 10:08 PM, Roy Smith wrote: > > I have both model and social backends configured in settings.py: > >> AUTHENTICATION_BACKENDS = ( >> 'django.contrib.auth.backends.ModelBackend', >> 'social_core.backends.mediawiki.MediaWiki', >

social_django.models.UserSocialAuth.DoesNotExist in unit test

2020-08-04 Thread Roy Smith
I have both model and social backends configured in settings.py: > AUTHENTICATION_BACKENDS = ( > 'django.contrib.auth.backends.ModelBackend', > 'social_core.backends.mediawiki.MediaWiki', > ) When I run this test: > from django.test import TestCase, Client > from django.contrib.auth.mod

Re: How to configure a DatagramHandler for logging?

2020-06-28 Thread Roy Smith
Oh, never mind. It turns out 'logging.handlers.DatagramHandler' is exactly what you need, I just didn't get all the pieces wired up right. > On Jun 28, 2020, at 9:20 PM, Roy Smith wrote: > > 'logging.handlers.DatagramHandler', -- You received this mes

Re: How to configure a DatagramHandler for logging?

2020-06-28 Thread Roy Smith
Correction, the line that says 'logging.handlers.DatagramHandler', really reads 'logging.DatagramHandler' in the code I'm running. The logging.handlers.DatagramHandler was just something I tried to see what it would do. > On Jun 28, 2020, at 9:17 PM, Roy Smi

How to configure a DatagramHandler for logging?

2020-06-28 Thread Roy Smith
Python 3.7.3 Django 2.2.13 Debian Linux I'm trying to configure a DatagramHandler for logging. My LOGGING config is: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'file': { 'level': 'DEBUG', 'cla

Why my posts are showing up

2020-04-18 Thread kelvin smith
Just created my first post few minutes ago and I haven’t seen it -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To vi

Re: pip install Django==3.0

2019-12-02 Thread JP Smith
Django 3.0 does not support Python 3.5 . https://docs.djangoproject.com/en/3.0/releases/3.0/ ‪On Mon, Dec 2, 2019 at 11:06 AM ‫אורי‬‎ wrote:‬ > Django users, > > When I use pip to install a package, does it depend on the version of > Python I'm using? > > pip install Django==3.0 fails with Pyth

Re: pip install Django==3.0

2019-12-02 Thread JP Smith
Django 3.0 does not support Python 3.5: > > https://docs.djangoproject.com/en/3.0/releases/3.0/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsu

Re: Postgres along with Mongodb

2019-08-12 Thread Rupert Smith
. You can also schedule a call here now: https://calendly.com/rupert-6 Best Wishes, Rupert Rupert D Smith ACIPD *Principal Talent Partner* M: +44(0)7471 507654 E: rup...@globalm.io www.globalm.io [image: https://www.linkedin.com/in/rupertdavidsmith/] <https://www.linkedin.com/in/rupertd

Re: How to set timezone in Django.

2019-07-10 Thread agent smith
Am Mittwoch, 10. Juli 2019 00:00:16 UTC+13 schrieb Paul Gureghian: > > Specifically in the official 'polls' tutorial from the docs. > > In the 'mysite.settings.py' file. I changed from 'UTC' to 'PST' and > 'pst' and both faulted. thanks. > -- You received this message because you are sub

Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-06-28 Thread Jasmine Smith
Looking into, will get back to you soon. Thanks. On Thu, Jun 27, 2019 at 8:15 PM Rudy Quiroga Gamboa wrote: > Hi, I have the same problem, did you find the problem or the solution ? > > > El martes, 28 de mayo de 2019, 20:44:44 (UTC-4), K Tan escribió: >> >> Hi, everyone, >> >> This is my first

Re: “python -m django --version” 1.11.18 Cannot update to 2.1

2019-02-10 Thread JP Smith
I know that you are new so, I don't want to overwhelm you. One thing that you might want to look into is pip, which is a package management tool for python. This will allow you to install python packages and keep them up-to-date. The if you want to take a more manual approach, you could download

Re: Databases configuration

2018-12-07 Thread Cool Smith
I tried starting MYSQL server on System Preferences. However, it seems the server will shutdown automatically a few seconds later. On Friday, December 7, 2018 at 8:09:28 PM UTC+11, Cool Smith wrote: > > How to do so? > > On Friday, December 7, 2018 at 1:38:09 AM UTC+11, C. Kirby wrot

Re: Databases configuration

2018-12-07 Thread Cool Smith
How to do so? On Friday, December 7, 2018 at 1:38:09 AM UTC+11, C. Kirby wrote: > > Did you start your mysql process? > > On Thursday, December 6, 2018 at 9:33:37 AM UTC-5, Cool Smith wrote: >> >> Hi everyone, >> >> I am new to Django. I have started a

Databases configuration

2018-12-06 Thread Cool Smith
Hi everyone, I am new to Django. I have started a new project running on my localhost. Rather than using the default sqlite database, I changed it to mysql with the following settings on MacOS High Sierra v13.10.6: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql',

Re: Error during GeoDjango tutorial documentaion

2018-08-28 Thread Benjamin Smith
Thank you Jason, that was it. On Sun, Aug 26, 2018 at 5:49 PM Jason wrote: > this might be related: > https://groups.google.com/forum/#!topic/geodjango/Imkq2DDI7qg > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from thi

Re: Error during GeoDjango tutorial documentaion

2018-08-26 Thread Benjamin Smith
I am using these version: gdal-bin v2.2.3+dfsg-2 Python v3.6.5 Django v2.1 psycopg2 v2.7.5 postgis v2.4.3+dfsg-4 On Sun, Aug 26, 2018 at 3:45 PM Benjamin Smith wrote: > I am going through the GeoDjango tutorial from the official documentation. > >1. I have installed the

Error during GeoDjango tutorial documentaion

2018-08-26 Thread Benjamin Smith
I am going through the GeoDjango tutorial from the official documentation. 1. I have installed the required geospatial libraries, installed and enabled spatial functionality by extending the PostgreSQL via postgis. 2. Downloaded the world borders data, and have unzipped the data. 3. Cr

Re: Geographical location filter app in Django

2018-08-26 Thread Benjamin Smith
-distance/35896358#35896358 > > On Thu, 23 Aug 2018 at 09:04, Benjamin Smith > wrote: > >> I would like to create a market place like app with Djano as the backend >> server, where users can buy/sell items. In the app I would like have to a >> feature related to geo

Geographical location filter app in Django

2018-08-23 Thread Benjamin Smith
I would like to create a market place like app with Djano as the backend server, where users can buy/sell items. In the app I would like have to a feature related to geographic region of a user. Such as, to filter out items in a given specific miles of radius. Example use case: - User uploads

It looks as if you see all contents of you index.html while also missing all dependencies .. check the network tab of your browser to confirm this. The report created by gephi is probably an html page

2018-04-27 Thread Agent Smith
It looks as if you see all contents of you index.html while also missing all dependencies .. check the network tab of your browser to confirm this. The report created by gephi is probably an html page that is soppused to be opened via the browser directly or served with a webserver. Just renderin

Displaying Categories / Subcategories (Tango with Django Example)

2017-05-10 Thread Michael Smith
I'm following the latest Tango book and was experimenting with different ways of looping through categories and subcategories to create a list. I have a 'Category' and 'Page' model, where Page has a foreign key to Category's ID. To display a list with sub-bullets I simply passed all categorie

Filtering using viewsets in django rest framework

2017-03-03 Thread Benjamin Smith
Please consider these three models: class Movie(models.Model): name = models.CharField(max_length=254, unique=True) language = models.CharField(max_length=14) synopsis = models.TextField() class TimeTable(models.Model): date = models.DateField() class Show(models.Model): day

implement django-admin + button popup

2016-04-20 Thread Giuseppe Smith
I have been trying to get a + button beside my many to many list that will give me a popup to a form to create a new related object to associate. I have followed the instructions at this link http://www.hoboes.com/Mimsy/hacks/replicating-djangos-admin/ but it will not work. whenever I click the

DJANGO TUTORIAL

2016-03-21 Thread Anthony W Smith
When I follow django tutorial on the django site for the polls app I keep getting the error after runnig the python manage.py runserver command it says no modsule named my site. Please help Anthony -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Django Newbie - Tutorial Recommendations?

2016-03-19 Thread Anthony W Smith
On Friday, March 18, 2016 at 8:31:56 AM UTC-4, Santosh Srinivas wrote: > > Hi Folks, > > I'm new to both Python and Django. > I am looking for high quality video tutorials on Django and Python from > your experience (paid is also fine). > > Please advise. > > Thank you. > Santosh > -- You rece

Re: Django Newb Help

2016-03-19 Thread parker smith
Okay I figured this one out on my own...I just added the following code... new_comment.save() comment_form = CommentForm() - #(I added this line and it's working properly now) else: comment_form = CommentForm() On Wednesday, 16 March 2016 16:45:31 UTC-7, parker smith

Re: Django Newb Help

2016-03-19 Thread parker smith
I can modify position and look of the {{ form.to }} with {{ form.to }} tags and css but I don't think that's the intention... On Wednesday, 16 March 2016 16:45:31 UTC-7, parker smith wrote: > > Hello, > > I am working on the django by example book and in ch. 2 I am having

Django Newb Help

2016-03-19 Thread parker smith
Hello, I am working on Django by Example as a newb and am having issues in ch. 2... we are setting up a commenting system for blog posts and everything works except the form stays populated and there is no refresh after successfully posting...the page is supposed to refresh and the form be clea

Django Newb Help

2016-03-19 Thread parker smith
Hello, I am working on the django by example book and in ch. 2 I am having issues getting the recipient email to display inside the template tag... here is the specific line of code that isn't working and what I changed it to to get it some what working... views.py code referencing cd -

Re: Django Newb Help

2016-03-18 Thread parker smith
I resolved this problem. On Wednesday, 16 March 2016 18:07:08 UTC-7, parker smith wrote: > > I can modify position and look of the {{ form.to }} with style="position: absolute;">{{ form.to }} tags and css but I don't > think that's the intention... > > On W

[no subject]

2015-11-13 Thread Benjamin Smith
I need to update the object with its model form and passed the instance as described in the django doc . However I am having two problems when saving the form: 1. When I change the title and submit the form, the i

Re: Custom user model password is not hashed

2015-11-13 Thread Benjamin Smith
ing in a project). > > You did restart the django shell after changing the code? > > 2015-11-12 16:44 GMT+01:00 Benjamin Smith : > >> I have changed user.set_password(self.cleaned_data["password"]) to >> user.set_password(password). >> But I am gett

Re: Custom user model password is not hashed

2015-11-12 Thread Benjamin Smith
the code in your method: 'MyUserManager.create_user': >> user.set_password(self.cleaned_data["password"]) >> >> You're in your Manager method but call self.cleaned_data ? >> >> You can set a breakpoint inside your method with pdb to see &

Custom user model password is not hashed

2015-11-12 Thread Benjamin Smith
I have my own custom User model, and its own Manger too. Models: class MyUser(AbstractBaseUser, PermissionsMixin): email = models.EmailField(max_length=255, unique=True) first_name = models.CharField(max_length=35) last_name = models.CharField(max_length=35) username = models.Char

Re: django admin - You don't have permission to edit anything

2015-11-06 Thread Benjamin Smith
ango/blob/master/django/contrib/auth/models.py#L207 > > The reason why it's working now is because you have explicitly set the > is_superuser property to True. > > Regards, > > Andréas > > 2015-11-06 10:04 GMT+01:00 Benjamin Smith : > >> Hello, >> Yes I

Re: django admin - You don't have permission to edit anything

2015-11-06 Thread Benjamin Smith
> property to True. > > Check the documentation for the django admin site here: > https://docs.djangoproject.com/en/1.8/ref/contrib/admin/ > > Regards, > > Andréas > > 2015-11-06 0:15 GMT+01:00 Benjamin Smith : > >> I followed the django doc >> <http

django admin - You don't have permission to edit anything

2015-11-05 Thread Benjamin Smith
I followed the django doc on creating a custom user model while extending the model itself with my own fields. So it became like this: class MyUser(AbstractBaseUser, PermissionsMixin): email = models.EmailF

Is it necessary to make a custom manager for the custom User model?

2015-10-09 Thread Benjamin Smith
I am making a custom user model using the AbstractBaseUser and PermissionsMixin by following these two tutorials (tutorial-1 and tutorial-2 ). This my model so

KeyError

2015-10-07 Thread Benjamin Smith
I am making a registration form to register new users using the User model. This is the forms.py: class UserForm(forms.ModelForm): confirm_email = forms.EmailField(label="Confirm email") def clean(self): email = self.cleaned_data['email'] confirm_email = self.cleaned_data

KeyError

2015-10-07 Thread Benjamin Smith
I am making a user registration form to register new users using the User model. This is the forms.py: class UserForm(forms.ModelForm): confirm_email = forms.EmailField(label="Confirm email") def clean(self): email = self.cleaned_data['email'] confirm_email = self.cleaned

.get() has unexpected behaviour on a queryset after previously applying .order_by().distinct()

2015-04-15 Thread Nick Smith
>>> from django.db.models import models >>> class MarketPrice(models.Model): market = models.CharField(max_length=30) crop = models.CharField(max_length=30) price = models.PositiveSmallIntegerField() date = models.DateField() def __str__(self): r

Slow test startup under Django 1.7

2015-01-22 Thread Warren Smith
I'm in the process of converting a large legacy app from Django 1.5 to 1.7. I've got all the tests passing, so I'm researching an issue I noticed during the course of my work: Test startup takes MUCH longer under Django 1.7 than it did under 1.5. I've got a test that, when run by itself, took a

Re: Problem with google calendar on ancient django version

2014-12-23 Thread Roy Smith
) 4) No On Dec 22, 2014, at 9:02 PM, Roy Smith wrote: > I'm in the process of incrementally upgrading a site running some ancient > software (django 1.3.1 and django-cms 2.2). I've got a development version > of the site running django-cms 2.3.8 (and still django 1.3.1) for t

Problem with google calendar on ancient django version

2014-12-22 Thread Roy Smith
s version change how this behaves? 3) Is this fixed in later django-cms versions? 4) Is this fundamentally a bug in Google calendar, i.e. I should be reporting it to them? -- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django use

Re: if statement in django

2014-04-05 Thread Anthony Smith
amount_price def save(self): self.total_price = self.calc_total_price() super(SaleNote, self).save() def __unicode__(self): return self.buyer cheers anthony On Sun, Apr 6, 2014 at 3:20 PM, Jay Lozier wrote: > > On 04/05/2014 11:08 PM, Anthony Smith wro

if statement in django

2014-04-05 Thread Anthony Smith
Hi I have a small project and I have been unable to get the following statement to work. Any help would great.User inputs can either self_sale_head which is a $ value,if a $ value is not add a self.estimated_weight_hd is used to get the total weight, the code below should return a estimated

Re: Django test client encoding of JSON Booleans

2014-02-24 Thread Daniel Smith
ay, February 22, 2014 10:56:21 AM UTC-5, Camilo Torres wrote: > > On Friday, February 21, 2014 6:14:14 PM UTC-4:30, Daniel Smith wrote: >> >> I'm using Django version 1.5.5. Here is a short snippet of the test I'm >> writing: >> >> from django.test impo

Django test client encoding of JSON Booleans

2014-02-21 Thread Daniel Smith
I'm using Django version 1.5.5. Here is a short snippet of the test I'm writing: from django.test import TestCase class MyTest(TestCase): def my_test(self): url = ... location of my view ... self.client.post(url, data={'active': False}, format='json') The problem I'm running into is

Admin permissions for proxy ModelAdmins?

2013-11-27 Thread Brad Smith
Hello all, I want to have multiple admin interfaces for editing the same model under different circumstances. The way I've been doing this is to register multiple proxy models, each with their own ModelAdmins. However, the proxy models don't seem to generate permissions, so they don't show up

Re: Using admin views "outside" of admin

2013-11-21 Thread Brad Smith
...and of course now I find a FAQ item that seems to talk about exactly what I want to do: https://docs.djangoproject.com/en/1.6/faq/admin/#how-do-i-limit-admin-access-so-that-objects-can-only-be-edited-by-the-users-who-created-them I'm still curious to hear comments, though, because if this

Re: Using admin views "outside" of admin

2013-11-21 Thread Brad Smith
glanceI don't see anything in the docs about replacing or extending the access control mechanism. Anyone have advice along those lines? Thanks again! --Brad On Wednesday, November 20, 2013 5:32:30 PM UTC-5, Gonzalo Delgado wrote: > > -BEGIN PGP SIGNED MESSAGE- > Ha

Using admin views "outside" of admin

2013-11-20 Thread Brad Smith
Hello all, Based on other threads I've read here, it seems that the conventional wisdom is that the admin interface is only for low-level access to the database, and isn't designed for anything "fancy", like users with different levels of administrative rights within an app, etc. Ok, I get tha

override_settings decoration of non-test class function

2013-11-17 Thread Daniel Smith
I recently ran into a bug in our test code due to override settings resetting the settings to default after the function returned. Obviously, we shouldn't be using the override_settings decorator on a random function, but I think there is still room for improvement. At minimum, I think it would

Finding gunicorn worker number inside django app?

2013-11-16 Thread Roy Smith
I'm running django (1.4) with gunicorn (0.17.4) and gevent. I want to have the gunicorn worker number available inside of django, so I can include it in log messages and statsd data for tracking purposes. What I'm doing right now is I put a pre_request hook in my gunicorn config file which fak

Django Templates: Using the "with" statement and "block.super" together

2013-09-24 Thread Warren Smith
On occasion, I've used the following technique in my django templates: # parent.html {% block someblock %} …stuff… {% if cool_optional_feature_is_enabled %} …optional stuff... {% endif %} …stuff... {% endblock %} # child.html {% extends "parent.html" %} {% block someblock %} {% with

Best-practice for "join mailing list" form on every page

2013-08-20 Thread Steven Smith
I've got a simple form with one field that appears in the footer of my site, asking users to enter their email address to subscribe to our mailing list. Rather than duplicate the form-processing logic in every single view, what should I do? - POST to one location, but use a context processor to

Get size of cached item?

2013-08-16 Thread Roy Smith
ckling all over again. Is there any way to find out how much memory each object I store is going to use without this extra overhead? --- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Design for storing likes/dislikes?

2013-07-19 Thread Steven Smith
I've used NullBooleanField for this before, as well. A lot quicker to query on than a ManyToMany, also. On Tuesday, July 16, 2013 9:24:54 PM UTC-4, donarb wrote: > > On Tuesday, July 16, 2013 5:29:47 PM UTC-7, Victor Hooi wrote: >> >> Hi, >> >> We have a list of users, who are going to like/di

Form Wizard: Redirecting back to a step from inside the done() method

2013-07-18 Thread Steven Smith
I have a form wizard that walks a user through some system configuration steps. In the done() method, the cleaned_data is used to call out to a configuration system to do various set/unset operations. Most of the time, the validation that I have built into my form classes is sufficient. However

Atomic test/set/get using django cache API?

2013-05-14 Thread Roy Smith
ted. Is there a way to also get the value, inside the atomic perimeter? -- Roy Smith r...@panix.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an e

Why does BaseHandler::handle_uncaught_exception() not always log?

2012-10-24 Thread Roy Smith
In core/handlers/base.py, handle_uncaught_exception() does: if settings.DEBUG: from django.views import debug return debug.technical_500_response(request, *exc_info) logger.error('Internal Server Error: %s' % request.path, exc_info=exc_info,

Re: How often does Django need updates/patches?

2012-09-21 Thread Taylor Smith
thanks very much, that's exactly what we needed to know! On Friday, September 21, 2012 6:39:43 AM UTC-6, Russell Keith-Magee wrote: > On Fri, Sep 21, 2012 at 10:56 AM, Taylor Smith > > > wrote: > > Our new website is being built on Django and we are trying to figure

How often does Django need updates/patches?

2012-09-21 Thread Taylor Smith
Our new website is being built on Django and we are trying to figure out the easiest way to host and maintain the site. It seems there are a few managed hosting options like webfaction and heroku, but they will only handle the linux and database patches and updates. I am hoping to find out ho

Customizing session id strings?

2012-08-16 Thread Roy Smith
We're using django.contrib.sessions.backends.cache. We use mongodb for our datastore, so we don't use the django model/database support at all. The standard django session machinery generates 32-character hex strings (128 bits) for session ids. We store the session_id in many places in our da

Re: Can't use admin with apache

2012-07-18 Thread Matt Smith
On 19/07/12 11:06, Demian Brecht wrote: You're running ls -l under your user account. The apache process needs r+w permissions to the database file. Thx Demian my issue is now resolved (and I feel like a dumbass but who cares!) -- Matt Smith http://mattsmith.org.nz -- You received

Re: Can't use admin with apache

2012-07-18 Thread Matt Smith
--r-- 1 mds staff 1630 Jul 18 17:38 apache/django.wsgi How about this: Is anyone out there deploying on debian squeeze with the following packages: apache2 libapache2-mod-wsgi python-django If so, does the admin work for you? If it does, what db are you using? -- Matt Smith http://mat

Can't use admin with apache

2012-07-16 Thread Matt Smith
_PREFIX to DJANGO_SRC/contrib/admin/media but this didn't work for me. I get a 500 internal server error, regardless of DEBUG. Appreciate any help with this. -- Matt Smith http://mattsmith.org.nz -- You received this message because you are subscribed to the Google Groups "Django users&quo

Re: Deployment: Apache2, wsgi (Debian squeeze)

2012-07-15 Thread Matt Smith
st but I'm curious if you think the machine running apache is underpowered: mds@waianakarua:~$ grep MHz /proc/cpuinfo cpu MHz: 400.829 mds@waianakarua:~$ grep MemTotal /proc/meminfo MemTotal: 185644 kB Thx again, -- Matt Smith http://mattsmith.org.nz -- Yo

  1   2   3   4   >