Theming Geonode

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Theming Geonode

juliermeopensourcedeveloper
Hi Geonode contributers and developers,

Going back to a previous recommendations made by Tony Schonbuchner and Alessio Fabiane about Theming Geonode.


Then the rest should be basic Django.
- create your app
- create your view
- create your template
- create your urls.py
- add it to your settings file
- and add it to project urls.py

http://geonode.org/dev-workshop/#/ *

Adding to Toni details,
once you have been able to setup you geonode-project (see the README on how to do that), you should be able to add tabs by modifying this file here


Just remove the {% comment %} / {% endcomment %} keywrods to enable the code and update the <li> accordingly.

Said that, I did the following based in here http://geonode.org/dev-workshop/#/3/2 :

 1 - I created a virtualenv <geonode-virtualenv> in (/etc/julierme_virtualenv/)

 2 - I executed  django-admin.py startproject geonode-project --template=https://github.com/GeoNode/geonode-project/archive/2.8.0.zip -epy,rst.

 3 - I activated geonode-virtualenv and ran:

               pip install -e geonode-project

Now I have:

1 -  geonode  in ( /etc/geonode/templates and /usr/local/lib/python2.7/dist-packages/geonode )  #installed via apt-get#

2 -  geonode-project in /etc/julierme_virtualenv/geonode-virtualenv/ #Installed according to here <a href="http://geonode.org/dev-workshop/#/3/2#">http://geonode.org/dev-workshop/#/3/2#

