Re: [mezzanine-users] Mezzanine 4.0 is released

2015-07-09 Thread Graham Oliver
Awesome, thanks Stephen !
g

On 10 July 2015 at 11:04, Stephen McDonald st...@jupo.org wrote:

 Hi all,

 The new 4.0 release of Mezzanine is finally up on PyPI after 10 months
 since the last release - a lot has happened! The project site (
 mezzanine.jupo.org) hasn't been upgraded yet, that will happen shortly.
 The full changelog is here:
 https://github.com/stephenmcd/mezzanine/blob/master/CHANGELOG - it has
 become quite unwieldy given the variety of commit styles (it's
 automatically generated from them), so one of the housekeeping tasks we
 identified upon forming the official core team was to go back and redo it
 manually. If you'd like to volunteer for that you'd be a superstar. Given
 that, here's a human written overview of what's new:

 - The supported Django versions are now 1.7 and 1.8
 - Translatable content is now supported via django-modeltranslation
 - Dropped support for South, given Django 1.7's built-in migrations
 - TinyMCE upgraded to 4.0 (the previous version was around 3 years old!)
 - Major refactor of mezzanine.conf.settings resulting in greatly reduced
 DB queries, and removal of manual use_editable() requirement
 - Major refactor of bundled fabfile, allowing for non-vcs deploys via
 rsync, plus many more new features
 - We now use the same project layout that Django has for several versions,
 where manage.py and others live outside the project package
 - A gazillion bugfixes and other minor improvements

 There could be more - I've just put that list together by skimming the
 changelog. If I've missed anything noteworthy, please let everyone know in
 this thread. Speaking of which, if you have an issue, I'd ask that instead
 of replying here, you start a new email thread. If you know you've found a
 real bug (eg can actually confirm the problem in the code), please open a
 GitHub issue.

 A massive thanks goes out to the newly formed core team who have been the
 major contributors to all the above, and to everyone else who has chipped
 in too, on the code base and here on the mailing list with support.

 Thanks and enjoy!


 --
 Stephen McDonald
 http://jupo.org

 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
t : 021 081 71732

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: TinyMCE 4

2015-06-26 Thread Graham Oliver
Thanks Steve and all others who contributed to integrating TinyMCE 4
Awesome!
g


On Saturday, 27 June 2015 10:21:32 UTC+12, Stephen McDonald wrote:

 Hi all,

 I've just merged into Mezzanine the work Alex Hill has done on upgrading 
 TinyMCE to version 4 - it looks a lot better!

 Please help out by grabbing the latest dev branch and testing it. I've 
 already ironed out a handful of issues, and AFAICT it works really well.

 This should be the last of a many new features that will make up the next 
 release, Mezzanine 4.0!


 -- 
 Stephen McDonald
 http://jupo.org
  

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Misc script: Fix for re-adding the django_content_type.name column in Django 1.7

2015-06-04 Thread Graham Oliver
Hi Sam
Useful for me, thanks!
I came across this problem when testing the dev version of Mezzanine in
April
https://groups.google.com/forum/#!searchin/mezzanine-users/testing$201.7$201.8/mezzanine-users/fuocmjotHWs/X8t36Nc3uwYJ
I was just keeping 2 versions of the data. Your solution is way better!
g


On 5 June 2015 at 11:15, Sam Kingston s...@sjkwi.com.au wrote:

 This is probably useful to nobody but myself, but since I hit this issue
 today I thought I would share this script, if for no other reason than for
 reference if I do it again!

 https://gist.github.com/sjkingo/d4815302eb4e32b0f120

 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
t : 021 081 71732

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Theming best practice: Bootstrap or bare-bones?

2015-06-03 Thread Graham Oliver
Hi Simon 
I did pip install robotonotebook
and all was good, looks really good so far :-)
Cheers
g

