Git Product home page Git Product logo

Comments (2)

rlskoeser avatar rlskoeser commented on May 22, 2024

Feedback from Jose C. Lacal:

Background:

  • I'm following the instructions posted on
    {http://eulfedora.readthedocs.org/en/0.20/tutorials/fedora.html} to
    install EULfedora on an Ubuntu Server 12.10 AMD64.
  • You may want to add these items as they seem to be required
    sudo apt-get install python-dev libxml2-dev libxslt1-dev
  • This installs the latest Django version:
    sudo pip install Django==1.5
  • If using PostgreSQL, user will also need to do this:
    sudo apt-get build-dep python-psycopg2
    pip install psycopg2
  • The configuration line:
    FEDORA_ROOT = 'https://localhost:8543/fedora/'

Needs to be adjusted based on FedoraCommons' config. For example, if using included Tomcat:
FEDORA_ROOT = 'http://localhost:8080/fedora/'

  • You may want to add
    "cd to simplerepo directory"
    before this command:
    python manage.py startapp repo
  • If user gets this error in the command line, after:

save the object to Fedora

obj.save()

error: [Errno 111] Connection refused

This means the setting for FEDORA_ROOT is wrong.


http://eulfedora.readthedocs.org/en/0.19.3/tutorials/fedora.html

Let’s create a search template to display the search form and search results. Create repo/search.html in your templates directory and add this:

<h1>Search for objects</h1>
<form method="post">{% csrf_token %}
     {{ form.as_p }}
    <input type="submit" value="Submit"/>
</form>
 {% if objects %}
     <hr/>
     {% for obj in objects %}
         <p><a href="{% url display obj.pid %}">{{ obj.label }}</a></p>
     {% endfor %}
{% endif %}

Error message:

NoReverseMatch at /search/
'url' requires a non-empty first argument. The syntax changed in Django
1.5, see the docs.
Request Method: POST
Request URL: http://54.235.157.196:8000/search/
Django Version: 1.5
Exception Type: NoReverseMatch
Exception Value:
'url' requires a non-empty first argument. The syntax changed in Django
1.5, see the docs.

<a href="{% url display obj.pid %}">{{ obj.label }}</a>

Solution: for Django 1.5 it must be 'display'

  <a href="{% url 'display' obj.pid %}">{{ obj.label }}</a>

from eulfedora.

chfw avatar chfw commented on May 22, 2024

See the pull request:#12

from eulfedora.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.