I am trying to setup a simple Django app using this tutorial:
https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
My configuration is:
Ubuntu 12.04, Apache/2.4.7, libapache2-mod-wsgi-py3, Python 3.4, Django 1.86
I keep getting
Hi --
I'm building a scheduling app for my burning man camp. There are seven
days (Mon-Sun), and each day has two meals, and people can sign up for the
available shifts.
Here's my table:
class mealShifts(models.Model):
Sunday = "Sunday"
Monday = "Monday"
Tuesday = "Tuesday"
Wednesday = "Wed
Hi!
When I try to use django.contrib.gis.db.backends.spatialite as my db engine on
Ubuntu Wily Werewolf (15.10), I am getting the following error:
*django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite
library extension "libspatialite.so.7" because:
/usr/local/lib/libs
So I’ve been working for a couple days now on setting up a pretty basic
bulk edit action for my server that consists of selecting all of the
objects you want to change a designated field on, being redirected to an
intermediate page, entering a new integer value for the designated field,
and t
I have a django view which has simple form with key value pair.
I have made the fields non editable. I'm providing a edit button which will
open a new window dialog and there i will load the same form in editable
view and provide option to save or add new rows to form.
When user clicks on save o
Thanks - you've definitely given me some stuff to think about. I'm doing
XHR requests - returning JSON for the scraping (but probably later will
have normal pages so I will definitely look at your Etag suggestion - I'm
not familiar with that so will look into it).
Given it's XHR and JSON I pr
Yes, that was it. I changed the user manager function to create superuser
into this
def create_superuser(self, email, first_name, last_name, username,
date_of_birth, password, **kwargs):
user = self.create_user(
email,
first_name=first_name,
last_name=la
If you are web scraping you really need your code to be as efficient as
possible and to do as little as possible. Firstly, make sure you are using
everything the servers of the websites you are scraping are giving you to
decide whether to bother downloading the page. For example, check the etag
and
Hi Dan,
Thanks for the suggestion, it's a web scraper (run as a django management
command) which then saves the data to the database via the Django ORM.
Given it's a scraper rather than a form (or view) is the above suggested
function an ok way to proceed or would you suggest something else is
See my new tutorial on Custom Templates in Django Sitemaps:
https://biz-factory.de/django-sitemap-index-tutorial/
--
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
Hi Yunti,
You could go up a level in the structure of your application and apply the
logic there, where there is more support.
Are you using Django forms? The ModelForm class pretty much does what you
want, it examines form data, validating it against its type and any
validation rules you have s
Jani,
Thanks for your reply - you explained it much more concisely than I did. :)
Good to have it confirmed that update_or_create() doesn't quite do what I
needed - I was confused as to whether it would or not.
Thanks for taking the time to do that function, that looks ideal. I'll test
it out.
Your problem lies on the way Django actually carries out create or update.
As name suggest, create or update does either one. But that's what you
don't want - you want conditional update.
Only update if certain fields have been changed. Well this can be done
few ways.
So you want to do
"up
Carsten ,
Thanks for your reply,
A note about the last statement: If a Supplier object has the same
unique_id, and all
other fields (in `defaults`) are the same as well, logically there is no
difference
between updating and not updating – the result is the same.
The entry in the database is
Yeah , I am sure both are using same template. I am using same template on
many pages. On all pages it's working fine. Only on one page question
answer it's not working as expected. I couldn't find any solution till now.
On Thursday, November 5, 2015 at 8:48:05 PM UTC+5:30, Collin Anderson wrot
Carsten ,
Thanks for your reply,
A note about the last statement: If a Supplier object has the same
unique_id, and all
other fields (in `defaults`) are the same as well, logically there is no
difference
between updating and not updating – the result is the same.
The entry in the database is
Thank you very much, Simon, for the detailed answer.
Now I'm digging through Django code, pull requests, and tickets, and it's
all very interesting.
Thank you also for the reminder of incoming deprecations: we'll definitely
be on the lookout for that!
All the best,
Michele
On Fri, Nov 6, 2015 at
Hi there,
I am working with django cms 3.1.3 to build a website.
I am trying to add functionality of "SEARCH" to the website .Tried using
haystack with elasticsearch,whoosh,simple,xapian for which i followed the
haysatck documentaion. Still unsuccessful in achieving the functionality.
Is the d
Hi,
Check the PermissionsMixin. In that mixin you add the is_superuser field.
It also adds the relations to the auth group for group permissions and so
on. And the django admin site checks for permissions by calling the
has_perm() method on your user model. The has_perm() method always returns
Tru
Hello,
Yes I thought so too, but in the example there is no *is_superuser *property
provided neither in the User models or in the User manager. Therefore, I
just copied the example from the django doc and tried running it. After
creating the superuser, I can edit the models. I have no Idea what I a
Thanks for the suggestions. I'll give them a try.
Cheers
Steve
--
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 post
21 matches
Mail list logo