On Sunday, 31 May 2015 01:52:25 UTC+12, Simon Griffee wrote:

 Thanks, Stephen. 

 I'll go through it again and keep at it. Once I get it all working 
 I'll document the steps I took here. 
 Simon Griffee 
 www.hypertexthero.com 



 On Sat, May 30, 2015 at 2:38 AM, Stephen McDonald st...@jupo.org 
 javascript: wrote: 
  BTW don't feel disheartened, I never found a complete and thorough 
 tutorial 
  documenting this either (that's not to say there isn't one). The 
 official 
  docs are incredibly dense too. I just worked it all out through trial 
 and 
  error. 
  
  The good thing is that once you get everything working, you never really 
  need to go through it again. I just copy and paste from one project to 
 the 
  next. 
  
  On Fri, May 29, 2015 at 11:31 PM, Stephen McDonald st...@jupo.org 
 javascript: wrote: 
  
  You've also got files in there that shouldn't be in the repo: 
  
 https://github.com/hypertexthero/mezzanine-robotonotebook/blob/master/templates/.DS_Store
  
  
  That tutorial doesn't seem to deal with including non-Python files in 
 your 
  package, which you'll need to do to include your templates and other 
 static 
  files. I can't do a proper tutorial justice by trying to document the 
 steps 
  here, but these are normally handled by a MANIFEST file, look at 
 Mezzanine's 
  for example: 
 https://github.com/stephenmcd/mezzanine/blob/master/MANIFEST.in 
  
  Your setup.py should include references to necessary dependencies - 
 again, 
  no way of telling without seeing it, but since you describing 
 installing 
  them manually in the readme file, presumably this step has been omitted 
 too. 
  
  On Fri, May 29, 2015 at 11:27 PM, Stephen McDonald st...@jupo.org 
 javascript: wrote: 
  
  I'd suggest finding some open source Django apps and studying their 
  structure on Github. Also following the tutorial you linked to before 
 more 
  closely, you've steered away from it it seems. 
  
  - The virtualenv directory isn't relevant 
  - You've split out a package directory and the git repo, with 
 duplicate 
  content, these should be the same thing, including setup.py etc 
  - Once you've got everything on Github, people can then at least see 
 your 
  setup.py and look to see if it has problems, at the moment it's hidden 
 on 
  your computer 
  - At a guess, the project's showing up on PyPI as you did the 
 register 
  step, but possibly you forgot the upload step. 
  
  
  
  On Fri, May 29, 2015 at 8:26 PM, Simon Griffee 
 si...@hypertexthero.com javascript: 
  wrote: 
  
  Hi Graham, 
  
  Those are the instructions I followed, and they seem to have worked — 
  my package is listed on PyPI and from what I can see the `setup.py` 
  file should be inside the same folder containing the package, and not 
  in the package itself. 
  
  This brings up the question of whether there is a 'best practice' for 
  packaging Django apps in development (I'm a novice). My current 
  foldersetup is as follows: 
  
  mezzanine-roboto-notebook-env--- My virtualenv 
  ├── bin 
  ├── include 
  ├── lib 
  ├── mezzanine-roboto-notebook 
  │   ├── ... 
  │   ├── robotonotebook--- THE git repo which I develop on 
 and 
  push to https://github.com/hypertexthero/mezzanine-robotonotebook 
  │   │   ├── LICENSE.txt 
  │   │   ├── README.md 
  │   │   ├── __init__.py 
  │   │   ├── static 
  │   │   └── templates 
  │   ├── ... 
  ├── package--- THE package pushed to PyPI using the 
  instructions you mentioned 
  │   ├── LICENSE.txt 
  │   ├── README.md 
  │   ├── robotonotebook 
  │   │   ├── __init__.py 
  │   │   ├── static 
  │   │   └── templates 
  │   ├── setup.cfg 
  │   └── setup.py 
  └── pip-selfcheck.json 
  
  I'm going to get some sleep now — back sometime tomorrow! 
  
  Simon 
  
  
  
  Simon Griffee 
  www.hypertexthero.com 
  
  
  
  On Fri, May 29, 2015 at 10:59 PM, Graham greenba...@gmail.com 
 javascript: 
  wrote: 
   Hi Simon 
   I have had a look at this blog post 
   http://peterdowns.com/posts/first-time-with-pypi.html 
   It says that you need a setup.py file which I am not seeing on your 
   repo... 
   
   cheers 
   g 
   
   On 30/05/15 13:22, Simon Griffee wrote: 
   
   Thanks, Mathias. 
   
   I've gone ahead and tried making something *without* using 
 Bootstrap 
   to 
   begin with. If people like this I will make a version that uses 
   Bootstrap, 
   too. My reasoning for this is that I want to : 
   
   1. Focus on the simplest code when learning something and… 
   2. Improve performance by reducing the amount of CSS files, 
 especially 
   as 
   I'm referencing a typeface in the design — I'm a fan of minimalist 
   design :) 
   
   Here is version 0.0.1: 
   
   https://github.com/hypertexthero/mezzanine-robotonotebook 
   

[mezzanine-users] Re: new release? - Possible Mezzanine Bug in relation to mezzanine.jupo.org install

2015-05-27 Thread Graham Oliver
Hello everyone
Using PostgreSQL in a virtual environment
When I go through the install process for the mezzanine.jupo.org web site I 
am encountering a problem with the latest Django version 1.8.2
Note the problem does *not* occur with 1.7.8

Here is a description and stack trace of the problem
https://github.com/stephenmcd/mezzanine.jupo.org/issues/6

I managed to get the install to work by running
python manage.py migrate auth (even though this exits with an error)
before the createdb command 

I got that idea from 
http://stackoverflow.com/questions/29689365/auth-user-error-with-django-1-8-and-syncdb-migrate

Cheers
g

p.s. I had to upgrade django-compressor to the latest version (1.5) to work 
around another problem

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] After deploy I have empty database :(

2015-05-16 Thread Graham Oliver
Yes this took me quite a while to understand :-)
I have gone through this process on webfaction recently
Happy to answer any questions that you have.
g