I got confused in here (http://geonode.org/dev-workshop/#/3/3):

  • cd geonode && paver start_geoserver
  • cd ../my_geonode && python manage.py runserver

You can wrap this in a simple executable .sh script

Should I have two .sh files ( one for cd geonode && paver start_geoserver and other for cd ../my_geonode && python manage.py runserver) ? if so, where should them be stored? If one .sh file, where should it be stored?


Thank you for your time in advance

I appreciated your time and patience.

Kind Regards

Julierme Pinheiro
















_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Theming Geonode

Simo D
Hi,

you actually used a different approach form the dev workshop because you installed geonode with apt-get. It is ok to do like this but you need to change a bit the setup.
In your case geonode and geoserver are already running (apache and tomcat) so you can skip the "cd geonode && paver start_geoserver" at all. Just run your geonode-project, it will use the geonode installed system wide.

Anyway to answer your question, if you want to wrap commands in a .sh script, you can put it where you prefer, just make sure the path it will use are correct.

Regards

2018-04-09 22:48 GMT+02:00 Julierme Pinheiro <[hidden email]>:
Hi Geonode contributers and developers,

Going back to a previous recommendations made by Tony Schonbuchner and Alessio Fabiane about Theming Geonode.


Then the rest should be basic Django.
- create your app
- create your view
- create your template
- create your urls.py
- add it to your settings file
- and add it to project urls.py

http://geonode.org/dev-workshop/#/ *

Adding to Toni details,
once you have been able to setup you geonode-project (see the README on how to do that), you should be able to add tabs by modifying this file here


Just remove the {% comment %} / {% endcomment %} keywrods to enable the code and update the <li> accordingly.

Said that, I did the following based in here http://geonode.org/dev-workshop/#/3/2 :

 1 - I created a virtualenv <geonode-virtualenv> in (/etc/julierme_virtualenv/)

 2 - I executed  django-admin.py startproject geonode-project --template=https://github.com/GeoNode/geonode-project/archive/2.8.0.zip -epy,rst.

 3 - I activated geonode-virtualenv and ran:

               pip install -e geonode-project

Now I have:

1 -  geonode  in ( /etc/geonode/templates and /usr/local/lib/python2.7/dist-packages/geonode )  #installed via apt-get#

2 -  geonode-project in /etc/julierme_virtualenv/geonode-virtualenv/ #Installed according to here http://geonode.org/dev-workshop/#/3/2#

I got confused in here (http://geonode.org/dev-workshop/#/3/3):

  • cd geonode && paver start_geoserver
  • cd ../my_geonode && python manage.py runserver

You can wrap this in a simple executable .sh script

Should I have two .sh files ( one for cd geonode && paver start_geoserver and other for cd ../my_geonode && python manage.py runserver) ? if so, where should them be stored? If one .sh file, where should it be stored?


Thank you for your time in advance

I appreciated your time and patience.

Kind Regards

Julierme Pinheiro


















--
Simone 

_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users
Reply | Threaded
Open this post in threaded view
|

Re: Theming Geonode

juliermeopensourcedeveloper
In reply to this post by juliermeopensourcedeveloper
Hi Francesco Bartoli,

Find attached  my geonode.conf file available in /etc/apache2/sites-available/ and /etc/apache2/sites-enabled/.

my_geonode project is installed in my_geonode virtualenv available in " (my_geonode) root@geo:/etc/julierme_virtualenv/my_geonode/my_geonode "

I have python2.7 (2.7.12) installed in  /usr/bin/python2.7 and in  /etc/julierme_virtualenv/my_geonode/bin/python2.7.

I have my geonode production installed via apt-get (see geonode-production.png in attached) and geonode-project installed via (https://github.com/GeoNode/geonode-project) (see geonode-project-virtualenv.png).

What changes should I make in geonode.conf, so I can mirror/apply the changes made in geonode-project to geonode production?

I apologize for my small background in IT.


Thank you very much for your patience and time.

I appreciated it.

Kind regards

Julierme Pinheiro







2018-04-14 14:02 GMT-03:00 Francesco Bartoli <[hidden email]>:
Apache configuration (i.e. http://docs.geonode.org/en/master/_downloads/geonode.conf) has to be changed accordingly with your geonode upstream project my_geonode and its python-path matters.

Il giorno 11/apr/2018, alle ore 17:11, Julierme Pinheiro <[hidden email]> ha scritto:

HI Francesco,

Thank you for your reply.

That means If I install my_geonode via virtualenv I would need a side script to apply my_geonode changes in my geonode installed via apt-get in respect to theming geonode?

Thank you for your time and patience

I appreciated it

Julierme

2018-04-10 3:26 GMT-03:00 francesco bartoli <[hidden email]>:
Hi Julierme,

those commands are supposed to be executed in development mode within the same virtual environment assuming you have geonode and my_geonode folders with the code base in a common base path:

<base path>/geonode
<base path>/my_geonode

It's up to you if you want to automate within a script, usually in dev mode you start geoserver and keep it up and running while hacking geonode/my_geonode

Francesco

2018-04-09 22:48 GMT+02:00 Julierme Pinheiro <[hidden email]>:
Hi Geonode contributers and developers,

Going back to a previous recommendations made by Tony Schonbuchner and Alessio Fabiane about Theming Geonode.


Then the rest should be basic Django.
- create your app
- create your view
- create your template
- create your urls.py
- add it to your settings file
- and add it to project urls.py

http://geonode.org/dev-workshop/#/ *

Adding to Toni details,
once you have been able to setup you geonode-project (see the README on how to do that), you should be able to add tabs by modifying this file here


Just remove the {% comment %} / {% endcomment %} keywrods to enable the code and update the <li> accordingly.

Said that, I did the following based in here http://geonode.org/dev-workshop/#/3/2 :

 1 - I created a virtualenv <geonode-virtualenv> in (/etc/julierme_virtualenv/)

 2 - I executed  django-admin.py startproject geonode-project --template=https://github.com/GeoNode/geonode-project/archive/2.8.0.zip -epy,rst.

 3 - I activated geonode-virtualenv and ran:

               pip install -e geonode-project

Now I have:

1 -  geonode  in ( /etc/geonode/templates and /usr/local/lib/python2.7/dist-packages/geonode )  #installed via apt-get#

2 -  geonode-project in /etc/julierme_virtualenv/geonode-virtualenv/ #Installed according to here http://geonode.org/dev-workshop/#/3/2#

I got confused in here (http://geonode.org/dev-workshop/#/3/3):

  • cd geonode && paver start_geoserver
  • cd ../my_geonode && python manage.py runserver

You can wrap this in a simple executable .sh script

Should I have two .sh files ( one for cd geonode && paver start_geoserver and other for cd ../my_geonode && python manage.py runserver) ? if so, where should them be stored? If one .sh file, where should it be stored?


Thank you for your time in advance

I appreciated your time and patience.

Kind Regards

Julierme Pinheiro
















_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users






_______________________________________________
geonode-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/geonode-users

geonode.conf (3K) Download Attachment
geonode-production.png (231K) Download Attachment
geonode-project-virtualenv.png (926K) Download Attachment