converting a large site to Django

188 views
Skip to first unread message

marjenni

unread,
Nov 30, 2011, 11:46:28 AM11/30/11
to Django users
Hi,
I am working on a website with many pages (in the hundreds).

I have recreated the website front page on a new server with the
desired new functionality implemented in Python and Django.

All seems good, but what I need to know is what is the easiest/
quickest way of moving across the rest of the website onto this new
server? Will I need an entry for each page in the urls file?

Many thanks for all your help

Mark

Juan de Dios Manjon Perez

unread,
Nov 30, 2011, 12:09:03 PM11/30/11
to django...@googlegroups.com

Tim Sawyer

unread,
Nov 30, 2011, 12:16:37 PM11/30/11
to django...@googlegroups.com
Do the pages that you're moving across to the new site need to be
change-able through the admin system, or are they static HTML that won't
change?

Only use flatpages if you want them to be editable through the web.

Tim.

creecode

unread,
Nov 30, 2011, 12:21:34 PM11/30/11
to django...@googlegroups.com
Hello Mark,


On Wednesday, November 30, 2011 8:46:28 AM UTC-8, marjenni wrote:

All seems good, but what I need to know is what is the easiest/
quickest way of moving across the rest of the website onto this new
server? Will I need an entry for each page in the urls file?

It will be hard for us to answer that question unless we know more about how/where the old webpages are stored and how you would like to store them in your Django based website.

You have several options:

    Use an app like Flatpages < https://docs.djangoproject.com/en/1.3//ref/contrib/flatpages/ >, which comes with Django.  Webpages are stored in the database.  It might be pretty easy to populate your Django website with some python code you would write that would grab your old webpages, massage them, and store them into your new website database.

    If the old webpages are static, you could put them into the static area of your website.

Give us more detail and we can probably be of more help.

Toodle-looooooooooooooooo..................
creecode

marjenni

unread,
Nov 30, 2011, 7:24:20 PM11/30/11
to Django users
Hi,ne
Thank you for your quick reply :)

Actually, I am a little concerned that I may have a lot of work ahead
of me!

I have an existing php based website that is used to advertise holiday
accommodation, and the pages that contain advert listings are
dynamically recreated every 24 hours.

I needed to implement a search feature, and this seemed much easier to
write in python than php, so on a new server I created a django
project, and basically all this contains is the modified home page of
the existing website with the search that generates a list of results.

Now I need to move across the rest of the website to the new server,
and I need to do this with minimal effort. I also need to preserve the
existing page URLs.

It maybe the case that there are no real shortcuts, but I just didn't
want to make unnecessary work for myself!

If anyone has some tips, please let me know.

Thanks again for the support

Mark

Tiago Almeida

unread,
Dec 1, 2011, 4:23:03 PM12/1/11
to Django users
Hi,
I'm assuming you have lots of html files that you want to serve. You
could try writing a catch all url pattern that is handled by a generic
view to serve these html files. I'm not sure if there is something
already like this in django itself.
However, if you don't want/need to process the html with the
templating engine, you should just serve them at the webserver level
(without going through django).

Hope it helps,

Reply all
Reply to author
Forward
0 new messages