On 17 May 2015 at 11:54, Ken Bolton kenbol...@gmail.com wrote:

 Hi Taedori,

 Mezzanine does not move your data! Migrations with the `migrate`
 management command modify your database schema.

 You may be able to use the `dumpdata
 https://docs.djangoproject.com/en/1.6/ref/django-admin/#dumpdata-appname-appname-appname-model`
 and `loaddata
 https://docs.djangoproject.com/en/1.6/ref/django-admin/#loaddata-fixture-fixture`
 commands. Read up on fixtures
 https://docs.djangoproject.com/en/1.6/ref/django-admin/#what-s-a-fixture
 to get your head around the entire process.

 Hope this helps!

 - ken

 On Sat, May 16, 2015 at 7:26 PM, taedori redleopar...@gmail.com wrote:

 It is first time to build web site using mezzanine and first time to
 deploy using fabric.

 I worked on sqlite3 database on dev machine which works fine.

 And I ran fab all with default database setting that means just as it is.

 Finished fab all with no error.

 When I go to the web, it shows my website but no page information and
 title says page not found.

 I think actual database from dev machine copied to production database.

 I tried run python manage.py migrate on the server but it says nothing to
 migrate...



 What am I missing?



 please help

 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
t : 021 081 71732

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] moving data from development to production and the twitter model

2015-05-15 Thread Graham Oliver
Hello all
I am just working through the process of moving data from development to 
production (which I will document at some point)
I notice that after I do a 'flush' command various bits of data spring back 
to life. Doing some research I see that this is because of something called 
a post_migrate signal...

I have a few questions

1. Is there a reason why the twitter model is the only model in Mezzanine 
to be affected by this?
2. Can you point me to the lines of code where this happens (the 
post_migrate actions for the twitter model)
3. When I run the 'flush' command with verbosity 3, I see this comment 
'[108.59.11.112] out: Creating example.com Site object'. Would it be a good 
idea to have something similar for the twitter objects that are created?

TIA
Graham

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Using Mezzanine with Python 3: package compatibility

2015-05-15 Thread Graham Oliver
Hi Christian
In terms of MySQL vs PostgreSQL have a look at 
https://docs.djangoproject.com/en/1.7/topics/migrations

When I read
'PostgreSQL is the most capable of all the databases here in terms of 
schema support'

and

'MySQL lacks support for transactions around schema alteration operations, 
meaning that if a migration fails to apply you will have to manually unpick 
the changes in order to try again (it’s impossible to roll back to an 
earlier point).'

I decided that PostgreSQL was the best option.

Cheers
g

On Saturday, 16 May 2015 02:32:36 UTC+12, xnx wrote:

 Hello Mezzanine Users,

 I'm new to Mezzanine but not Django: I'm enjoying learning it a lot and it 
 does a great job, but I've run into a couple of problems. I am trying to 
 deploy Mezzanine under Python 3.3.5 and, although I have a working site, I 
 have a couple of questions about compatibility with the packages I need. 
 I'm using Anaconda 2.2.0.

 * Installing Mezzanine with `conda` automatically downgrades my Django 
 version to 1.6.11: is there an upcoming release that will support Django 
 1.7+ under Python 3? I'd like to use django-migrations.

 * Is there any way of using MySQL in this stack? I found I could not 
 install MySQLdb under Python 3 and this seems to be a requirement for 
 Mezzanine using a MySQL backend but isn't provided by Anaconda. I'm using 
 PostgreSQL like a grown-up instead, but my preference would probably be for 
 MySQL.

 * The Mezzanine docs at http://mezzanine.jupo.org/docs/user-accounts.html 
 suggest using AUTH_PROFILE_MODULE to implement user profiles in a 
 Mezzanine site, but  the Django docs at 
 http://django.readthedocs.org/en/latest/releases/1.5.html#auth-profile-module 
 say that this has been deprecated since 1.5. Am I missing something here?

 Thanks for reading,
 Christian


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Introducing Mezzanine's Core Development Team

2015-05-11 Thread Graham Oliver
So awesome!
In New Zealand there is a Māori proverb that asks...

He aha te mea nui (What is the most important thing?)

the answer being...

He tāngata, he tāngata, he tāngata (It is people, it is people, it is 
people!)

Glad to be part of this community, with this group of core developers :-)
g

On Tuesday, 12 May 2015 09:20:44 UTC+12, Stephen McDonald wrote:

 Hi all,

 Today I'm thrilled to announce the introduction of a core development team 
 for Mezzanine. I've written a detailed post about it, please heave a read:


 http://blog.jupo.org/2015/05/11/introducing-mezzanines-core-development-team/

 TLDR: The new team consists of myself, Josh Cartmell, Ken Bolton, Alex 
 Hill, Ed Rivas, Mathias Ettinger, who have each made huge contributions to 
 the project over several years.

 Please join me in welcoming them!


 -- 
 Stephen McDonald
 http://jupo.org
  

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Webfaction fabfile with Django 1.7.7 and development version of Mezzanine - More detailed info

2015-05-05 Thread Graham Oliver
I have tracked this error to the line
https://github.com/jerivas/mezzanine-webf/blob/master/fabfile.py#L446
site, _ = Site.objects.get_or_create(id=settings.SITE_ID);)

I tried replacing it with 
Site.objects.filter(id=settings.SITE_ID).update(domain=env.live_host);)
like this 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/project_template/fabfile.py#L525
but still got the same error.

I have looked for possible solutions but don't have enough knowledge to 
make sensible progress, these pages looked helpful though
http://django.readthedocs.org/en/latest/releases/1.7.html#standalone-scripts
http://django.readthedocs.org/en/latest/ref/applications.html#applications-troubleshooting

