[ASLO] ASLO build and deployment process (Jatin Dhankhar)

Tony Anderson tony_anderson at usa.net
Fri Apr 7 20:58:30 EDT 2017


Hi, Jatin

I abbreviated this thread because I am getting complaints from the list 
that the emails are too long.

Yesterday, I was able to complete a set of 25 activities to use as a 
test base. The Django app now has two views. First is a display of all 
of the
activities with the icon and name. A link for each opens the full 
activity page. The data for the views is in a file which is a list of 
jsons, one json per line.
The  views.py reads this file and builds the view from the jsons.

So the app consists of:
     urls.py
     views.py
     templates/
         base.html
         list.html
         activity.html

with the data:
         fixtures/activities.json
         icons/
         xo/

The icons directory has the activity icons (*.svg)
The xo directory has the activity bundles (*.xo)

Meanwhile, I am having more troubles with the ISP (a new one). When that 
gets resolved, I should be able to send the above to you.

I have also mentioned our dialog to Walter Bender suggesting that you 
could set up your working model as activities3.sugarlabs.org. This would 
give you a permanent place to do the development and make your project 
visible to the community so that we can obtain feedback. I aslo 
suggested that the project repository could be placed on GitHub so that 
again the community can comment and potentially contribute.

Tony
On 04/07/2017 12:23 AM, Jatin Dhankhar wrote:
> Hi,
>
> I am setting up Django now and going through some tutorials. I will 
> setup the code with a very basic and barebones version of what we want 
> to achieve and put it in a private repo. We can even host it online, 
> since I have some DigitalOcean credit left. Will keep you posted.
>
> Thanks.
> Jatin Dhankhar
>
> On Thu, Apr 6, 2017 at 7:11 AM, Tony Anderson <tony_anderson at usa.net 
> <mailto:tony_anderson at usa.net>> wrote:
>
>     Hi, Jatin
>
>     In setting up Django, I think you will do it on your computer not
>     on a separate server. Django handles that through its own server
>     and has sgqlite as a database built-in. A good first start would
>     be to set up the tutorial app (https://www.djangoproject.com/
>     <https://www.djangoproject.com/>). Essentially you will need to
>     install django and then set up the tutorial app 'poll'. Working
>     through this tutorial will help a lot later on. The key point is
>     that after initial setup, there are three important elements:
>     url.py which defines the urls to access the application, views.py
>     which is the python code that responds to a request by accessing
>     the db and delivering the relevant information to a template. The
>     template is an html file with variables of the form {{
>     activity.name <http://activity.name> }} transferring information
>     from the view to the template.
>
>     What I have is an application: aslo. Once you have Django
>     installed and have run the tutorial app through Django's server,
>     you'll be ready. Essentially, you will only need to add aslo as a
>     second app in the settings. One possible confusion is that DJango
>     lives in a project - essentially a directory containing its
>     manage.py admin interface. In the directory is another directory
>     of the same name with the settings.py and url.py. The poll app is
>     a directory in the top-level alongside the inner directory with
>     the project name.
>
>     For example, my project is schoolsite. So my setup looks like:
>
>     /library/schoolsite/schoolsite
>     /library/schoolsite/aslo
>
>     Meanwhile my code links directly to an activity page with no
>     index. I'll add an index so the essential structure will be there.
>     I'll also include the 'fixtures' to set up a 25 activity
>     capability. Fixtures are csv files from which the database
>     (metadata) can be loaded.
>
>     Tony
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/aslo/attachments/20170408/17303dfa/attachment.html>


More information about the ASLO mailing list