I am wondering if this would be an issue for *all* fabfile use and not just 
for webfaction. Therefore it may be a 'release blocker'?

Cheers
g



On Tuesday, 5 May 2015 14:16:21 UTC+12, Graham Oliver wrote:

 I am just working through the webfaction fabfile written by Jervais 
 (thanks!) https://github.com/jerivas/mezzanine-webf 
 I am using Django 1.7.7, Python 2.7 and the current development version 
 of Mezzanine. 

 I am confused as to which line is causing the problem 

 Either this 
 https://github.com/jerivas/mezzanine-webf/blob/master/fabfile.py#L443 

 or this 
 https://github.com/jerivas/mezzanine-webf/blob/master/fabfile.py#L444 

 The stack trace is below... 

 Would welcome any pointers 
 TIA 
 g 

 [108.59.11.112] run: python -c import os; 
 os.environ['DJANGO_SETTINGS_MODULE']='settings';from django.conf import 
 settings;from django.contrib.sites.models import Site;site, _ = 
 Site.objects.get_or_create(id=settings.SITE_ID);site.domain = 
 'orotau.webfactional.com';site.save(); 
 [108.59.11.112] out: 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/mezzanine/utils/conf.py:59:
  

 UserWarning: TIME_ZONE setting is not set, using closest match: UTC 
 [108.59.11.112] out:   warn(TIME_ZONE setting is not set, using closest 
 match: %s % tz) 
 [108.59.11.112] out: Traceback (most recent call last): 
 [108.59.11.112] out:   File string, line 1, in module 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/manager.py,
  

 line 92, in manager_method 
 [108.59.11.112] out: return getattr(self.get_queryset(), 
 name)(*args, **kwargs) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py,
  

 line 422, in get_or_create 
 [108.59.11.112] out: return self.get(**lookup), False 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py,
  

 line 345, in get 
 [108.59.11.112] out: clone = self.filter(*args, **kwargs) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py,
  

 line 691, in filter 
 [108.59.11.112] out: return self._filter_or_exclude(False, *args, 
 **kwargs) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/query.py,
  

 line 709, in _filter_or_exclude 
 [108.59.11.112] out: clone.query.add_q(Q(*args, **kwargs)) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py,
  

 line 1331, in add_q 
 [108.59.11.112] out: clause, require_inner = self._add_q(where_part, 
 self.used_aliases) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py,
  

 line 1358, in _add_q 
 [108.59.11.112] out: current_negated=current_negated, 
 connector=connector) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py,
  

 line 1182, in build_filter 
 [108.59.11.112] out: lookups, parts, reffed_aggregate = 
 self.solve_lookup_type(arg) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py,
  

 line 1120, in solve_lookup_type 
 [108.59.11.112] out: _, field, _, lookup_parts = 
 self.names_to_path(lookup_splitted, self.get_meta()) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/sql/query.py,
  

 line 1383, in names_to_path 
 [108.59.11.112] out: field, model, direct, m2m = 
 opts.get_field_by_name(name) 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/options.py,
  

 line 416, in get_field_by_name 
 [108.59.11.112] out: cache = self.init_name_map() 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs/ve_soul/lib/python2.7/site-packages/django/db/models/options.py,
  

 line 445, in init_name_map 
 [108.59.11.112] out: for f, model in 
 self.get_all_related_m2m_objects_with_model(): 
 [108.59.11.112] out:   File 
 /home/orotau/.virtualenvs

[mezzanine-users] Re: new release?

2015-04-29 Thread Graham Oliver
Hi Gavin
My understanding is that it is done on a best-efforts basis, so the short 
answer to your question is 'no'.
Cheers
g

On Wednesday, 29 April 2015 10:06:51 UTC+12, Gavin Wahl wrote:

 Is there a timeline for a release that supports Django 1.8?


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Search synonyms

2015-04-27 Thread Graham Oliver
Hello all
Is there a way to add 'search synonyms'?

An example,
if a user searches for the word 'qi' searches will behave as if the user 
has searched for 'qi' or 'chi'
and similarly
if a user searches for the word 'chi' searches will behave as if the user 
has searched for 'qi' or 'chi'

Thanks
g

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] PostgreSQL version on terminal

2015-04-17 Thread Graham Oliver
Just started using PostgreSQL and notice that on the terminal when I 
execute the runserver command the PostgreSQL version comes up as

PostgreSQL 9.0306.3.06.6

When I run psql --version

I get 9.3.6

Not sure if they should match or not

g

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: new release? - TypeError at /search/ unsupported operand type(s) for |=:

2015-04-15 Thread Graham Oliver
ok retested on Django 1.77 and 1.8 - all is good

On Wednesday, 15 April 2015 09:48:34 UTC+12, Stephen McDonald wrote:

 Good find Graham, thanks a lot for tracking it down.

 That's fixed now:


 https://github.com/stephenmcd/mezzanine/commit/3ad1a6a9ce049e14fe9d120be1226844ad201baf

 On Tue, Apr 14, 2015 at 5:55 PM, Graham Oliver greenba...@gmail.com 
 javascript: wrote:

 no problems in 1.7.7
 Here is the return from the [m._meta.get_parent_list() for m in models] 
 in 1.7.7
 [{class 'mezzanine.pages.models.Page'}, {class 
 'mezzanine.pages.models.Page'}, {class 'mezzanine.pages.models.Page'}, 
 set(), {class 'mezzanine.pages.models.Page'}, set(), {class 
 'mezzanine.pages.models.Page'}, {class 'mezzanine.pages.models.Page'}, 
 {class 'mezzanine.pages.models.Page'}]

 Here is the same return in 1.8
 [[class 'mezzanine.pages.models.Page'], [class 
 'mezzanine.pages.models.Page'], [class 'mezzanine.pages.models.Page'], 
 [], [class 'mezzanine.pages.models.Page'], [], [class 
 'mezzanine.pages.models.Page'], [class 'mezzanine.pages.models.Page'], 
 [class 'mezzanine.pages.models.Page']]

 cheers
 g


 My best guess is that it is something to do with 

 On Tuesday, 14 April 2015 19:00:18 UTC+12, Graham Oliver wrote:

 Python 3.4  Django 1.8

  Request Method: GET  Request URL: http://192.168.1.81:8000/
 search/?q=samoa  Django Version: 1.8  Exception Type: TypeError  Exception 
 Value: 

 unsupported operand type(s) for |=: 'list' and 'list'

  Exception Location: /home/graham/Virtual-Environments/test-py3-dj1.8/
 lib/python3.4/site-packages/mezzanine/core/managers.py in search, line 
 265  Python Executable: /home/graham/Virtual-
 Environments/test-py3-dj1.8/bin/python 
 I will do some digging
 g


  -- 
 You received this message because you are subscribed to the Google Groups 
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to mezzanine-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




 -- 
 Stephen McDonald
 http://jupo.org
  

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: new release? - TypeError at /search/ unsupported operand type(s) for |=:

2015-04-14 Thread Graham Oliver
Python 3.4  Django 1.8

 Request Method: GET  Request URL: http://192.168.1.81:8000/search/?q=samoa  
Django 
Version: 1.8  Exception Type: TypeError  Exception Value: 

unsupported operand type(s) for |=: 'list' and 'list'

 Exception Location: 
/home/graham/Virtual-Environments/test-py3-dj1.8/lib/python3.4/site-packages/mezzanine/core/managers.py
 
in search, line 265  Python Executable: 
/home/graham/Virtual-Environments/test-py3-dj1.8/bin/python 
I will do some digging
g


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: new release? - TypeError at /search/ unsupported operand type(s) for |=:

2015-04-14 Thread Graham Oliver
no problems in 1.7.7
Here is the return from the [m._meta.get_parent_list() for m in models] in 
1.7.7
[{class 'mezzanine.pages.models.Page'}, {class 
'mezzanine.pages.models.Page'}, {class 'mezzanine.pages.models.Page'}, 
set(), {class 'mezzanine.pages.models.Page'}, set(), {class 
'mezzanine.pages.models.Page'}, {class 'mezzanine.pages.models.Page'}, 
{class 'mezzanine.pages.models.Page'}]

Here is the same return in 1.8
[[class 'mezzanine.pages.models.Page'], [class 
'mezzanine.pages.models.Page'], [class 'mezzanine.pages.models.Page'], 
[], [class 'mezzanine.pages.models.Page'], [], [class 
'mezzanine.pages.models.Page'], [class 'mezzanine.pages.models.Page'], 
[class 'mezzanine.pages.models.Page']]

cheers
g


My best guess is that it is something to do with 

On Tuesday, 14 April 2015 19:00:18 UTC+12, Graham Oliver wrote:

 Python 3.4  Django 1.8

  Request Method: GET  Request URL: 
 http://192.168.1.81:8000/search/?q=samoa  Django Version: 1.8  Exception 
 Type: TypeError  Exception Value: 

 unsupported operand type(s) for |=: 'list' and 'list'

  Exception Location: 
 /home/graham/Virtual-Environments/test-py3-dj1.8/lib/python3.4/site-packages/mezzanine/core/managers.py
  
 in search, line 265  Python Executable: 
 /home/graham/Virtual-Environments/test-py3-dj1.8/bin/python 
 I will do some digging
 g




-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: new release? - cannot import name 'find_template_loader'

2015-04-08 Thread Graham Oliver
Django 1.8
Python 3.4.3

Accessing the admin 

ImportError at /admin/login/ 

cannot import name 'find_template_loader'

 Request Method: GET  Request URL: 
http://127.0.0.1:8000/admin/login/?next=/admin/  Django Version: 1.8  Exception 
Type: ImportError  Exception Value: 

cannot import name 'find_template_loader'

 Exception Location: 
/home/graham/.pyenv/versions/py3.4.3-dj1.8/lib/python3.4/site-packages/mezzanine/template/loader_tags.py
 
in find_template, line 62  Python Executable: 
/home/graham/.pyenv/versions/py3.4.3-dj1.8/bin/python  Python Version: 3.4.3  
Python 
Path: 

['/home/graham/Dropbox/mp-soul-2',
 '/home/graham/.pyenv/versions/3.4.3/lib/python34.zip',
 '/home/graham/.pyenv/versions/3.4.3/lib/python3.4',
 '/home/graham/.pyenv/versions/3.4.3/lib/python3.4/plat-linux',
 '/home/graham/.pyenv/versions/3.4.3/lib/python3.4/lib-dynload',
 '/home/graham/.pyenv/versions/py3.4.3-dj1.8/lib/python3.4/site-packages',
 '/home/graham/Dropbox']

 Server time: Thu, 9 Apr 2015 15:19:14 +1200  
Error during template rendering 

In template 
/home/graham/Dropbox/mp-soul-2/soulapp2/templates/admin/base_site.html, 
error at line *1*
cannot import name 'find_template_loader' 1 {% overextends 
admin/base_site.html %}

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: new release?

2015-04-07 Thread Graham Oliver
Django 1.7.7, Python 3.4.3

python manage.py runserver 

Performing system checks...

System check identified some issues:

WARNINGS:
?: (1_6.W001) Some project unittests may not execute as expected.
HINT: Django 1.6 introduced a new default test runner. It looks like 
this project was generated using Django 1.5 or earlier. You should ensure 
your tests are all running  behaving as expected. See 
https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for 
more information.

System check identified 1 issue (0 silenced).

You have unapplied migrations; your app may not work properly until they 
are applied.
Run 'python manage.py migrate' to apply them.

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: new release?

2015-04-07 Thread Graham Oliver
Same results on Python 2.7.9

I notice that all of the 4 tests except the first one had this text

'You have unapplied migrations; your app may not work properly until they 
are applied.
Run 'python manage.py migrate' to apply them.'


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Trying to integrate Mezzanine to another project

2015-03-31 Thread Graham Oliver
Perhaps the top answer here can help?
http://stackoverflow.com/questions/2606194/django-error-message-add-a-related-name-argument-to-the-definition

On 1 April 2015 at 12:27, Melvin Ramos melvin.ramos1...@gmail.com wrote:

 Hello,

 I'm tryin to integrate Mezzanine to GeoNode. I added all I needed in
 settings.py but this error appears:

 CommandError: One or more models did not validate:
 agon_ratings.rating: Accessor for field 'content_type' clashes with
 related field 'ContentType.rating_set'. Add a related_name argument to the
 definition for 'content_type'.
 generic.rating: Accessor for field 'content_type' clashes with related
 field 'ContentType.rating_set'. Add a related_name argument to the
 definition for 'content_type'.

 And I have no idea what it is. Can you help me? Have anyone tried anything
 like this before?

 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
t : 021 081 71732

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2015-03-30 Thread Graham Oliver
Just ignorance on my part Mathias
I thought in my head 'I am searching the *total* Mezzanine code base', when
in fact I neglected to include the other parts such as filebrowser_safe.
Thanks for the heads up.
g

On 31 March 2015 at 00:38, Mathias Ettinger mathias.ettin...@gmail.com
wrote:

 Why searching for a filebrowser_safe issue in the mezzanine code base?

 The issue is thrown by the delete function in filebrowser_safe.views but
 there are 2 possible situations that can lead to this message. Either the
 path of the file failed to be normalized or the OS failed to delete the
 file properly.

 Can you modify the error messages of the views.py file of filebrowser_safe
 so we know which one is occuring?


 Le vendredi 27 mars 2015 07:47:29 UTC+1, Graham Oliver a écrit :

 yes I was just wondering if there was anything more helpful with the
 error message.
 I have searched the code base and I can only find the text 'An error
 occurred' in one place
 https://github.com/orotau/mezzanine/blob/master/mezzanine/core/static/
 mezzanine/js/editable.js#L19

 I don't know if that is where the error message is coming from?
 g

 On 27 March 2015 at 19:03, Wan Hsin Mao cindy5...@gmail.com wrote:

 Do u mean this page?


 https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-xfa1/v/t1.0-9/11100235_915791538441828_6765449119291652476_n.jpg?oh=c5460dffae23740a2f845ea8e4b1f93foe=55B73673__gda__=1436814405_303eb83f26420ae34f0a1ccbb5b792bb

  --
 You received this message because you are subscribed to the Google
 Groups Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to mezzanine-use...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Images, mobile devices and Mezzanine

2015-03-29 Thread Graham Oliver
I am confused as to how to go about making a Mezzanine web site I am 
developing work well with mobile devices (especially images).

Initially I thought that I had to use Mobile templates, but I have noticed 
that, for example, with a bootstrap Carousel on the home page (with large 
images), it looks fine on an IPhone (the images are automatically shrunk).

So, some questions if I may...

a) Does Mezzanine automatically serve smaller images when a mobile device 
accesses a web page? If so, is this a feature of Django, Mezzanine or 
Bootstrap? Can you point me in the direction of the code...
b) What would the advantages and disadvantages be of using the Mobile 
templates?
c) Should I only ever have one copy of an image stored and rely on the 
software to do the resizing? (I am guessing yes)

Thanks
G

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2015-03-27 Thread Graham Oliver
I also found this in the mailing list
http://grokbase.com/p/gg/mezzanine-users/1326ek5pna/commenting-gives-me-an-error-when-debug-is-set-to-off

On 27 March 2015 at 19:07, Wan Hsin Mao cindy55212...@gmail.com wrote:

 I use Apache2.2, so there shouldn't be file permission problems if I set
 my upload directory Order allow,deny / Allow from all ? (I'm not sure if
 it's right)

 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2015-03-27 Thread Graham Oliver
yes I was just wondering if there was anything more helpful with the error
message.
I have searched the code base and I can only find the text 'An error
occurred' in one place
https://github.com/orotau/mezzanine/blob/master/mezzanine/core/static/mezzanine/js/editable.js#L19

I don't know if that is where the error message is coming from?
g

On 27 March 2015 at 19:03, Wan Hsin Mao cindy55212...@gmail.com wrote:

 Do u mean this page?


 https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-xfa1/v/t1.0-9/11100235_915791538441828_6765449119291652476_n.jpg?oh=c5460dffae23740a2f845ea8e4b1f93foe=55B73673__gda__=1436814405_303eb83f26420ae34f0a1ccbb5b792bb

  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Mezzanine 3.1.10: Can't delete the media files in the admin page

2015-03-26 Thread Graham Oliver
Can you delete an image file ok? Like a jpg or a png?


On 27 March 2015 at 16:07, Wan Hsin Mao cindy55212...@gmail.com wrote:

 I got this message when I run the manage.py runserver command:


 https://lh3.googleusercontent.com/-Q4yAS7J6OCM/VRTJeQT4ZHI/CBI/Jlk8oso1kjI/s1600/%E6%93%B7%E5%8F%96.JPG

  --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Site working perfectly in development, but admin and static pages are crashing in production

2015-03-15 Thread Graham Oliver
ok - looking at the error messages
They seem to be being tiggered by

{% admin_dropdown_menu %}

which is in mezzanine_tags.py

def admin_dropdown_menu(context):  Renders the app list for the admin
dropdown menu navigation.  user = context[request].user if
user.is_staff: context[dropdown_menu_app_list] = admin_app_list(context[
request]) if user.is_superuser: sites = Site.objects.all() else: sites =
user.sitepermissions.get().sites.all() context[dropdown_menu_sites] = list
(sites) context[dropdown_menu_selected_site_id] = current_site_id() return
context
Would it work to put some error trapping in this function?
g

On 15 March 2015 at 22:11, Philip Southwell p...@zoothink.com wrote:

 Thanks Graham - that's where I was looking but I think I have that covered
 already. My urls.py is below


 urls.py
 from __future__ import unicode_literals

 from django.conf.urls import patterns, include, url
 from django.conf.urls.i18n import i18n_patterns
 from django.contrib.gis import admin

 from mezzanine.core.views import direct_to_template

 admin.autodiscover()

 urlpatterns = i18n_patterns(,
 (^admin/, include(admin.site.urls)),
 )

 urlpatterns += patterns('',
 url(r'^advertisers/', include('free2me.urls', namespace=advertiser)),
 url(r'^deals/', include('free2me.urls_public', namespace=public)),
 url(^$, free2me.views.deals_home_page, name=home),

 (^, include(mezzanine.urls)),
 )
 handler404 = mezzanine.core.views.page_not_found
 handler500 = mezzanine.core.views.server_error


 --
 You received this message because you are subscribed to the Google Groups
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to mezzanine-users+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Validating between obejcts when the number of Inline objects = 2

2015-03-06 Thread Graham Oliver
Kia Ora (Hello)
I have a class 'Happening' that can have one or more 'Spans'

In the admin I have the 'Spans' as an Inline, all good.
I have a clean method on the Span class that validates the INDIVIDUAL Span 
objects, all good.

However, if the user enters 2 or more Span objects I want to validate 
BETWEEN these objects.

Can anyone point me in the right direction with this? I have googled around 
but no luck.

Regards
Graham

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Trying to use 'inline' in Admin with a many to many relationship

2015-02-27 Thread Graham Oliver
I have a class 'Happening' with a ManyToMany relationship to  'Span' as 
follows

class Happening(Page, RichText):
spans = models.ManyToManyField(Span)

class Span(Slugged):
start_date = models.DateField()
end_date = models.DateField()
start_time = models.TimeField
end_time = models.TimeField

In the admin for Happening I want the Span fields to appear (I believe the 
term is 'inline')

I did this in admin.py
class HappeningSpanInline(DynamicInlineAdminForm):
model = Happening.spans.through

class HappeningAdmin(PageAdmin):

Admin class for Happenings.

inlines = [HappeningSpanInline,]
fieldsets = happening_fieldsets

However when I try to run the server I get this message

django.core.exceptions.ImproperlyConfigured: 'HappeningAdmin.inlines[0]' 
does not inherit from BaseModelAdmin.

Some help would be appreciated.
Regards g


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Getting started with Git

2015-02-19 Thread Graham Oliver
Hi there
I have been attempting to get my head around Git and here is a blog post 
sharing my learning.
Thanks to Stephen McDonald and Ross Laird for the inspiration. Mezzanine 
rocks!
http://gitstarted.blogspot.co.nz/2015/02/git-for-one.html

Graham

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: How to use TinyMCE V4?

2015-02-19 Thread Graham Oliver
Hi Daniel
You could also look at this https://github.com/AlexHill/tinymezzce4
Note that I hit a road block 
https://github.com/AlexHill/tinymezzce4/issues/2
Cheers
g

On Thursday, 19 February 2015 18:51:25 UTC+13, Daniel Herrera wrote:

 I want to use the TinyMCE WYTIWYG editor at its latest version. How do I 
 do that in Mezzanine?


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Ensure unqiue title field on model inherited from Displayable

2015-02-12 Thread Graham Oliver
The code I posted prevents any editing of existing records :-(
To remove this bug it needs to be preceded by

 if not self.pk:

Regards
Graham

I have a model which inherits from Displayable, giving me a 'title' field.
 What would be a good strategy to ensure the uniqueness of the 'title' 
 field for the instances of this model?

 TIA
 Graham


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Re: Ensure unqiue title field on model inherited from Displayable

2015-02-05 Thread Graham Oliver
Hi Eduardo
At the moment I have decided to create a field on the inherited model call 
'title_copy' with unique = TRUE and then in the clean method I have
self.title_copy = self.title

I realise that this is pretty ugly but I have decided FOR THE MOMENT to do 
it for 2 reasons

a) I understand it
b) My coding skills are limited and I get nervous at this stage with 
'super' calls

Anyway thanks for your help and if and when my coding skills improve I may 
revisit this hack...

g

On Monday, 2 February 2015 17:17:00 UTC+13, Eduardo Rivas wrote:

 Hi Graham. Why do you say this needs to happen before pre-save? The idea 
 of that signal is that it let's you do anything you wish before inserting 
 data into the DB. If you found out that the Title is not unique, you can 
 raise the appropriate errors and abort the save until the user corrects the 
 Title, or simply add a numeral to ensure uniqueness (My Title, My Title 1, 
 My Title 2, etc).

 An alternate solution is to define your own save method in your custom 
 model class and do the check there. Just remember to call the parent class 
 save method with super() at the end.


-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Foreign Key to Page Object - Controlling the dropdown text in Admin

2015-02-04 Thread Graham Oliver
Hi there
I have a foreign key to a Page Object. I want to be able to control the 
text that appears on the drop down in the Admin.
I am guessing that I need to override ModelChoiceField like here 
http://stackoverflow.com/questions/6836740/django-admin-change-foreignkey-display-text
However, I am a bit stuck on how to do this with Mezzanine
Would anyone be able to help me?

TIA
Graham

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Mezzanine Agenda 'EVENT_SLUG' - trying to change

2014-12-25 Thread Graham Oliver
Hi there
I have changed the default value of 'EVENT_SLUG' in the Mezzanine Agenda 
app (by updating settings.py).
However, the change does not register, it stays with the default value 
'events'.
Any ideas as to where I should look in the code base to see if it has been 
'hard-coded' somewhere

TIA
Graham

btw Merry Christmas

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Getting hold of the model instance when I save a Blog from the admin

2014-11-12 Thread Graham Oliver
I am trying to get the model instance when the save button is pressed on 
the Blog Admin form.
I have found the code (below) in \blog\admin.py that gets triggered for the 
save. 
However, I am not sure how to get the instance. 
I have looked at the types of 'self', 'request' and 'form' but they all 
seem to be classes (I am clearly missing something!)
Your help would be most welcome, Regards Graham

def save_form(self, request, form, change):

Super class ordering is important here - user must get saved first.

OwnableAdmin.save_form(self, request, form, change)
return DisplayableAdmin.save_form(self, request, form, change)

-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Getting hold of the model instance when I save a Blog from the admin

2014-11-12 Thread Graham Oliver
Hi Kenneth
Thanks for the guidance
I want to use the saved instance to create some other very similar 
instances.
The link looks like the way to go for me
Thanks
G

On Thursday, 13 November 2014 02:07:26 UTC+13, Kenneth Bolton wrote:

 Hi Graham,

 Could you explain the goal you are trying to accomplish? What do you want 
 to do with the instance? I believe in most cases, Django's signals (
 https://docs.djangoproject.com/en/dev/topics/signals/) are an easy way to 
 work with instances pre- or post-save.

 hth,
 ken

 On Wed, Nov 12, 2014 at 4:30 AM, Graham Oliver greenba...@gmail.com 
 javascript: wrote:

 I am trying to get the model instance when the save button is pressed on 
 the Blog Admin form.
 I have found the code (below) in \blog\admin.py that gets triggered for 
 the save. 
 However, I am not sure how to get the instance. 
 I have looked at the types of 'self', 'request' and 'form' but they all 
 seem to be classes (I am clearly missing something!)
 Your help would be most welcome, Regards Graham

 def save_form(self, request, form, change):
 
 Super class ordering is important here - user must get saved 
 first.
 
 OwnableAdmin.save_form(self, request, form, change)
 return DisplayableAdmin.save_form(self, request, form, change)

 -- 
 You received this message because you are subscribed to the Google Groups 
 Mezzanine Users group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to mezzanine-use...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/d/optout.




-- 
You received this message because you are subscribed to the Google Groups 
Mezzanine Users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.